Phase 0 Contracts (North Star Bootstrap)
FleetForge Phase 0 codifies the primitives shared by delivery, policy, replay, and upcoming adapters. Treat this document as the companion to the new embedded schemas and storage defaults—every surface (runtime, SDKs, UI, adapters) should defer to these definitions.
Canonical Schemas
api/schemas/run_spec.json— Run submission contract (DAG + inputs + seed + labels + breakpoints). Reference. The runtime rejects specs that do not validate against this schema or that omit a positiveseed.api/schemas/step.json— Step schema (reference) covering all step types.api/schemas/run.json&run_event.json— Serialized run records and event envelopes (reference / run_event). Useful for SDK taps, ClickHouse exporters, and replay tooling.api/schemas/artifact.json— Metadata contract for blobs persisted to the object store (reference).api/schemas/agent_run.json— Adapter envelope for LangGraph/AutoGen/CrewAI integrations (reference). The newAgentRunAdaptertrait incore/runtime/src/adapters.rsproduces data that must validate against this schema.
👉 Docs and SDK generators should link to these files instead of duplicating schema snippets.
Storage Bootstrap
- Postgres migrations live under
core/storage/migrations/. Runningsqlx migrate run(orjust db-migrate) installs the baseline run/step/artifact tables required for Phase 0. - Object store layout uses a content-addressable prefix:
sha256/<first-byte>/<second-byte>/<full-digest>. Seecore/storage/src/lib.rs::ObjectStoreArtifactStore::path_for_digestfor the canonical mapping. - Retention workers and SQLx offline data remain unchanged;
just demoprimes the schema and object store in local environments.
Telemetry Bootstrap
- The OTEL Collector profiles at
deploy/otel/collector.local.yaml(local) anddeploy/compose/otel-collector-config.yaml(full stack) are the supported Phase 0 entry points. - Runtime binaries emit OTLP traces/metrics/logs; export
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317(or your collector endpoint) before launching the runtime to capture spans immediately. - ClickHouse remains the default sink for run/step telemetry. The collector configs
fan OTLP traffic into ClickHouse via the community exporter—ensure the
telemetrydatabase exists before bootstrapping.
Adapter Scaffolding
core/runtime/src/adapters.rsintroducesAgentRunAdapter,AgentRunContext, andAgentRunEnvelope. Default implementations produce schema-compliant envelopes forstart,emit,checkpoint,complete, anderror.- Framework adapters should construct payloads/checkpoints that serialise to JSON and
rely on
AgentRunEnvelope::validate()during development to catch schema drift. - The runtime re-exports these types so SDKs/adapters can depend on
fleetforge-runtimewithout pulling in unrelated modules.
Acceptance Checklist
- Run submission fails fast if the run spec (or seed) violates the new schema.
- The LangGraph Hello Fleet DAG (
examples/_packs/demo-pack/agent_team/run_spec.json) runs locally, persisting run/step rows and emitting OTEL spans via the collector configs above. - Artifact uploads land under the content-addressed prefix (inspect via
just demo+ the toolbox worker). - Adapter scaffolding validates envelopes against
agent_run.json, ensuring the planned LangGraph/AutoGen/CrewAI integrations speak the same protocol.