Skip to main content
An aixyz agent is defined by a small set of files in a standard layout. Run aixyz dev and the framework auto-generates a server from them.

Directory Layout

requiredMust be providedoptional overrideProvide to override auto-generated behavior

Key Files

* If omitted, the build skips A2A endpoints and only serves tools via MCP.

How It Works

The build pipeline scans the app/ directory to auto-generate a server:
  1. Reads aixyz.config.ts for agent metadata and skills
  2. Imports app/agent.ts for the main agent definition (if present)
  3. Discovers all .ts files in app/agents/ for sub-agents (each gets its own A2A endpoint)
  4. Discovers all .ts files in app/tools/ (excluding _ prefixed files)
  5. Registers SessionPlugin (with custom store from app/session.ts if present)
  6. Wires up A2A (when agents exist), MCP (when tools exist), and x402 endpoints automatically
The result is a server exposing:
  • A2A at /agent and /.well-known/agent-card.json (main agent)
  • A2A at /{name}/agent and /{name}/.well-known/agent-card.json (per sub-agent in app/agents/)
  • MCP at /mcp
  • x402 payment verification on gated endpoints
For full control, provide app/server.ts to override auto-generation. See the Custom Server template for an example.