Integration Guide
Integration Surfaces
ATF provides four integration surfaces: a hosted MCP endpoint for agent runtimes, a REST API for direct integration, a CLI for local development and CI pipelines, and an OpenClaw plugin for autonomous agent frameworks.
Surface Overview
Hosted MCP
AvailableModel Context Protocol endpoint for agent runtimes. Five tools covering advisory probing, simulation, protect enforcement, verification, and explanation.
REST API
AvailableThe primary integration path. Send intents, receive decisions, verify receipts. Works with any language or framework.
CLI
AvailableLocal development, scripting, and CI/CD pipelines. Profile-based config, pipeline-friendly I/O.
OpenClaw Plugin
AvailableAutonomous agent integration. 13 tools for protect, verify, report, and discover. Runs inside the OpenClaw agent framework.
Hosted MCP Endpoint
ATF exposes a hosted Model Context Protocol (MCP) endpoint for agent runtimes. Five tools cover the full advisory-to-enforcement loop. Advisory tools (probe_transaction, simulate_transaction, explain_decision) are policy-aware but not authoritative. protect_transaction is the binding enforcement gate. MCP does not sign or submit transactions.
Entitlement is tier-based and tenant-backed. Each tenant's MCP access is scoped to their entitlement tier.
| Tool | Status | Description |
|---|---|---|
| probe_transaction | Available | Lightweight policy pre-check on a candidate intent (advisory) |
| simulate_transaction | Available | Full simulation against active policies and conditions (advisory) |
| protect_transaction | Available | Binding policy enforcement decision - approve or deny (authoritative) |
| verify_receipt | Available | Verify execution receipt hash integrity |
| explain_decision | Available | Human-readable explanation of a decision with reason codes (advisory) |
MCP Boundaries
- MCP does not sign transactions
- MCP does not submit transactions to the chain
- Advisory tools inform; protect enforces
- Entitlement is tier-based and tenant-backed
Canonical MCP flow
- Discover tools via MCP endpoint
- Probe a candidate intent
- Simulate the candidate
- Request protection (binding enforcement)
- Verify the execution receipt
- Explain the result if needed
- Stop before signing/submission
REST API
Base URL: https://api.trucore.xyz. All endpoints accept JSON. Authentication is via X-API-Key header for protect/execute operations.
bash
curl -sS https://api.trucore.xyz/v1/bot/protect \
-H "Content-Type: application/json" \
-H "X-API-Key: atf_live_YOUR_KEY" \
-d '{
"chain_id": "solana",
"intent_type": "swap",
"intent": {
"type": "swap",
"in_mint": "So11111111111111111111111111111111111111112",
"out_mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"amount_in": 1000000,
"slippage_bps": 50,
"agent_id": "my-bot-v1"
}
}'| Endpoint | Status | Description |
|---|---|---|
| POST /v1/bot/protect | Available | Evaluate intent against policies, return allow/deny with receipt |
| POST /v1/intents/approve | Available | Submit swap, lending, or withdrawal intent for approval |
| POST /v1/executions/finalize | Available | Finalize an approved execution and issue a full receipt |
| POST /v1/receipts/verify | Available | Verify receipt hash integrity |
| POST /v1/permits/verify | Available | Verify permit signature and expiration |
| GET /v1/whoami | Available | Resolved identity and tenant metadata |
| GET /plans | Available | Public plan tiers and limits |
| GET /features/catalog | Available | Public-safe feature catalog |
| GET /onboarding/sample-intent | Available | Pre-built sample swap intent for testing |
| POST /onboarding/protect-dry-run | Available | Policy evaluation without on-chain execution |
| POST /onboarding/execute-sample | Available | Execute sample trade (mock or real) |
See the full API Reference for request/response schemas and error codes.
ATF CLI
Install via npm and run immediately. The CLI wraps the API with profile management, local receipt verification, and pipeline-friendly exit codes.
bash
# Install globally
npm install -g @trucore/atf
# Run a protected trade (demo mode)
atf trade
# Protect a specific intent
cat intent.json | atf bot protect --stdin
# Verify a receipt
atf verify <receipt-id>
# Environment health check
atf doctor| Command | Status | Description |
|---|---|---|
| atf trade | Available | Run a protected trade (demo or real) |
| atf setup | Available | Configure wallet and RPC for real trades |
| atf doctor | Available | Environment health check - RPC, wallet, config |
| atf verify | Available | Verify receipt hash locally |
| atf simulate | Available | Simulate a transaction without sending |
| atf bot protect | Available | Protect intent from stdin (pipeline-friendly) |
| atf receipts list | Available | List receipts for current profile |
| atf profile | Available | Manage named profiles for different environments |
| atf rpc ping | Available | Test RPC endpoint latency |
| atf burner | Available | Switch active profile to devnet for testing |
| atf whoami | Available | Show current identity and profile |
See the full CLI Reference and Command Reference for details.
OpenClaw Plugin
The @trucore/trucore-atf plugin integrates ATF into the OpenClaw autonomous agent framework. Agents can protect intents, verify receipts, and generate savings reports without custom HTTP code.
bash
openclaw plugins install @trucore/trucore-atf@0.2.11| Tool | Status | Description |
|---|---|---|
| atf_health | Available | Check ATF service health |
| atf_discover | Available | Discover ATF capabilities and manifest |
| atf_protect_intent | Available | Submit intent for policy evaluation |
| atf_verify_receipt | Available | Verify receipt integrity |
| atf_report_savings | Available | Generate receipts-backed savings report |
| atf_bot_preflight | Available | Run bot preflight checks |
| atf_integration_doctor | Available | Diagnose integration issues |
| atf_tx_explain | Available | Explain a transaction or intent |
| atf_adoption_advisor | Available | Adoption guidance and recommendations |
| atf_billing_status | Coming Soon | Check billing and usage status |
| atf_billing_upgrade | Coming Soon | Trigger plan upgrade flow |
See the full OpenClaw Plugin Reference for configuration, safety defaults, and workflow examples.
When to Use Which Surface
Use MCP when…
- Your agent runtime supports MCP natively
- You want the advisory-to-enforcement loop in one surface
- Building with hosted agent frameworks
Use the API when…
- Building a custom trading bot in any language
- Integrating ATF into an existing backend
- You need full control over request/response handling
Use the CLI when…
- Developing and testing locally
- Running in CI/CD pipelines
- Scripting protect/verify workflows
Use the Plugin when…
- Building on the OpenClaw agent framework
- Want zero-code ATF integration for agents
- Need autonomous protect → verify workflows