Multi-agent commerce framework on X Layer — OKX Onchain OS, x402 payments, ERC-8004/8183, MCP server, A2A agent card. 12+ mainnet transactions.
NexusAgent is an early-stage TypeScript project in the AI payments / x402 ecosystem, focused on a2a, ai-agents, erc-8004, erc-8183. It currently has 1 GitHub stars and 0 forks, and sits alongside related tools like Civilis-public, agoragentic-integrations, clicks-protocol.
NexusAgent is a multi-agent commerce and execution framework on X Layer.
It helps third-party AI agents:
NexusAgent is intentionally split into two product surfaces:
This is the real product wedge.
It shows how an external agent can enter the system through:
AI Skills + Agentic WalletMCP + Agentic WalletOpen API + custom integrationThe onboarding surface defines:
This is the demo surface that proves the builder surface has value.
The current hero workflow is:
Check the OKB market signal and, if the run is approved, execute a bounded stablecoin proof transfer on X Layer.
The workflow runs through 9 explicit states:
Onboarding -> Intent -> Signal -> Decision -> Preparation -> Payment -> Execution -> Evaluation -> Settlement
NexusAgent demonstrates the infrastructure layer of the agentic economy:
The agent roles are intentionally separated:
Sentinel gathers external contextArbiter decides whether execution should proceedExecutor prepares and performs the bounded actionEvaluator checks whether the visible chain result matches the expected outcomeThis keeps the system from collapsing into a single script that both acts and certifies itself.
In particular, the Executor and Evaluator split follows a simple evaluator-optimizer principle: action and verification should be distinct when correctness matters.
| Layer | Technology | Status |
|---|---|---|
| Market Signal | OKX Onchain OS Market API (authenticated) | Live |
| DEX Routing | OKX Onchain OS DEX Aggregator API | Live (quote-only) |
| Payment | x402 protocol via OKX Facilitator (EIP-3009 + on-chain settle) | Live |
| Settlement | X Layer ERC-20 transfers | Live (mainnet) |
| Agent Identity | ERC-8004 AgentRegistry on X Layer mainnet | Deployed + Integrated |
| Agent Commerce | ERC-8183 AgentEscrow on X Layer mainnet | Deployed + Integrated |
| Agent Discovery | A2A Agent Card (/.well-known/agent.json, 3 skills) |
Live |
| Connectivity | MCP server (stdio, 5 tools) | Live |
| Wallet Security | OKX Agentic Wallet (sign-info API integrated; TEE via OKX) | Integrated |
NexusAgent integrates with OKX Agentic Wallet at the API level:
sign-info API before chain operations (integrated in executor)OKX Agentic Wallet provides additional capabilities that agents can use directly:
npx skills add okx/onchainos-skillsNexusAgent calls three Onchain OS APIs in production code paths:
| API | Code Path | Evidence |
|---|---|---|
| Market API | integrations/okxMarket.ts → Sentinel signal |
OKB price in workflow output + output/okx-proof/ |
| DEX API | integrations/okxDex.ts → DEX quote |
Quote response (quote-only, no swap) |
| Wallet API | integrations/okxWallet.ts → gas estimation |
Sign-info params in executor step output |
All authenticated with HMAC-SHA256 signed headers per OKX Onchain OS specification.
Evidence artifacts: output/okx-proof/latest.json
This repo is intentionally strict about protocol truthfulness.
GET /api/signals/premium-okb returns HTTP 402 with PAYMENT-REQUIRED header, accepts X-PAYMENT for access/.well-known/agent.json with 3 skillstransfer_event when escrow is funded on-chain0x5c49ba298cccab1e6c05d1c27b4cc02816d21aa7f3c9de3c40c8d0eba905d37f| Contract | Address | Standard |
|---|---|---|
| AgentRegistry | 0xB4dDf24c8a6cBDEB976d27C4A142f076272EfEC0 |
ERC-8004 |
| AgentEscrow | 0xa5f560C60F5912bE1a44D24A78B6e82e7C50F455 |
ERC-8183 |
4 agents registered on-chain. Escrow lifecycle (create → fund → submit → complete) runs during approved workflows. Current deployment uses single-signer demo ownership; multi-party signing is planned for a future release.
| TX | Explorer | Flow |
|---|---|---|
0xd6d0fa98... |
OKLink | EIP-3009 → OKX verify → settle |
0x41fe4526... |
OKLink | EIP-3009 → OKX verify → settle |
All proof artifacts: shared/PROOF_ARTIFACT_REGISTER.md
The backend exposes the following endpoints:
POST /api/workspacesGET /api/workspaces/:workspaceId/contextPOST /api/workspaces/:workspaceId/agentsGET /api/workspaces/:workspaceId/agentsPOST /api/workspaces/:workspaceId/agents/:agentId/verify-walletPOST /api/workspaces/:workspaceId/workflowsGET /api/workspaces/:workspaceId/workflowsGET /api/workspaces/:workspaceId/workflows/:workflowRunIdGET /api/workspaces/:workspaceId/workflows/:workflowRunId/proofGET /api/workspaces/:workspaceId/usageGET /api/signals/okb — Live OKB market signal (Onchain OS Market API)GET /api/signals/premium-okb — x402-gated premium signal (returns 402 without payment)GET /api/integrations/dex-quote — DEX aggregator quote via Onchain OSGET /api/integrations/status — Integration status dashboardGET /.well-known/agent.json — A2A v0.3 Agent CardGET /api/workspaces/:id/usage/summary — Billing summary with per-run pricingThese endpoints establish:
See the Onboarding page for the full quickstart flow.
From the repo root:
./scripts/start_dev_stack.sh
Or run each surface explicitly:
cd ./backend
npm install
npm run dev
cd ./frontend
npm install
npm run dev -- --host 0.0.0.0
Or run the checks directly:
./scripts/validate_all.sh
./scripts/overnight_guard.sh
Check X Layer mainnet readiness:
./scripts/check_mainnet_readiness.sh
If you want to exercise the live X Layer testnet flow with a dedicated test key:
export NEXUSAGENT_XLAYER_TEST_PRIVATE_KEY=...
./scripts/validate_testnet_flow.sh
If you want to prove that the live builder layer can create a workspace-scoped workflow and produce a bounded live settlement artifact:
export NEXUSAGENT_XLAYER_TEST_PRIVATE_KEY=...
./scripts/validate_alpha_live_execution.sh
The repository now includes a hosted preview blueprint:
Preview deployment assumptions:
VITE_API_BASE_URLNEXUSAGENT_ALLOWED_ORIGINSFrontend env example:
Hosted preview blueprint notes:

Validation currently includes:
docs/ — protocol truth table, environment contract, validation runbookshared/ — agent specs, workflow state machine, proof register, API shapesfrontend/ — React/Vite frontendbackend/ — Express/TypeScript backend with OKX Onchain OS integrationcontracts/ — Solidity smart contracts (ERC-8004 AgentRegistry, ERC-8183 AgentEscrow)scripts/ — validation, dev stack, sync checksexamples/ — AI integration demos (REST client, MCP guide, x402 payment flow)# Demo 1: External AI agent calls NexusAgent REST API end-to-end
npx tsx examples/01_ai_agent_rest_client.ts
# Demo 2: x402 payment protocol flow (HTTP 402 → pay → 200)
bash examples/03_x402_payment_flow.sh
# Guide: MCP integration for Claude Desktop, GPT, LangChain, etc.
cat examples/02_mcp_integration.md
NexusAgent charges per workflow run:
All billing is usage-based, settled on X Layer via x402. No subscriptions, no credit cards, no KYC.
Workspace usage summaries available at GET /api/workspaces/:id/usage/summary.
NexusAgent is designed to become a builder-facing agent workflow operating layer.
Core value chain: Paid market signal → controlled execution → on-chain settlement and proof
Target users: teams building agent-based trading strategies, research automation, or task settlement systems on X Layer.
A live AI-agent civilization on X Layer with x402 payments, ERC-8183 job flows, and ERC-8004 identity & trust.
Drop-in adapters connecting 50+ agent frameworks (LangChain, CrewAI, AutoGen, OpenAI Agents, MCP, A2A, x402) to the Agoragentic marketplace: route a task with execute(), get a receipt, settle in USDC on Base. Monorepo + npm packages for MCP, Micro ECF, and local readiness tooling.
Autonomous yield for AI agents on Base. 80% liquid, 20% earning. No lockup. One SDK call.
A local-first AI agent with persistent memory, emotional intelligence, and a peer-to-peer skills economy.
Agent behavior that compiles
The A2A x402 Extension brings cryptocurrency payments to the Agent-to-Agent (A2A) protocol, enabling agents to monetize their services through on-chain payments. This extension revives the spirit of HTTP 402 "Payment Required" for the decentralized agent ecosystem.
The trust layer for agent-to-agent commerce — natural-language mandates, ERC-7710 delegated permissions, x402 payments, escrow, and dispute resolution as one open, catch-all Agent Skill / Claude Code plugin.
Aser is a lightweight, self-assembling AI Agent frame.
Golang SDK for A2A Protocol