Skip to main content

Prerequisites

  • Bun 1.3.9 or later
  • An OpenAI API key (for the default template)

Create a New Agent

1

Scaffold the project

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
2

Start the dev server

bun run dev
Your agent starts at http://localhost:3000 with hot reload enabled.
3

Test the agent

Verify the agent card is served:
curl http://localhost:3000/.well-known/agent-card.json

What Gets Created

my-agent/
  aixyz.config.ts       # Agent identity, payment, and skills
  app/
    agent.ts            # Agent definition (Vercel AI SDK)
    tools/
      weather.ts        # Example tool
    icon.png            # Agent icon
  package.json
  tsconfig.json
  vercel.json
  .env.local            # OPENAI_API_KEY goes here

Endpoints

Once running, your agent exposes:
EndpointProtocolDescription
/.well-known/agent-card.jsonA2AAgent discovery card
/agentA2AJSON-RPC task handler (x402-gated)
/mcpMCPTool endpoint for MCP clients

Next Steps