pixeloffice/x402-autonomous-agent-starter
PixelRouter x402 โ Autonomous AI Agent Starter & Solana Settlement Gateway
1-Click Autonomous Agent Starter Kit with x402 Solana Micro-Payments and Stateful Memory Bridge via PixelRouter.
๐ Quickstart (Python)
pip install pixeloffice-x402
python -m pixeloffice_x402 init my-agent
cd my-agent
python agent.py๐ฆ Quickstart (Node.js & TypeScript)
npx @pixeloffice-eu/x402 init my-agent
cd my-agent
npm install
npm start๐ง Key Capabilities
- 0.24ms ed25519 Micro-Payments: Agents settle directly in USDC on Solana per query without credit card friction.
- Stateful Memory Bridge: Switch between frontier models (
ox-alpha,deepseek-chat,claude-3.5-sonnet) while preserving context at 85% token cost reduction. - OpenAI Drop-in Compatibility: 100% compatible with official
openaiSDK, LangChain, and CrewAI.
Integrations & Discovery
Axiom Relay API Doctor is a free, optional check of an OpenAPI JSON document before an agent connects to a service. It reports missing response definitions, operation IDs and other common contract issues. This is an advisory document check: it does not probe the described service, fetch remote references, certify endpoint safety or authorize execution.
The Python example exports check_api_doctor(apiDescription) and an OpenAI-compatible API_DOCTOR_TOOL declaration. Register the declaration with your existing agent's tools and dispatch that function through the ordinary HTTP tool runtime. The example uses a fixed HTTPS endpoint, explicit timeouts, no redirects, a 500,000-byte request ceiling and surfaced HTTP/response errors. No API key or wallet is needed for this free check.
python -m pip install -r examples/requirements.txt
python examples/api_doctor_tool.pyThe included fixture checks two operations and expects one error and two warnings. It was verified against the public endpoint on September 10, 2026. Send only API documents you are comfortable submitting to a public service; do not include credentials or secrets.
from examples.api_doctor_tool import API_DOCTOR_TOOL, check_api_doctor
# Add this declaration to the tools registered with your existing agent.
free_tools = [API_DOCTOR_TOOL]
free_tool_handlers = {"check_api_doctor": check_api_doctor}For MCP clients, Axiom Relay also offers free Streamable HTTP discovery at https://axiomrelay.io/mcp/discovery. See the MCP connection guide, HTTP contract, and public client examples. Free tool execution does not invoke this starter's x402 payment wrapper. Any later paid execution continues through the starter's separate payment flow.
Source guide
This repository hosts the static Hugging Face Space that introduces the PixelRouter starter. The Python and Node.js scaffold commands above retrieve separate published packages; their generated agent runtime is outside this repository.
Hugging Face serves index.html with sdk: static; this repository has no application server, build step, database or server routes. The browser demo uses JavaScript DOM updates and timers. The optional Python 3.10+ example sends { "apiDescription": object } to POST https://axiomrelay.io/api/v1/agents/api-doctor and returns the successful response's data object. The static Space and this example require no environment variables. Paid starter credentials, when used in a separately generated project, belong in that project's private environment.
Recent changes
- 2026-09-10: Added the optional Axiom Relay adapter, dependency pin, example license and integration/source guide (
examples/,README.md). Verified the included fixture against the public free endpoint.
