Skip to main content

Overview

The SKILLS.md file is the canonical integration contract for AI agents and orchestrators working with the Agentic Wallet platform. It provides a machine-readable specification of capabilities, runtime behavior, schemas, and operational constraints. Location: /SKILLS.md in the repository root Last Verified: 2026-03-03

Purpose

SKILLS.md serves as the single source of truth for:
  1. Integration modes - How agents can interact with the platform (CLI, SDK, API, MCP)
  2. Intent schemas - Canonical request/response formats
  3. Execution semantics - Transaction lifecycle and async behavior
  4. Output contracts - What agents must return after substantial operations
  5. Runtime constraints - Known limitations and operational boundaries

Skills Index Version

Current State
The skills/ directory exists but contains no checked-in SKILL.md files. SKILLS.md in the root is the active integration contract.

Integration Modes

Agents can integrate using four primary modes:
Compatibility CLI for orchestrators that use legacy intent formats.
Intent Runner
Legacy Adapter Behavior:
  • fromWalletId (base58) → internal walletId UUID lookup
  • Legacy chain/createdAt/reasoning preserved at intent.legacy
  • Intent type normalization:
    • transfer → transfer_sol or transfer_spl
    • swap → swap
    • create_mint → create_mint
    • mint_token → mint_token

Authentication & Scopes

Gateway Configuration

Environment Variables

Required Headers

Scope Groups

API keys can be scoped to specific capability groups:
  1. wallets - Wallet operations
  2. transactions - Transaction lifecycle
  3. policies - Policy management
  4. agents - Agent runtime
  5. protocols - Protocol adapters
  6. risk - Risk controls
  7. strategy - Strategy/backtesting
  8. treasury - Treasury operations
  9. audit - Audit/observability
  10. mcp - MCP tools
Example:

Canonical Intent Schemas

Transaction Create

Request Schema

Supported Transaction Types

  1. transfer_sol - Native SOL transfer
  2. transfer_spl - SPL token transfer
  3. swap - DEX swap
  4. stake - Validator staking
  5. unstake - Validator unstaking
  6. lend_supply - Lending protocol supply
  7. lend_borrow - Lending protocol borrow
  8. create_mint - Create SPL token mint
  9. mint_token - Mint SPL tokens
  10. query_balance - Query balance (read-only)
  11. query_positions - Query positions (read-only)
  12. create_escrow - Create escrow contract
  13. accept_escrow - Accept escrow
  14. release_escrow - Release escrow funds
  15. refund_escrow - Refund escrow
  16. dispute_escrow - Dispute escrow
  17. resolve_dispute - Resolve escrow dispute
  18. create_milestone_escrow - Create milestone escrow
  19. release_milestone - Release milestone payment
  20. x402_pay - HTTP 402 payment
  21. flash_loan_bundle - Flash loan bundle
  22. cpi_call - Cross-program invocation
  23. custom_instruction_bundle - Custom instruction bundle
  24. treasury_allocate - Treasury allocation
  25. treasury_rebalance - Treasury rebalance
  26. paper_trade - Paper trade (no real funds)

Common Intent Payloads

Read-only intents (query_balance, query_positions) do not produce on-chain signatures and confirm without submission.Rent precheck: transfer_sol validates unfunded destination rent threshold before execution.

Policy Rule Types

Policies support 11 rule types for governance:
  1. spending_limit - Per-transaction and daily spending caps
  2. address_allowlist - Allowed destination addresses
  3. address_blocklist - Blocked destination addresses
  4. program_allowlist - Allowed program IDs
  5. token_allowlist - Allowed token mints
  6. protocol_allowlist - Allowed protocol adapters
  7. rate_limit - Transaction rate limiting
  8. time_window - Time-based restrictions
  9. max_slippage - Maximum slippage tolerance
  10. protocol_risk - Protocol risk controls
  11. portfolio_risk - Portfolio exposure limits

Transaction Lifecycle

Canonical execution pipeline: Behavior Rules:
  1. POST /api/v1/transactions returns 201, 202, or 500 based on current state
  2. Use GET /api/v1/transactions/:txId polling for final state
  3. If approval_gate, call /approve or /reject
  4. idempotencyKey replays prior record when identical key is reused
  5. Durable outbox is SQLite-backed for create/retry/approve processing

Response Envelope

Gateway normalizes all responses to a stable machine envelope:
Response Format
Critical Behavior: GET /api/v1/transactions/:txId may return HTTP 200 but envelope status="failure" when data.status="failed".Agents must key control flow from envelope status, errorCode, and stage, not HTTP code alone.

Error Codes

  • VALIDATION_ERROR - Schema/input mismatch
  • POLICY_VIOLATION - Policy/capability/budget disallow
  • PIPELINE_ERROR - Build/sign/send/runtime failures
  • CONFIRMATION_FAILED - Explicit confirmation-stage failures

Agent Heartbeat Context

When agents run in autonomous mode, the scheduler provides context on each tick:
Scheduler Context Fields
Agents can use this context to make autonomous decisions based on current state.

Output Contract for Agents

For substantial runs, agents should return:
  1. Interface used - CLI/API/SDK/MCP
  2. Commands or API calls executed - Full command/request log
  3. Wallet/agent/transaction IDs and signatures - All created resources
  4. Final statuses and policy decisions - Terminal states
  5. Proof/replay references - Auditability artifacts
  6. Remaining risks or TODOs - Operational notes
Example Output:
Agent Run Summary

Reliability & Durability

RPC Failover

RPC Pool Configuration
Behavior:
  • Health-scored RPC pool failover
  • Background endpoint probes and runtime health scoring
  • Adaptive compute budget and priority fee tuning

Durable Outbox

Outbox Configuration
Semantics:
  • SQLite-backed queue with lease/retry/dedupe/recovery
  • Restart recovery drain of pending processing work
  • Deterministic idempotency via idempotencyKey

Delta Guard

Delta Guard Configuration
Behavior:
  • Checks expected vs observed lamport movement
  • Absolute lamport tolerance avoids false positive fee-noise pauses
  • Auto-pause on delta breach respects wallet autoPauseOnBreach control

Security Guardrails

Critical Security Rules:
  1. Agent logic must never hold or print private keys
  2. Signing is only through wallet-engine sign boundary
  3. Keep execution pipeline ordering intact
  4. Simulate before submit whenever supported
  5. Default demos/tests to Solana devnet
  6. Do not bypass durable outbox for spend-capable actions
  7. Choose signer backend explicitly for production

Signer Backends

Signer Configuration

Known Limitations

Persistence is SQLite-backed and single-node. Horizontal scale needs Postgres + distributed queue infrastructure.
Solend/DEX adapters depend on external API contracts and availability. They fail closed instead of returning synthetic fallback quotes.
Escrow adapter requires a deployed escrow program (ESCROW_PROGRAM_ID) and account wiring in intent. This repo does not ship a deployed escrow program artifact.
MCP includes a validated generic gateway.request tool, but named high-level MCP wrappers are curated (not exhaustive one-by-one parity wrappers).

Minimal Integration Runbook

1

Install dependencies

2

Configure environment

Minimum required:
  • WALLET_KEY_ENCRYPTION_SECRET
  • API_GATEWAY_API_KEYS (or keep default)
3

Start services

4

Create wallet & agent

5

Attach policy

6

Execute intent

7

Poll until confirmed/failed

8

Handle approval gate (if needed)

9

Collect artifacts

Smoke Tests

Devnet Validation

Version History

Next Steps

CLI Integration

Explore the command-line interface

SDK Integration

Integrate with TypeScript SDK

MCP Tools

Use MCP server for AI agents

API Reference

Browse REST API endpoints