Flow
ServicesFoundry Service

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

Lifetime × run type

on_demandalways_on
persistentNo pod. POST /v1/agents/on-demand/{slug} with a Cloudflare JWT and a one-time secretDeployment up; comms / manual / dream / harvest
ephemeralSpawn for the call, then expireRuns 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. Text representation: 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"| API
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"| API

What it owns

  • Agent rows (lifetime, run_type, assignment, generation, desired state, model, harness, tools, unique slug)
  • 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.

On this page