Public
Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md

ABH — Agentic Business Harness

CI License: MIT

English | 简体中文

ABH is a runtime harness for AI agents that do real work in a business. An agent answering questions can rely on itself; the moment it spends money, calls external services, or acts on someone's behalf, the business needs to know who authorized it, what it is allowed to do, what it actually did, and how to recover when something breaks halfway. ABH wires those answers into the runtime itself, and stays domain-neutral so any line of business can build on it.

The repo is a pnpm workspace monorepo: a contract layer, a core engine, adapters for HTTP ingress / queues / the Pi Agent runtime, a CLI, and an optional admin console.

Status: 0.1.0 preview. The local engineering loop is roughly 90% done — contracts, types, tests and builds pass end to end. Still missing: production hosting, a real identity provider, and an independent security review. The itemized state lives in the gap list (Chinese).

What it does

  • Contract-first. The public API, state machines, error model and ports are declared once in a registry. TypeScript types, validators, an OpenAPI 3.1 document and SQL constraints are generated from it, and CI fails on drift.
  • Authorization on every command. Grant, purpose, tenant scope and version fence are re-checked inside each database transaction. No rights, no execution.
  • Full lifecycle. Missions run create → activate → pause/resume → close. Runs form a task graph with idempotency receipts and recovery. Capability packs move through staged → enabled → suspended → retired, with signature verification on the way in.
  • Humans in the loop. Decision approvals, corrections, exceptions and safety stops all land in an immutable audit trail.
  • A swappable agent runtime. Core has no dependency on any agent framework. The Pi adapter keeps model and tool calls inside injected gateways; other runtimes can plug in through the same ports.
  • Domain-neutral core. Business logic lives in packs, not in the engine. The marketing domain is developed separately in lime-ads.

Packages

PackageRole
@abh/contractsGenerated contracts: schemas, states, errors, HTTP protocol, ports
@abh/coreThe engine: missions, runs, the authorization chain, ledger, durable execution
@abh/adapter-piPi Agent runtime adapter — models and tools forced through gateways
@abh/adapter-fastifyHTTP ingress adapter
@abh/adapter-pg-bossQueue delivery on PostgreSQL (pg-boss)
@abh/cliThe abh command line
@abh/workbenchOptional Next.js admin console

Getting started

You need Node.js 24 (pinned in .nvmrc), pnpm 10.28 through corepack, and Docker if you want to run the integration tests.

git clone https://github.com/GoatGit/ABH.git
cd ABH
corepack pnpm install --frozen-lockfile
pnpm check

pnpm check is the whole gate: contract regeneration with drift check, type checks, the test suite (a thousand-plus tests against a real PostgreSQL 16 managed by Testcontainers), builds, and the public API report. Contract generation runs offline; the tests need Docker once to pull the pinned image. Tests never call real models or external services.

To see a fully deployed service — migrations, provisioning, queues, HTTP — walk through the hello-service example.

Useful commands

CommandPurpose
pnpm contracts:generateRegenerate contract artifacts from the registry
pnpm contracts:checkRegenerate in a temp dir and fail on drift
pnpm api:updateRefresh the public API report after an intentional change (review the diff)
pnpm abh doctor data --format jsonRead-only database diagnostics — see the CLI reference

FAQ

Do I need Docker to contribute?

Only for the test suite: integration tests run against a real PostgreSQL 16 managed by Testcontainers. Contract generation, type checks, builds, and the documentation link check all run offline without Docker.

Why do a few @abh/core tests skip locally?

Seven real-signature tests run only when ABH_TEST_COSIGN points at a cosign 2.x CLI; they skip automatically otherwise. CI pins cosign v2.5.0 — 3.x removed --tlog-upload and will not work. See CONTRIBUTING.md.

One core test file gets killed on my machine.

actions.test.ts (the OPA WASM control snapshot) transiently peaks around 2 GB RSS. Sub-4 GB Docker VMs will OOM-kill it; keep 8 GB or more for self-hosted CI. It passes on GitHub runners.

Do tests call real models or external services?

No. The suite uses in-repo fakes and the Pi adapter invoked against test doubles — no real model calls, no real business services.

Can I run ABH in production today?

Not yet. This is a 0.1.0 preview: production hosting, a real identity provider, and an independent security review are still open. Read SECURITY.md and the gap list before evaluating ABH for sensitive use.

How is ABH different from an agent framework?

Core has no dependency on any agent framework — the agent runtime plugs in through ports (the Pi adapter is one implementation). ABH owns what a framework leaves out: authorization on every command, the ledger, durable execution, audit, and recovery.

Contributing

Contributions are welcome — bug reports, documentation, and help closing the open gaps. Start with CONTRIBUTING.md for setup, the pnpm check gate, and the contract-first workflow; proposals belong in issues and security reports in the private advisory flow. All participants agree to the Code of Conduct.

Documentation

License

Code, specs, SDK and examples are released under the MIT License. The design paper under docs/V1 is licensed CC BY 4.0. Third-party dependencies keep their own licenses.

关于 About

No description, website, or topics provided.

语言 Languages

TypeScript93.7%
JavaScript6.1%
CSS0.2%

提交活跃度 Commit Activity

代码提交热力图
过去 52 周的开发活跃度
50
Total Commits
峰值: 26次/周
Less
More

核心贡献者 Contributors