Economic Execution and Control Layer for Agentic Systems
$git clone https://github.com/omnuron/omniclawInstalls into the current project.
Install omniclaw by running `git clone https://github.com/omnuron/omniclaw`, then use it for the current task and follow its documentation at https://github.com/omnuron/omniclaw.
| 1 | # OmniClaw |
| 2 | |
| 3 | Policy-controlled payment infrastructure for agent buyers. |
| 4 | |
| 5 | OmniClaw core is focused on one job: letting agents and applications pay through controlled, auditable rails without giving software unrestricted wallet authority. |
| 6 | |
| 7 | ## Product Boundary |
| 8 | |
| 9 | | Product | Directory | Owns | |
| 10 | | --- | --- | --- | |
| 11 | | OmniClaw core | `src/omniclaw` | buyer SDK, policy engine, wallet/payment routing, x402 buyer execution, Gateway buyer readiness | |
| 12 | |
| 13 | Core should not include recipient-side paid endpoint hosting or settlement service code. |
| 14 | |
| 15 | ## Core Capabilities |
| 16 | |
| 17 | - Financial Policy Engine for budgets, approvals, trust checks, and execution control |
| 18 | - Python buyer SDK via `OmniClaw().pay(...)` |
| 19 | - Agent buyer CLI via `omniclaw-cli pay`, `inspect-x402`, and `can-pay` |
| 20 | - Circle Gateway buyer funding/readiness helpers |
| 21 | - Standard x402 buyer flow for paying external paid endpoints |
| 22 | - Ledger, idempotency, simulation, and payment-intent controls |
| 23 | |
| 24 | ## Core Quickstart |
| 25 | |
| 26 | Install: |
| 27 | |
| 28 | ```bash |
| 29 | pip install omniclaw |
| 30 | ``` |
| 31 | |
| 32 | Start the policy engine: |
| 33 | |
| 34 | ```bash |
| 35 | cp .env.example .env |
| 36 | # Hybrid mode (default): leave OMNICLAW_BUYER_MODE=hybrid and fill CIRCLE_API_KEY, |
| 37 | # ENTITY_SECRET, OMNICLAW_PRIVATE_KEY, OMNICLAW_AGENT_TOKEN, OMNICLAW_OWNER_TOKEN, |
| 38 | # OMNICLAW_NETWORK, and OMNICLAW_RPC_URL. |
| 39 | # x402-only Gateway mode: set OMNICLAW_BUYER_MODE=x402, leave CIRCLE_API_KEY and |
| 40 | # ENTITY_SECRET empty unless you need optional Circle Gateway API helpers, and fill |
| 41 | # OMNICLAW_PRIVATE_KEY, OMNICLAW_AGENT_TOKEN, OMNICLAW_OWNER_TOKEN, |
| 42 | # OMNICLAW_NETWORK, and OMNICLAW_RPC_URL. |
| 43 | |
| 44 | mkdir -p examples/agent/buyer/runtime |
| 45 | cp examples/agent/buyer/policy.example.json examples/agent/buyer/runtime/policy.json |
| 46 | # Edit examples/agent/buyer/runtime/policy.json so the token matches OMNICLAW_AGENT_TOKEN. |
| 47 | |
| 48 | docker compose -f examples/agent/buyer/docker-compose.yml --env-file .env up --build |
| 49 | ``` |
| 50 | |
| 51 | The policy file is stable configuration. Generated wallet state is written separately |
| 52 | to `examples/agent/buyer/runtime/wallet-state.json`. |
| 53 | |
| 54 | Buyer-facing policy rails are: |
| 55 | |
| 56 | - `circle_transfer` for direct Circle Developer Wallet transfers. |
| 57 | - `x402` for paid API payments. OmniClaw chooses Gateway nanopayment or the standard |
| 58 | x402 payment path internally based on seller accepts, buyer config, and Gateway balance. |
| 59 | |
| 60 | Configure the buyer CLI: |
| 61 | |
| 62 | ```bash |
| 63 | set -a; source .env; set +a |
| 64 | export OMNICLAW_SERVER_URL="http://127.0.0.1:9091" |
| 65 | export OMNICLAW_TOKEN="$OMNICLAW_AGENT_TOKEN" |
| 66 | ``` |
| 67 | |
| 68 | Inspect and pay an x402 endpoint: |
| 69 | |
| 70 | ```bash |
| 71 | omniclaw-cli inspect-x402 --recipient "http://127.0.0.1:4023/compute?size=20" |
| 72 | omniclaw-cli pay --recipient "http://127.0.0.1:4023/compute?size=20" --amount 0.10 --idempotency-key job-123 |
| 73 | ``` |
| 74 | |
| 75 | ## Development |
| 76 | |
| 77 | Run core tests: |
| 78 | |
| 79 | ```bash |
| 80 | uv run pytest |
| 81 | ``` |