An industry-grade reference implementation of the Agentic Contract Model (ACM) v0.5 - A SpecβFirst Contract Layer and Open Reference Runtime for Agentic Systems, delivering contract-first planning, deterministic execution, and replayable decision memory across AI agent stacks. This monorepo hosts the canonical Node.js implementation, specification artifacts, and cross-language architecture guidance.
π’ ACM v0.5 introduces fully typed capability maps, resumable execution, nucleus-governed LLM usage, and replay bundles engineered for regulated environments.
- Why ACM?
- Feature Highlights
- Documentation Index
- Monorepo at a Glance
- Package Matrix
- Quick Start
- Plan β Execute β Replay Flow
- Architecture Overview
- Governance & Compliance
- Roadmap
- Contributing
- Resources & Support
- License
Traditional agent stacks mix stochastic planning with imperative code, making audits and safety reviews brittle. ACM adds a contract layer that binds plans, tools, tasks, and policies into versioned artifacts so you can:
- β Prove compliance β Ship append-only ledgers, guard evaluations, and replay bundles for every run.
- β Control tool access β Curate capabilities and tool envelopes planners may target.
- β Standardize planning β Preserve planner alternatives, rationale, and prompt hashes for reproducibility.
- β Resume safely β Checkpoint deterministic runtime progress and restart mid-plan.
- β Integrate anywhere β Bridge ACM contracts to LangGraph, Microsoft Agent Framework, MCP servers, or custom runtimes with minimal glue.
The framework follows the ACM specification, treating Goal, Context Packet, Plan, Capability, Task, Tool, Policy, and Ledger as first-class artifacts.
| Pillar | What You Get | Key Packages |
|---|---|---|
| Contract-First SDK | Typed contracts for tools, tasks, capabilities, ledger entries, guard expressions, policy hooks, and verification adapters. | @ddse/acm-sdk |
| Structured Planning | Multi-plan generation with rationale, prompt digests, tool-call envelopes, and deterministic selectors. | @ddse/acm-planner |
| Deterministic Runtime | Guard evaluation, policy gates, retries/backoff, checkpointing, streaming sinks, and ledger emission. | @ddse/acm-runtime |
| High-Level Orchestrator | Single-call helper that wires planner, runtime, nucleus, context providers, and adapters. | @ddse/acm-framework |
| Adapters & Integrations | LangGraph / Microsoft Agent Framework bridges plus Model Context Protocol tooling. | @ddse/acm-adapters, @ddse/acm-mcp |
| Replay & Analysis | Export/import replay bundles with ledger verification and tool-call inspection. | @ddse/acm-replay |
| Reference Experiences | Deterministic demos and a production-style AI coding assistant with budgeting and streaming UX. | @ddse/acm-examples, @ddse/acm-aicoder |
- π Specification: ACM Spec v0.5
- π§ Architecture Narrative: framework/architecture.md
- ποΈ Implementation Plans: framework/node/docs/tdr/
- βοΈ Framework Guide: framework/node/README.md
- π§Ύ Use Cases & Capability Map:
ACM Usecases and Capabilities.md - π Whitepaper: WHITEPAPER.md
- π§ͺ Testing Strategy: framework/node/TESTING.md
- π Getting Started: framework/node/GETTING_STARTED.md
acm/
βββ README.md # This document
βββ LICENSE # MIT license for the project
βββ spec/ # ACM specifications and rationale
βββ framework/
β βββ architecture.md # Cross-language architecture blueprint
β βββ node/ # Node.js reference implementation (pnpm workspace)
β βββ java/, python/ # Language ports (under active development)
βββ WHITEPAPER.md # Strategic positioning and vision
| Package | Description | Status |
|---|---|---|
@ddse/acm-sdk |
Base contracts, registries, policy/verification interfaces, ledger types. | β Stable @ v0.5.0 |
@ddse/acm-runtime |
Deterministic runtime, checkpointing, resumable execution, guard evaluation. | β Stable @ v0.5.0 |
@ddse/acm-planner |
Structured LLM planner with plan alternatives, prompt hashing, tool envelopes. | β Stable @ v0.5.0 |
@ddse/acm-framework |
High-level faΓ§ade combining planner + runtime + nucleus wiring. | β Stable @ v0.5.0 |
@ddse/acm-llm |
OpenAI-compatible clients for Ollama, vLLM, and custom providers. | β Stable @ v0.5.0 |
@ddse/acm-adapters |
LangGraph/MSAF adapters preserving ACM contracts. | β Stable @ v0.5.0 |
@ddse/acm-mcp |
Model Context Protocol tooling and registries. | β Stable @ v0.5.0 |
@ddse/acm-replay |
Replay bundle export/import, ledger validation utilities. | β Stable @ v0.5.0 |
@ddse/acm-examples |
CLI demos, refund/issue flows, replay bundle samples. | β Stable @ v0.5.0 |
@ddse/acm-aicoder |
Developer assistant with streaming TUI and budgeting. | β Stable @ v0.5.0 |
Language Ports: Python and Java bindings follow the same specification and architecture; see
framework/python/andframework/java/for progress trackers.
git clone https://github.com/ddse-foundation/acm.git
cd acm/framework/node
pnpm install
pnpm build# Refund workflow demo with vLLM (tested with Qwen)
pnpm --filter @ddse/acm-examples demo -- --provider vllm --model Qwen/Qwen3-Coder-30B-A3B-Instruct-FP8 --base-url http://localhost:8001/v1 --goal refund
# Export a replay bundle while running the issue-resolution flow
pnpm --filter @ddse/acm-examples demo -- --goal issues --save-bundle --checkpoint-dir ./checkpointspnpm --filter @ddse/acm-aicoder demo \
--provider vllm \
--model Qwen/Qwen3-Coder-30B-A3B-Instruct-FP8 \
--base-url http://localhost:8001/v1 \
--workspace $PWD/../../import { ACMFramework, ExecutionEngine } from '@ddse/acm-framework';
import { SimpleCapabilityRegistry, SimpleToolRegistry } from '@ddse/acm-examples/registries';
import { createVLLMClient } from '@ddse/acm-llm';
import { MemoryLedger } from '@ddse/acm-runtime';
const registry = new SimpleCapabilityRegistry();
const tools = new SimpleToolRegistry();
const llm = createVLLMClient('Qwen/Qwen3-Coder-30B-A3B-Instruct-FP8', 'http://localhost:8001/v1');
const framework = ACMFramework.create({
capabilityRegistry: registry,
toolRegistry: tools,
nucleus: {
call: llm.generateWithTools!,
llmConfig: {
provider: llm.name(),
model: 'Qwen/Qwen3-Coder-30B-A3B-Instruct-FP8',
temperature: 0.1,
baseUrl: 'http://localhost:8001/v1',
},
allowedTools: tools.listNames(),
},
planner: { planCount: 2 },
execution: { engine: ExecutionEngine.ACM, checkpointInterval: 1 },
});
const ledger = new MemoryLedger();
const run = await framework.execute({
goal: 'Resolve a priority refund ticket for order 1234.',
context: { facts: { orderId: '1234', severity: 'P1' } },
ledger,
});
console.log(run.plan.id);
console.log(run.execution.outputsByTask);- Normalize Goal & Context β IDs, provenance, and scope metadata are enforced before planning.
- Structured Planning β
@ddse/acm-plannergenerates multiple plan candidates with rationale, tool envelopes, and prompt hashes recorded in the ledger. - Policy-Aware Execution β
@ddse/acm-runtimeexecutes the selected plan, evaluates guards, invokes policy and verification hooks, and checkpoints progress. - Ledger & Replay β Every planner and runtime decision streams into the
MemoryLedger, enabling replay bundle export via@ddse/acm-replayfor audits, testing, or regression harnesses. - Adapters & Integrations β Optional hooks route execution through LangGraph/MSAF engines or hydrate context via MCP tools without breaking ACM contracts.
- Three-Layer Intent: Planner (reasoning), Framework (coordination), Runtime (deterministic execution) β see framework/architecture.md.
- Nucleus Gateway: Centralized LLM governance with prompt hashing, deterministic tool allow-lists, and streaming support.
- External Context Provider Adapter: Bridges nucleus context directives (
request_context_retrieval) to developer-owned retrieval tools. - Decision Memory: Append-only ledger + checkpoints produce tamper-evident replay bundles for compliance and analytics.
- Interoperability: Adapters maintain parity with popular agent ecosystems while preserving ACM guarantees.
Refer to the sequence diagrams in framework/architecture.md for deep dives.
- Policy Engine Hooks β Connect Open Policy Agent (OPA/Rego) or custom evaluators via
PolicyEngineinterfaces. - Verification Grammar β Enforce acceptance criteria separate from task logic through
VerificationEngineadapters. - Tool & Capability Certification β Registry-driven capability maps ensure planners only target approved execution paths.
- Replay Bundles β Capture planner outputs, runtime telemetry, policies, and checkpoints in one exportable artifact.
- Audit Trails β Ledger entries include plan IDs, guard outcomes, retries, verification results, and tool-call digests.
Runbook for resumable execution lives in framework/node/docs/tdr/RUNBOOK_RESUMABLE.md.
- β v0.5.0 (Current) β Contract-complete Node implementation, resumable runtime, replay bundles, MCP integration, AI Coder experience.
- π§ Python Port β Tracking in
framework/python/with parity milestones. - π§ Java Port β Tracking in
framework/java/aligned to the same spec artifacts. - π§ Future β Unified CLI (
@ddse/acm-cli), extended verification grammars, hosted replay dashboards.
Detailed plans live in:
We welcome contributions across contracts, runtime, adapters, and language ports.
- Read the Contribution Guide for branching, coding standards, and CI tasks.
- Explore framework/node/TESTING.md to understand per-package test surfaces.
- Bug reports and feature ideas belong in GitHub Issues.
Before submitting a PR, run pnpm build from framework/node/ to ensure cross-package builds succeed.
- π Examples: framework/node/packages/acm-examples/
- π§βπ» AI Coder Docs: framework/node/packages/acm-aicoder/docs/
- π Adapters: framework/node/packages/acm-adapters/
- π§ LLM Gateway: framework/node/packages/acm-llm/
- π Change Log: framework/node/CHANGELOG.md
- π Questions? Open a discussion or ping the maintainers via GitHub Issues.
This project is licensed under the MIT License.
Author: Mahmudur R. Manna β Founder & Principal Architect, DDSE Foundation (Dhaka, Bangladesh)