Architecture
Carbon is best understood as a compiler pipeline.
Ingestion → Parser → IR → Behavior Graph → State Engine → RuntimeIngestion
Section titled “Ingestion”Accepts OpenAPI, Swagger, AsyncAPI, Protobuf, gRPC service definitions, GraphQL, HAR, Postman collections, and observed traffic. Ingestion is the only stage where Carbon can use AI, and only to enrich resource inference and relationship detection.
Parser
Section titled “Parser”Each input format is normalized into a single Intermediate Representation (IR). The IR is deliberately minimal: endpoints, resources, params, responses, relationships.
Behavior Graph
Section titled “Behavior Graph”The IR is compiled into a Behavior Graph describing resources, ownership, transitions, and constraints. This is Carbon’s most valuable derived asset.
State Engine
Section titled “State Engine”The behavior graph drives a deterministic State Engine. Reads reflect writes, transactions roll back, and snapshots capture the entire state atomically.
Runtime
Section titled “Runtime”A Fastify shell exposes the graph as a live HTTP API. Request handling is compiled to O(1) lookups, so the hot path does not traverse the graph or call AI.