Skip to content

Manifest Pipeline

How build_agent(manifest, deps) turns a parsed manifest into a runnable Agent. Source: packages/harness/src/felix/manifests/builder.py in felix-run/felix.

Inputs

Manifests use apiVersion: felix/v1, kind: Agent (Pydantic v2, extra=forbid). Request handlers resolve the document first (tenant Postgres active version → bundled YAML under manifests/), then pass the Manifest object into the builder.

BuildDeps carries the ToolProvider, optional auth, session store/strategy, object store, settings, and sub-agent builder (tests stub children here).

Build steps

  1. Validate — re-check schema + cross-field rules (single vs multi-agent, pattern registry kind, durable + checkpointer constraints).

  2. System prompt — join soul (if enabled) + system_prompt.base + inline, then append activated skills.

  3. Skills — load SKILL.md metadata; fold declared tools/MCP/peers; apply per-tenant activation overlay (restriction-only).

  4. External tools — bind MCP servers (server__tool), A2A peers (peer__name), sandboxes, containers, queues (Valkey/Redis lists), browser tools (Playwright extra). Bind failures are logged; the rest of the agent still builds.

  5. Sub-agents / local tools — multi-agent patterns build children; single-agent resolves spec.tools from the provider. Auto-inject memory / procedural / fetch_artifact when enabled. pattern: deep injects plan tools before governance so they are gated like everything else.

  6. Governance pipeline (innermost → outermost on the call path):

    secret masking → policies → command screening → content screening
    → limits → guardrails → LLM judges → approvals → (artifact spill)

    See governance.

  7. Pattern dispatchget_pattern(spec.pattern) from the open registry (react, deep, router, parallel, groupchat, reflect, plan_execute, plus any registered plugins).

  8. Durable wrap — when spec.execution.mode: durable, wrap so invoke enqueues a fiber (or Temporal run) and returns a resume token.

Session + memory at build time

Concern Resolution
Checkpointer memory.checkpointer → resolved through the checkpointer registry: postgres (default), none, or a plugin-registered store
Strategy session.strategyfull_replay / windowed:N / summarizing:N / semantic:N / compacting
Long-term memory memory.store{pgvector, memory} injects remember/recall tools
Artifacts Large tool outputs spill to the object store; fetch_artifact is injected

Caching

Routers may cache a built Agent per resolved manifest version/cache key so repeated hits skip rebuild. Tenant activate/rollback changes the active pointer and forces a fresh build. Prefer getting started for local iteration against bundled manifests.

Unknown spec.pattern fails the build with the registered pattern list — register custom patterns before the first agent build (composition / plugin load).