# Active Graph

> An event-sourced reactive graph runtime for long-running, auditable, agentic systems.

Active Graph is an event-sourced reactive graph runtime for
long-running, auditable, agentic systems. Behaviors react to
events, mutate a shared graph, and emit more events; the
event log is the source of truth, so every run is replayable,
forkable, and diff-able from its log. Install with
`pip install activegraph` and run `activegraph quickstart`
for the bundled fixture-backed demo.


## Quickstart

- [Quickstart](https://docs.activegraph.ai/quickstart/index.md): Ten-minute tutorial from install to a working custom behavior; ends with the fork-and-diff workflow.

## Concepts

- [Graph](https://docs.activegraph.ai/concepts/graph/index.md): Objects and typed relations forming the world the framework reasons about; the graph is a projection of the event log.
- [Type system](https://docs.activegraph.ai/concepts/type-system/index.md): The three type layers — framework-defined event types, developer-defined object and relation types — and the patch-lifecycle states.
- [Events](https://docs.activegraph.ai/concepts/events/index.md): The append-only history — every behavior fires in response to events and produces more events.
- [Behaviors](https://docs.activegraph.ai/concepts/behaviors/index.md): The unit of reactive code — function, class, or LLM-backed — with a per-behavior determinism contract.
- [Relations](https://docs.activegraph.ai/concepts/relations/index.md): Typed edges with their own behaviors; coordination logic on the edge rather than on either endpoint.
- [Patches](https://docs.activegraph.ai/concepts/patches/index.md): Proposed mutations with optimistic concurrency; rejections are events in their own right.
- [Views](https://docs.activegraph.ai/concepts/views/index.md): Scoped reads of the graph for behavior context — type, depth, and recent-event windows.
- [Frames](https://docs.activegraph.ai/concepts/frames/index.md): Bounded contexts for a run — goal, constraints, budget, registered behaviors.
- [Pattern subscriptions](https://docs.activegraph.ai/concepts/patterns/index.md): Cypher-subset pattern subscriptions for subscribing to graph shapes, with `NOT EXISTS` and temporal predicates.
- [Policies](https://docs.activegraph.ai/concepts/policies/index.md): Approval and gating for behavior capabilities — which behaviors can call which tools, which mutations need human approval.
- [Replay](https://docs.activegraph.ai/concepts/replay/index.md): Re-execute a run from its event log; strict mode re-fires behaviors and fails on divergence.
- [Forking](https://docs.activegraph.ai/concepts/forking/index.md): Branch any run at any event into an independent fork; structurally diff the fork against the parent.
- [Failure model](https://docs.activegraph.ai/concepts/failure-model/index.md): A behavior failure is a `behavior.failed` event, not an exception; exceptions live at runtime entry points only.

## Guides

- [Operating in production](https://docs.activegraph.ai/guides/operating-in-production/index.md): Running Active Graph as a production service — observability, persistence, policies, budgets.
- [Authoring packs](https://docs.activegraph.ai/guides/authoring-packs/index.md): Authoring a pack — object types, behaviors, tools, prompts, and policies bundled for a domain.
- [Using the FalkorDB graph store](https://docs.activegraph.ai/guides/using-falkordb/index.md): Backing the materialized graph projection with FalkorDB — connection modes, env vars, and Cypher inspection.

## Cookbook

- [Common patterns](https://docs.activegraph.ai/cookbook/common-patterns/index.md): Recurring patterns — subscriptions, fork-with-set, approval flows — with copy-pasteable code.
- [Debugging](https://docs.activegraph.ai/cookbook/debugging/index.md): Reading a trace, isolating a behavior failure, replaying a divergent run.
- [Multi-run scripts](https://docs.activegraph.ai/cookbook/multi-run-scripts/index.md): Running many runs from one script — sweeps, A/B comparisons, batch fork-and-diff.
- [Migration from v0.7](https://docs.activegraph.ai/cookbook/migration-from-v0-7/index.md): Upgrade runbook for code and saved runs across milestones from v0.7 onward.

## Reference

- [CLI](https://docs.activegraph.ai/reference/cli/index.md): Full `activegraph` CLI reference — `quickstart`, `run`, `inspect`, `fork`, `pack`, and every flag.
- [LLM providers](https://docs.activegraph.ai/reference/llm-providers/index.md): AnthropicProvider and OpenAIProvider side-by-side surface; recorded-fixture replay, model defaults, limitations.
- [Reason codes](https://docs.activegraph.ai/reference/reason-codes/index.md): Stable reason-code taxonomy for behavior.failed, tool.responded errors, and failed LLM attempts.
- [Catalog overview](https://docs.activegraph.ai/reference/errors/index.md): Catalog overview of every error class — when it fires, what triggers it, where to look.
- [AmbiguousBehaviorError](https://docs.activegraph.ai/reference/errors/ambiguous-behavior-error/index.md)
- [AmbiguousToolError](https://docs.activegraph.ai/reference/errors/ambiguous-tool-error/index.md)
- [ApprovalNotFoundError](https://docs.activegraph.ai/reference/errors/approval-not-found-error/index.md)
- [BehaviorNotFoundError](https://docs.activegraph.ai/reference/errors/behavior-not-found-error/index.md)
- [CorruptedEventPayloadError](https://docs.activegraph.ai/reference/errors/corrupted-event-payload-error/index.md)
- [DuplicateEventError](https://docs.activegraph.ai/reference/errors/duplicate-event-error/index.md)
- [EventNotFoundError](https://docs.activegraph.ai/reference/errors/event-not-found-error/index.md)
- [IncompatibleRuntimeState](https://docs.activegraph.ai/reference/errors/incompatible-runtime-state/index.md)
- [InternalEvaluatorError](https://docs.activegraph.ai/reference/errors/internal-evaluator-error/index.md)
- [InvalidActivateAfter](https://docs.activegraph.ai/reference/errors/invalid-activate-after/index.md)
- [InvalidArgumentType](https://docs.activegraph.ai/reference/errors/invalid-argument-type/index.md)
- [InvalidPatchLifecycleState](https://docs.activegraph.ai/reference/errors/invalid-patch-lifecycle-state/index.md)
- [InvalidRuntimeConfiguration](https://docs.activegraph.ai/reference/errors/invalid-runtime-configuration/index.md)
- [InvalidStoreURL](https://docs.activegraph.ai/reference/errors/invalid-store-url-error/index.md)
- [InvalidToolRegistration](https://docs.activegraph.ai/reference/errors/invalid-tool-registration/index.md)
- [LLMBehaviorError](https://docs.activegraph.ai/reference/errors/llm-behavior-error/index.md)
- [MissingOptionalDependency](https://docs.activegraph.ai/reference/errors/missing-optional-dependency/index.md)
- [MissingProviderError](https://docs.activegraph.ai/reference/errors/missing-provider-error/index.md)
- [MissingToolError](https://docs.activegraph.ai/reference/errors/missing-tool-error/index.md)
- [NonSerializableEventError](https://docs.activegraph.ai/reference/errors/non-serializable-event-error/index.md)
- [PackConflictError](https://docs.activegraph.ai/reference/errors/pack-conflict-error/index.md)
- [PackNotFoundError](https://docs.activegraph.ai/reference/errors/pack-not-found-error/index.md)
- [PackSchemaViolation](https://docs.activegraph.ai/reference/errors/pack-schema-violation/index.md)
- [PackVersionConflictError](https://docs.activegraph.ai/reference/errors/pack-version-conflict-error/index.md)
- [ReplayDivergenceError](https://docs.activegraph.ai/reference/errors/replay-divergence-error/index.md)
- [RuntimeContextRequiredError](https://docs.activegraph.ai/reference/errors/runtime-context-required-error/index.md)
- [SchemaVersionMismatch](https://docs.activegraph.ai/reference/errors/schema-version-mismatch/index.md)
- [ToolError](https://docs.activegraph.ai/reference/errors/tool-error/index.md)
- [ToolNotFoundError](https://docs.activegraph.ai/reference/errors/tool-not-found-error/index.md)
- [UnknownToolError](https://docs.activegraph.ai/reference/errors/unknown-tool-error/index.md)
- [UnsupportedPatternError](https://docs.activegraph.ai/reference/errors/unsupported-pattern-error/index.md)
- [Overview](https://docs.activegraph.ai/reference/api/index.md): API reference overview — Runtime, Graph, Behaviors, Tools, Store, Packs, Errors, Observability.
- [Runtime](https://docs.activegraph.ai/reference/api/runtime/index.md)
- [Graph](https://docs.activegraph.ai/reference/api/graph/index.md)
- [Behaviors](https://docs.activegraph.ai/reference/api/behaviors/index.md)
- [Tools](https://docs.activegraph.ai/reference/api/tools/index.md)
- [Store](https://docs.activegraph.ai/reference/api/store/index.md)
- [Packs](https://docs.activegraph.ai/reference/api/packs/index.md)
- [Errors](https://docs.activegraph.ai/reference/api/errors/index.md)
- [Observability](https://docs.activegraph.ai/reference/api/observability/index.md)
- [Diligence pack](https://docs.activegraph.ai/reference/api/packs/diligence/index.md)

## Optional

- [Changelog](https://docs.activegraph.ai/about/changelog/index.md): Per-release changelog v0 through v1.0.5, with migration notes.
- [Publishing a release](https://docs.activegraph.ai/about/publishing/index.md): How to cut a release — version bump, tagging, PyPI publish, doc-site deploy.

