Trust and transaction infrastructure for autonomous AI agents. Every consequential action passes through identity, delegated authority, policy, approval, guarded execution, and tamper-evident receipts.
github.com/GregDixonMXN/settleagent · Go TypeScript Python SDK · License: BSL 1.1 → Apache 2.0 on Change Date
SettleAgent is the strongest starting point for the Railpane central authorization/control-plane backend: agent identity, orgs/tenancy, ALLOW / DENY / REQUIRE_APPROVAL / ALLOW_WITH_CONSTRAINTS, transaction lifecycle + idempotency, saga compensation, MCP proxying, audit trail, receipts, Postgres persistence, dashboard, OpenTelemetry. Railpane reuses it, refactors boundaries where needed, and adds workload identity, delegation, credential brokering, and signed provenance around it.
Prereqs: Go 1.26+, Node 20+, Python 3.12. Docker optional. Postgres optional (memory store by default).
# 1. API (prints demo org, principal, one-time operator token).
# AG_DEMO_MOCKS=1 keeps the demo on mock tools.
AG_DEMO_MOCKS=1 go run ./apps/api
# store: memory (demo org <ORG> principal <PRIN>)
# operator token (dashboard/human): sto_...
# 2. Governed demo agent (new terminal)
API_URL=http://127.0.0.1:8080 ORG=<ORG> PRINCIPAL=<PRIN> \
OPERATOR_TOKEN=<sto_...> python3 examples/simple-agent/demo.py
# -> CRM update ALLOW, $80 refund ALLOW, $300 refund approval -> approved,
# $2000 refund DENY, 20-event audit timeline, DEMO OK
# 3. Dashboard (new terminal)
cd apps/dashboard && npm install
SETTLEAGENT_API_URL=http://127.0.0.1:8080 SETTLEAGENT_OPERATOR_TOKEN=<sto_...> npm run dev
# open http://localhost:3000 (Transactions, Approvals, Receipts, Audit)
Durable: set DATABASE_URL before starting; migrations auto-apply. Compose: docker compose up --build (dashboard :3000, Jaeger :16686).
| Action | Outcome |
|---|---|
| crm.lookup_customer, crm.update_record | ALLOW, executed |
| stripe.refund $80 | ALLOW (support auto-limit $100) |
| stripe.refund $300 | REQUIRE_APPROVAL → human approves → executed |
| stripe.refund $2000 | DENY (above $500 prohibited), never executes |
| Failure after compensable step | compensates; PARTIALLY_COMPENSATED if irreversible steps ran |
| Duplicate delivery (same idempotency key) | returns original record, no duplicate side effect |
Every request carries Authorization (agent st_… or operator sto_…); every action needs an idempotency key; every denial explains why.
| Path | Purpose |
|---|---|
| apps/api | HTTP gateway (/v1, OpenAPI at /openapi.json) |
| apps/dashboard | Next.js control plane |
| internal/gateway | transaction engine (saga semantics) |
| internal/policies | deterministic versioned policy engine + simulation |
| internal/integrations | Stripe test-mode, GitHub, Postgres read-only, HTTP allowlist, MCP proxy |
| internal/store | Memory (dev) + Postgres (prod) |
| packages/sdk-python | Python SDK |
Community free (self-hosted). Pilot $500/mo (design-partner onboarding, capped cohorts). Enterprise custom (SSO, retention, SLA). See PILOT.md upstream.