Skip to main content

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 invokes fleetforge.langgraph_adapter.runner under the hood, streaming LangGraph events into the AgentRun contract.
  • LangGraph agent executorLangGraphAgentExecutor shells 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 loads module:callable entrypoints, streams events, and returns JSON envelopes consumable by the runtime or custom tooling.
  • SDK updates – the TypeScript SDK now exposes checkGate, recordGateFollowup, and listGates (Phase 4) as well as the LangGraph helper module; Phase 5 leans on these to mirror adapter telemetry.

Acceptance Criteria

  • agent steps 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 agent step 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_state is the preferred state key; inputs.state remains accepted for existing integrations and is aliased to initial_state by the runtime.

  • inputs.adapter selects the adapter backend (langgraph, autogen, or crewai). Use inputs.adapter_inputs to pass framework-specific parameters (for example, { "task": "draft brief" } for AutoGen or { "inputs": {...} } for CrewAI). The runtime shells out via python -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, and namespace (checkpoint namespace) if supplied.

  • tokio::process executes the adapter; long-running graphs should supply a LangGraph checkpointer so FleetForge captures durable checkpoints.

  • sqlx migrate run remains required (Phase 4 introduced change_gates; no additional migrations land in Phase 5).