Use Gait when an AI agent can cause real side effects and you need deterministic control plus portable proof. Gait is not an agent framework, not a model host, and not a dashboard. It is an offline-first Go CLI that sits at the tool boundary. Capture every prod agent tool call as a signed, offline-verifiable pack. Enforce fail-closed policy before high-risk actions execute. Turn incidents into CI
Add this skill
npx mdskills install Clyra-AI/gaitComprehensive production-grade tool boundary control system with signing, policy enforcement, and CI integration
1# Gait — Signed Proof and Fail-Closed Control for Production AI Agent Tool Calls23## Overview45Use Gait when an AI agent can cause real side effects and you need deterministic control plus portable proof.67Gait is not an agent framework, not a model host, and not a dashboard. It is an offline-first Go CLI that sits at the tool boundary.89Capture every prod agent tool call as a signed, offline-verifiable pack. Enforce fail-closed policy before high-risk actions execute. Turn incidents into CI regressions in one command.1011Docs: [clyra-ai.github.io/gait](https://clyra-ai.github.io/gait/) | Install: [`docs/install.md`](docs/install.md) | Homebrew: [`docs/homebrew.md`](docs/homebrew.md)1213Managed/preloaded agent note: managed agents can use Gait at the tool boundary, but Gait does not host the model or replace your agent runtime.1415## Integration First (New or Existing Agent Flows)1617The integration contract is simple:18191. normalize a tool call into intent202. call Gait for a verdict213. execute real side effects only on `allow`224. keep the signed trace/artifact2324```python25def dispatch_tool(tool_call):26 decision = gait_evaluate(tool_call)27 if decision["verdict"] != "allow":28 return {"executed": False, "verdict": decision["verdict"]}29 return {"executed": True, "result": execute_real_tool(tool_call)}30```3132Pick the adoption lane that matches your stack:3334- Inline runtime wrapper (any language): call `gait gate eval` in your dispatcher before tool execution.35- MCP sidecar/transport lane: `gait mcp proxy` (one-shot) or `gait mcp serve` (long-running) at the boundary.36- Python SDK lane: use `sdk/python/gait` for ergonomics; it is intentionally a thin subprocess wrapper over the local Go `gait` binary.3738If you do not want Python subprocess boundaries, call `gait` directly from your runtime or use the MCP sidecar path.3940Start here:4142- Blessed lane: [`examples/integrations/openai_agents/`](examples/integrations/openai_agents/)43- Quickstart script: `examples/integrations/openai_agents/quickstart.py`44- Integration boundary guide: [`docs/agent_integration_boundary.md`](docs/agent_integration_boundary.md)45- Integration checklist: [`docs/integration_checklist.md`](docs/integration_checklist.md)46- MCP capability matrix: [`docs/mcp_capability_matrix.md`](docs/mcp_capability_matrix.md)47- Python SDK contract: [`docs/sdk/python.md`](docs/sdk/python.md)4849## When To Use Gait5051- Tool-calling AI agents need enforceable allow/block/approval decisions.52- You need signed, portable evidence artifacts for PRs, incidents, or audits.53- You want offline, deterministic regressions that fail CI with stable exit behavior.54- You run multi-step jobs and need checkpoints, pause/resume/cancel, and inspectable state.5556## When Not To Use Gait5758- No local Gait CLI or Gait artifacts are available in the execution path.59- Your workflow only needs prompt orchestration without tool-side effects or evidence contracts.60- You only need hosted observability dashboards and do not need offline verification or deterministic replay.6162## Try It (Offline, <60s)6364### Fast 20-Second Proof6566```bash67# Install (checksums at docs/install.md)68curl -fsSL https://raw.githubusercontent.com/Clyra-AI/gait/main/scripts/install.sh | bash6970# Create a signed pack from a synthetic agent run71gait demo7273# Prove it's intact74gait verify run_demo7576# Turn it into a CI regression gate — one command77gait regress bootstrap --from run_demo --junit ./gait-out/junit.xml78```7980No account. No API key. No internet. You now have a verified artifact and a permanent regression test.8182## Dev vs Prod8384Development quickstart:8586- `gait demo`87- `gait verify run_demo`8889Production hardening baseline:9091```bash92mkdir -p .gait93gait policy init baseline-highrisk --out .gait/policy.yaml94cat > .gait/config.yaml <<'YAML'95gate:96 policy: .gait/policy.yaml97 profile: oss-prod98 key_mode: prod99 private_key_env: GAIT_PRIVATE_KEY100 credential_broker: env101 credential_env_prefix: GAIT_BROKER_TOKEN_102 rate_limit_state: ./gait-out/gate_rate_limits.json103104mcp_serve:105 enabled: true106 listen: 127.0.0.1:8787107 auth_mode: token108 auth_token_env: GAIT_MCP_TOKEN109 max_request_bytes: 1048576110 http_verdict_status: strict111 allow_client_artifact_paths: false112113retention:114 trace_ttl: 168h115 session_ttl: 336h116 export_ttl: 168h117YAML118gait doctor --production-readiness --json119```120121Use production mode when gating real side effects in shared or customer-facing environments.122123Local UI playground: [`docs/ui_localhost.md`](docs/ui_localhost.md) | Launch with `gait ui`124125## See It126127### Simple End-To-End Scenario128129130131Video: [`gait_demo_simple_e2e_60s.mp4`](docs/assets/gait_demo_simple_e2e_60s.mp4) | Scenario walkthrough: [`docs/scenarios/simple_agent_tool_boundary.md`](docs/scenarios/simple_agent_tool_boundary.md) | Output legend: [`docs/demo_output_legend.md`](docs/demo_output_legend.md)132133See: [2,880 tool calls gate-checked in 24 hours](docs/blog/openclaw_24h_boundary_enforcement.md)134135## What You Get136137**Signed packs** — every run and job emits a tamper-evident artifact (Ed25519 + SHA-256 manifest). Verify offline. Attach to PRs, incidents, audits. One artifact is the entire proof. Export OTEL-style JSONL and deterministic PostgreSQL index SQL with `gait pack export`.138139**Fail-closed policy enforcement** — `gait gate eval` evaluates a structured tool-call intent against YAML policy before the side effect runs. Non-allow means non-execute. Signed trace proves the decision. Script mode supports deterministic step rollups, optional Wrkr context enrichment, and signed approved-script fast-path allow.140141**Incident → CI gate in one command** — `gait regress bootstrap` converts a bad run into a permanent regression fixture with JUnit output. Exit 0 = pass, exit 5 = drift. Never debug the same failure twice.142143**Durable jobs** — dispatch long-running agent work that survives failures. Checkpoints, pause/resume/stop/cancel, approval gates, deterministic stop reasons, and emergency preemption for queued dispatches. No more lost state at step 47.144145**Destructive safety boundary** — enforce phase-aware plan/apply behavior (`plan` stays non-destructive, destructive `apply` requires approval), plus fail-closed destructive budgets and bounded approval token scopes (`max-targets`, `max-ops`).146147**Deterministic replay and diff** — replay an agent run using recorded results as stubs (no real API calls). Diff two packs to see what changed, including context drift classification.148149**Voice agent gating** — gate high-stakes spoken commitments (refunds, quotes, eligibility) before they're uttered. Signed `SayToken` capability + callpack artifacts for voice boundaries.150151**Risk ranking** — rank highest-risk actions across runs and traces by tool class and blast radius. Offline, no dashboard.152153## Additional Adapters154155[LangChain](examples/integrations/langchain/) · [AutoGen](examples/integrations/autogen/) · [AutoGPT](examples/integrations/autogpt/) · [OpenClaw](examples/integrations/openclaw/) · [Gastown](examples/integrations/gastown/) · [Voice](examples/integrations/voice_reference/)156157## CI Adoption (One PR)158159```bash160gait regress bootstrap --from run_demo --json --junit ./gait-out/junit.xml161```162163- exit `0` = pass, exit `5` = regression failed164- Template: [`.github/workflows/adoption-regress-template.yml`](.github/workflows/adoption-regress-template.yml)165- Drop-in action: [`.github/actions/gait-regress/README.md`](.github/actions/gait-regress/README.md)166- GitLab/Jenkins/Circle: [`docs/ci_regress_kit.md`](docs/ci_regress_kit.md)167- Canonical copy-paste guide: [`docs/adopt_in_one_pr.md`](docs/adopt_in_one_pr.md)168- Threat model: [`docs/threat_model.md`](docs/threat_model.md)169- Failure taxonomy and exits: [`docs/failure_taxonomy_exit_codes.md`](docs/failure_taxonomy_exit_codes.md)170171## Contract Commitments172173- **determinism**: verify, diff, and stub replay produce identical results on identical artifacts174- **offline-first**: core workflows do not require network175- **fail-closed**: high-risk paths block on policy or approval ambiguity176- **schema stability**: versioned artifacts with backward-compatible readers177- **stable exit codes**: `0` success · `1` internal/runtime failure · `2` verification failure · `3` policy block · `4` approval required · `5` regress failed · `6` invalid input · `7` dependency missing · `8` unsafe operation blocked178179Normative spec: [`docs/contracts/primitive_contract.md`](docs/contracts/primitive_contract.md) | PackSpec v1: [`docs/contracts/packspec_v1.md`](docs/contracts/packspec_v1.md) | Intent+receipt: [`docs/contracts/intent_receipt_conformance.md`](docs/contracts/intent_receipt_conformance.md)180181Hardening: [`docs/hardening/v2_2_contract.md`](docs/hardening/v2_2_contract.md) | Runbook: [`docs/hardening/prime_time_runbook.md`](docs/hardening/prime_time_runbook.md)182183## Documentation1841851. [`docs/README.md`](docs/README.md) — ownership map1862. [`docs/concepts/mental_model.md`](docs/concepts/mental_model.md) — how Gait works1873. [`docs/architecture.md`](docs/architecture.md) — component boundaries1884. [`docs/flows.md`](docs/flows.md) — end-to-end sequences1895. [`docs/durable_jobs.md`](docs/durable_jobs.md) — durable job lifecycle and differentiation1906. [`docs/contracts/primitive_contract.md`](docs/contracts/primitive_contract.md) — normative spec191192Public docs: [clyra-ai.github.io/gait](https://clyra-ai.github.io/gait/) | Wiki: [github.com/Clyra-AI/gait/wiki](https://github.com/Clyra-AI/gait/wiki) | Changelog: [CHANGELOG.md](CHANGELOG.md)193194## Developer Workflow195196197198199200```bash201make fmt && make lint && make test202make test-e2e203make test-hardening-acceptance204make test-uat-local205```206207Push hooks: `make hooks` | Full gate: `GAIT_PREPUSH_MODE=full git push` | Branch protection: `make github-guardrails`208209Contributor guide: [`CONTRIBUTING.md`](CONTRIBUTING.md)210211## Command Surface212213```text214gait demo Create a signed pack offline215gait tour Interactive walkthrough216gait verify <run_id|path> Verify integrity offline217gait verify chain|session-chain Multi-artifact chain verification218gait job submit|status|checkpoint|pause|resume Durable job lifecycle219gait job stop|approve|cancel|inspect Emergency stop, approval, and inspection220gait pack build|verify|inspect|diff|export Unified pack operations + OTEL/Postgres sinks221gait regress init|bootstrap|run Incident → CI gate222gait gate eval Policy enforcement + signed trace223gait approve-script Mint signed approved-script registry entries224gait approve Mint signed approval tokens225gait list-scripts Inspect approved-script registry status226gait delegate mint|verify Delegation token lifecycle227gait report top Rank highest-risk actions228gait voice token mint|verify Voice commitment gating229gait voice pack build|verify|inspect|diff Voice callpack operations230gait run record|inspect|replay|diff|receipt Run recording and replay231gait run session start|append|status|checkpoint|compact Session journaling232gait run reduce Reduce runpack by predicate233gait mcp proxy|bridge|serve MCP transport adapters234gait gateway ingest Ingest MCP gateway logs into signed policy-enforcement proof records235gait policy init|validate|fmt|simulate|test Policy authoring236gait doctor [--production-readiness] [adoption] Diagnostics + readiness237gait keys init|rotate|verify Signing key lifecycle238gait scout snapshot|diff|signal Drift and adoption signals239gait guard pack|verify|retain|encrypt|decrypt Evidence and encryption240gait trace verify Verify signed trace integrity241gait incident pack Build incident evidence pack242gait registry install|list|verify Signed skill-pack registry243gait migrate Migrate legacy artifacts to v1244gait ui Local playground245gait version Print version246```247248All commands support `--json`. Most support `--explain`.249250## Feedback251252Issues: [github.com/Clyra-AI/gait/issues](https://github.com/Clyra-AI/gait/issues) | Security: [`SECURITY.md`](SECURITY.md) | Contributing: [`CONTRIBUTING.md`](CONTRIBUTING.md) | Code of conduct: [`CODE_OF_CONDUCT.md`](CODE_OF_CONDUCT.md)253
Full transparency — inspect the skill content before installing.