Phase 5 – Adapter Integrations
Phase 5 wires the FleetForge runtime to the first official adapter surface: LangGraph. Agent authoring teams can now bring existing LangGraph graphs into FleetForge without rewriting code, while still inheriting policy, budget, and replay guarantees.
Highlights
- New step type
agent– DAG steps may now declare"type": "agent"with inputs specifying a LangGraph entrypoint, initial state, and optional Python execution settings. The runtime invokesfleetforge.langgraph_adapter.runnerunder the hood, streaming LangGraph events into the AgentRun contract. - LangGraph agent executor –
LangGraphAgentExecutorshells out to Python, captures streaming events/checkpoints, and persists them as tool events so runs enjoy guardrails, cost budgets, and deterministic replay (checkpoint snapshots are recorded alongside outputs). - Adapter runner (
python -m fleetforge.langgraph_adapter.runner) – shared utility that loadsmodule:callableentrypoints, streams events, and returns JSON envelopes consumable by the runtime or custom tooling. - SDK updates – the TypeScript SDK now exposes
checkGate,recordGateFollowup, andlistGates(Phase 4) as well as the LangGraph helper module; Phase 5 leans on these to mirror adapter telemetry.
Acceptance Criteria
agentsteps execute LangGraph graphs with the same policy/budget/replay semantics as other step types.- Guardrails evaluate on ingress/egress for adapter payloads (PII, budgets, policy packs) and redactions propagate to stored events/artifacts.
- Checkpoints captured via LangGraph adapters feed deterministic replays: step attempts persist checkpoint JSON and run events reflect adapter emissions.
- Tooling/CLI/docs describe the new
agentstep shape and runner usage.
Usage Notes
-
Required input fields:
{
"type": "agent",
"inputs": {
"entrypoint": "my.app.graph:create_graph",
"initial_state": { "task": "Brief" },
"python": { "executable": "python3", "path": ["."] }
},
"policy": { "guardrails": ["redact_pii"], "budget": { "tokens": 250 } }
} -
inputs.initial_stateis the preferred state key;inputs.stateremains accepted for existing integrations and is aliased toinitial_stateby the runtime. -
inputs.adapterselects the adapter backend (langgraph,autogen, orcrewai). Useinputs.adapter_inputsto pass framework-specific parameters (for example,{ "task": "draft brief" }for AutoGen or{ "inputs": {...} }for CrewAI). The runtime shells out viapython -m fleetforge.agent_adapter.runner --adapter <kind>so every adapter reuses the same capability token and provenance plumbing. -
The runtime honours
python.venv,python.path,env, andnamespace(checkpoint namespace) if supplied. -
tokio::processexecutes the adapter; long-running graphs should supply a LangGraph checkpointer so FleetForge captures durable checkpoints. -
sqlx migrate runremains required (Phase 4 introducedchange_gates; no additional migrations land in Phase 5).