This directory contains framework adapters that demonstrate the same Gait execution contract across runtimes.
Use these examples only when you control a real tool-dispatch seam. If your runtime is managed or preloaded and does not expose that seam, stay on the observe, verify, capture, and regress paths instead of describing the integration as strict inline enforcement.
Official lane:
langchain(official middleware with optional callback correlation)
Reference boundary demo:
openai_agents
Reference-demo versus official-lane rule:
openai_agentsis the in-repo reference boundary demolangchainis the official middleware lane
Quick commands:
python3 examples/integrations/openai_agents/quickstart.py --scenario allow
(cd sdk/python && uv run --python 3.11 --extra langchain python ../../examples/integrations/langchain/quickstart.py --scenario allow)Reference adapters:
autogenopenclawautogptgastownclaude_code(reference adapter; hook errors fail closed by default,GAIT_CLAUDE_UNSAFE_FAIL_OPEN=1is an unsafe opt-in override)voice_referencetemplate(canonical copy/paste template)
Do not promote an adapter into public launch copy until it has an in-repo lane and clears the integration scorecard threshold.
Every adapter must implement:
- Framework tool-call payload -> normalized intent payload.
gait gate evalusing local policy + intent files.- Execute tool exactly once only on
allow. - Persist deterministic trace/evidence paths for local debugging and CI.
Any verdict other than allow is fail-closed (executed=false).
Each examples/integrations/<adapter>/ folder must include:
README.mdwith copy/paste allow/block commands and expected output fields.- Runnable quickstart script.
- Deterministic artifact output paths under
gait-out/integrations/<adapter>/. - No raw side-effecting tool path exposed without Gate evaluation.
- No adapter-specific policy language, no policy forks.
- No framework gets a bypass path around Gate.
- No adapter-specific semantics for approval or block outcomes.
- New features must be added in a framework-neutral way first, then adopted by adapters.
Run before opening a PR:
go build -o ./gait ./cmd/gait
make lint
make test
make test-adapter-parity
make test-adoptionBefore merging adapter changes intended for production use:
- Non-allow decisions remain fail-closed (
executed=false) with no side effects. - Service-mode adapters use auth for non-loopback bindings.
- Service-mode adapters use strict verdict HTTP semantics where supported.
- Service-mode adapters configure payload and retention caps.
- SDK/adapter subprocess calls remain time-bounded and fail-closed.