Foundry Service
Defines, starts, and stops agents — always-on ones as harness Deployments, swarm members as Jobs — and gives people and agents the same tools to build new ones.
Foundry: The service that owns agents: each one's definition, the tools it is granted, and whether it is running. People and agents build new agents through the same Foundry tools. owns agent definitions, start and stop, the wake inbox, and the harness process. Persistent agents are the list you edit in the intelligence-app Foundry workspace. Ephemeral members belong to a swarm or a coding run, and only an agent creates one. You reach them from the Ephemeral tab of the agent that spawned them, where they can be stopped and started.
A person in the Flow Intelligence Desktop App and an agent granted the Foundry tools can also create, edit, start, and stop agents, through the same API the console uses.
- Domain
- Services
- Kind
- Go HTTP service
- Lifecycle
- Active
- flowctl project
- None
- Stacks
- Runs on its own
- Source
- services/foundry
Run it locally
Port 8128, Dev Auth, create, start, and wake.
Architecture
Lifetime, run type, Deployments versus Jobs, and the wake loop.
Building and managing agents
The nine Foundry tools, what a builder agent can do, and building one from the Flow Intelligence Desktop App.
API
Agents, skills, harnesses, swarm, wake, inbox, and runs.
Daily briefs
One morning job writes the CEO brief for AJ Nead, Sara Garner, Ilan, and Adam Neumann and stores the text.
Operations
Local processes, shared images, separate deployments, and rollout.
Lifetime × run type
on_demand | always_on | |
|---|---|---|
persistent | No pod. POST /v1/agents/on-demand/{slug} with a Cloudflare JWT and a one-time secret | Deployment up; comms / manual / dream / harvest |
ephemeral | Spawn for the call, then expire | Runs the task, then the harness stops and status becomes expired |
The workspace creates persistent agents only. An ephemeral agent comes from a swarm spawn or
spawn_coding_agent.
Diagram source
flowchart LR
UI["intelligence-app Foundry"]
API[foundry-api]
Persist["always-on Deployment"]
Call["POST /v1/agents/on-demand/slug"]
Ephem["harness Job"]
Intel[intelligence]
Comms[communications]
UI -->|"list edit start restart delete"| API
API -->|"always-on start"| Persist
Caller -->|"JWT plus one-time secret"| Call
Call --> API
Persist -->|"spawn swarm"| API
API -->|"ephemeral up then down"| Ephem
Persist --> Intel
Ephem --> Intel
Persist --> Comms
Ephem --> Comms
Comms -->|"POST wake"| APIWhat it owns
- Agent rows (
lifetime,run_type, assignment, generation, desired state, model, harness, tools, uniqueslug) - The skill catalog (name, category, versions,
document_id). Bytes stay in documents - The tool catalog, what each harness can run, and each agent's grants. An empty grant list still keeps the harness's always-granted tools
- The wake inbox, run history, and harness log lines (
started,heartbeat,wake,error,skill,info,warn) - Starting and stopping the harness pinned on the agent (local process or cluster Deployment / Job)
- Optional comms link stored as
conversation_id - Its own audit log (
GET /v1/audit): one sentence per agent or skill event, written from the outbox
What it does not own
LLM keys (broker). Comms keys (communications). Intelligence claims.
services/agents and frontend/agents-app were removed. Foundry is the path.
See ADR 0046.
Canonical service README: services/foundry/README.md.