Skip to main content

Chassis

CI PyPI Python License Docs

Chassis is a transactional runtime composition layer for dynamic agent systems.

It owns the runtime environment in which agents execute — plugins, capabilities, scoped resources, reversible effects, immutable runtime generations, policy, budgets, secrets, configuration, diagnostics, and observability metadata — and hands an immutable view of that environment to an execution engine.

Composition may change over time; every in-flight run stays pinned to the immutable runtime generation it started with. LangGraph is the first-class execution engine mounted within Chassis. Chassis is not a graph framework.

Install

pip install chassis-harness                       # the core lifecycle kernel
pip install "chassis-harness[langgraph]"          # the LangGraph adapter
pip install "chassis-harness[langsmith]"          # LangSmith telemetry + evaluation
pip install "chassis-harness[langgraph,langsmith]"

Python 3.12+. The import package is chassis.

The core has no dependency on langgraph, langchain-core, or langsmith: importing chassis, the plugin lifecycle, generations, budgets, and diagnostics all work without them. The extras add the LangGraph adapter, the langchain-core test doubles, and the LangSmith backend; using an integration whose extra is missing raises a MissingExtraError that names the extra to install.

Quickstart

from chassis import MODEL, Harness
from chassis.langgraph import AgentDefinition, GraphBuildInputs, LangGraphAgent
from chassis.runtime import HarnessRunContext

harness = Harness(name="quickstart")
harness.provide(MODEL, my_chat_model)                      # a langchain-core chat model
harness.register_agent(
    LangGraphAgent(
        AgentDefinition(name="research-agent", version="1", state_schema=ChatState, build=build_agent),
        checkpointer=InMemorySaver(),
    )
)

async with harness:
    result = await harness.agents.invoke(
        "research-agent", {"messages": [HumanMessage("hi")]}, thread_id="thread-1"
    )
    print(result.text, result.generation_id)        # hello … gen_0001

A run acquires one immutable generation and keeps it: swapping a provider publishes a new generation without mutating the environment underneath an in-flight run.

The LangGraph quickstart needs the adapter extra: pip install "chassis-harness[langgraph]".

Runnable end to end — no credentials, scripted model, asserts its own output:

uv run python examples/quickstart.py

Full walkthrough: docs/getting-started.md.

A plugin in ten lines

from chassis import DATABASE, PluginContext, plugin
from chassis.tools import ToolPolicy

@plugin(name="web-search", version="1.0.0", provides={"tools": "1.0.0"}, requires={"database": ">=1,<2"})
async def web_search(ctx: PluginContext) -> None:
    store = ctx.require(DATABASE)                       # resolved for this composition
    ctx.tools.register(search_tool, policy=ToolPolicy(permissions=("network.fetch",)))
    ctx.create_task(warm_cache(store), name="cache-warmer")

No activation logic, no deregistration calls, no task bookkeeping: the harness orders plugins by declared capabilities, owns every effect through the plugin's scope, and cancels its tasks on unload.

The core proposition

Chassis allows agent runtime composition to change over time while active runs retain a coherent environment, dependencies react correctly, resources have explicit ownership, and obsolete components are disposed only when they are no longer reachable.

Guarantees and deliberate absences states what that buys you, and what Chassis refuses to promise.

What Chassis is not

  • not a graph engine — LangGraph owns graph execution and durability;
  • not a replacement for langchain-core models, tools, or runnables;
  • not a replacement for LangSmith tracing or experiment management;
  • not a sandbox — in-process Python plugins are trusted code, and policy is not presented as isolation;
  • not a system that claims deterministic replay of arbitrary clocks, networks, databases, or external services.

Status

Pre-1.0 (0.2.0). The surface covered by tests/test_public_api.py may break in a minor release; every break is recorded in CHANGELOG.md, and migrations lists the 0.1 → 0.2 changes.

Development

Chassis uses uv as its canonical project manager. Python ≥ 3.12 is required.

uv sync
uv run pytest
uv run ruff check .
uv run ruff format --check .
uv run pyright
uv build

pyproject.toml and uv.lock are the canonical dependency state. Do not introduce alternative project managers or parallel requirements.txt files.

Releasing

  1. record the change in CHANGELOG.md under a ## [x.y.z] heading;
  2. bump version in pyproject.toml to the same number;
  3. tag and push: git tag vX.Y.Z && git push origin vX.Y.Z.

.github/workflows/release.yml runs the full check suite, then refuses to build unless the tag, the project version, and the changelog agree; it builds the distribution, installs the wheel into a clean environment, runs the quickstart against it, and publishes through PyPI trusted publishing (no token is stored). workflow_dispatch verifies all of that without publishing.

Examples

uv run python examples/quickstart.py                  # smallest useful app
uv run python examples/basic_agent.py                 # LangGraph agent end to end
uv run python examples/reactive_cascade.py            # database → memory → extension
uv run python examples/safe_provider_replacement.py   # generations across a provider swap

Each example asserts what it prints, so running it verifies the behaviour. The test suite runs all of them.

Documentation

Layout

src/chassis/
  core/          scopes, effects, generations, errors
  capabilities/  versioned contracts, provider registry, snapshots
  plugins/       manifests, author API, resolver, registry
  hooks/         scope-owned hook registry
  tasks/         scope-owned background work
  tools/         tool registry and the execution boundary
  policy/        permissions and the evaluation boundary
  budget/        hierarchical budget governor
  secrets/       providers and redaction
  langgraph/     agent definitions, graph cache, LangGraph runtime
  telemetry/     instrumentation protocol, LangSmith, recording
  persistence/   canonical hashing and runtime snapshots
  replay/        bounded record/replay
  config/        declarative configuration and reconciliation
  testing/       TestHarness and fakes

Contributing

Issues and pull requests are welcome. Start with CONTRIBUTING.md for the gates a change must pass and what a reviewable commit looks like. Questions belong in Discussions; security reports go through private advisories instead of a public issue — see SECURITY.md for what is in scope.

License

Apache-2.0 — see LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chassis_harness-0.2.0.tar.gz (295.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chassis_harness-0.2.0-py3-none-any.whl (144.6 kB view details)

Uploaded Python 3

File details

Details for the file chassis_harness-0.2.0.tar.gz.

File metadata

  • Download URL: chassis_harness-0.2.0.tar.gz
  • Upload date:
  • Size: 295.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for chassis_harness-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d1f40b30cf28d8acd4cc2877d5edaf02b94b11f22bbca3bde196680539abaeec
MD5 c18bdc10e50a92da2a6d6806cb4dad7c
BLAKE2b-256 aef93ca9835bbc85a7df18a674453402c12e0511c2f09ada86f8278bf8d9aa57

See more details on using hashes here.

Provenance

The following attestation bundles were made for chassis_harness-0.2.0.tar.gz:

Publisher: release.yml on andreolli-davide/chassis

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file chassis_harness-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: chassis_harness-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 144.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for chassis_harness-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eab9fde9ffcacb9b0d05ea80ffcd4bf4e7f206829d944b12bf924e167288fb59
MD5 f4cedb0c57c2a98279e9ed61823de409
BLAKE2b-256 cfd4aa6c20e88dd22c5b7a9fa35c5f937e0c1f081dc0f5c65a9ff2e9576f9458

See more details on using hashes here.

Provenance

The following attestation bundles were made for chassis_harness-0.2.0-py3-none-any.whl:

Publisher: release.yml on andreolli-davide/chassis

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.5.0

2 files

0.4.1

2 files

0.4.0

2 files

0.3.0

2 files

This release

0.2.0 This release

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page