Skip to main content

Prerequisites

  • Bun 1.3.9 or later
  • An API key for your preferred LLM provider (e.g., OpenAI)
Verify your Bun version:
bun --version  # Should be ≥ 1.3.9

Create a New Project

Scaffold a new agent project with create-aixyz-app:
bunx create-aixyz-app my-agent
cd my-agent
The CLI prompts for an agent name and optional OpenAI API key. Use -y to skip prompts:
bunx create-aixyz-app my-agent -y

Start the Dev Server

bun run dev
This runs aixyz dev, which watches app/ and aixyz.config.ts for changes and automatically restarts the server. Your agent is available at http://localhost:3000.

Verify It Works

# Check the agent card
curl http://localhost:3000/.well-known/agent-card.json

# Test the A2A endpoint
curl -X POST http://localhost:3000/agent \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"tasks/send","id":"1","params":{"id":"task-1","message":{"role":"user","parts":[{"type":"text","text":"Hello"}]}}}'
The MCP endpoint is available at http://localhost:3000/mcp for MCP-compatible clients.

Endpoints

Once running, your agent exposes:
EndpointProtocolDescription
/.well-known/agent-card.jsonA2AAgent discovery card
/agentA2AJSON-RPC endpoint with x402 payment gate
/mcpMCPTool sharing with MCP clients