Open-source, self-hostable server and runtime core for Run402 — backend infrastructure for AI agents. Postgres/PostgREST with RLS, storage, routing, functions and portable project archives. Apache-2.0.
Run402 Core
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
Run402 Core is the open-source, self-hostable server and runtime core for
Run402 — backend infrastructure for AI agents. Run402 gives an
agent a Postgres database, user auth, file storage, serverless functions and site
hosting that it provisions and operates itself; this repository is the part of that
backend you can run on your own machine, under Apache-2.0. The agent-facing SDK, CLI
and MCP server live in kychee-com/run402 (MIT).
The current Core runtime-kernel slice is an Apache-2.0 self-hosting runtime. It can create a local project, plan and commit a supported ReleaseSpec, run inline PostgreSQL migrations, serve PostgREST/RLS behavior, serve active-release static content, handle local storage objects and route manifests, execute trusted local functions including durable function runs and single-node schedule triggers, run a narrow Astro SSR target, and import verified portable project archives.
Run402's wider product model treats people and agents as first-class participants: each acts through its own principal and authenticator, while explicit authority determines what it may do. Core supports the sovereignty side of that model by making a concrete application-runtime slice inspectable and portable. It does **not** currently reproduce the managed Cloud control plane, its human/agent principal graph, or its complete attribution history.
Operating interface
Use the Run402 CLI by default to operate supported Core targets. Use the typed SDK for programmatic TypeScript/JavaScript workflows; MCP is a thin adapter for tool-native hosts. The API remains the supported integration foundation. A shared client does not imply every Cloud capability exists in Core: inspect the target's capability document first.
The setup, conformance and native package examples below intentionally use Docker, npm, HTTP probes and runtime code where those are the operation being taught. They are not competing Cloud first-deploy recipes.
What Is Here Today
- packages/functions - @run402/functions, the helper library for deployed Run402 functions.
- packages/release - @run402/release, the release manifest semantics package.
- packages/runtime-kernel - public Core runtime contracts and application services.
- apps/core-gateway - public Core gateway composition root.
- docker-compose.yml - local Core, Postgres, and PostgREST stack.
- fixtures/runtime-kernel-static-rest - canonical static + Postgres/RLS conformance fixture.
- fixtures/storage-routing-core - canonical storage + static routing conformance fixture.
- CI for clean install, lint, build, tests, tarball verification, boundary checks, Compose boot, and Core conformance.
What Is Not Here Yet
This repo is not a complete production self-hosted Run402 distribution. It does not include Cloud's principal and organization authority graph, human control-plane login, grants and grant keys, Buzz control-plane lifecycle, complete action-time attribution history, fleet scheduling, Aurora operations, global routing, Cloud billing operations, managed abuse controls, managed backups, monitoring, compliance automation, TLS automation, HA, custom domains, arbitrary dependency installation, hostile multi-tenant code isolation, or Cloud import back into managed Run402.
The promise of this slice is smaller and concrete: the supported Core runtime path is public, buildable, testable, and suitable for Run402 Cloud to consume or verify directly.