> ## Documentation Index
> Fetch the complete documentation index at: https://aixyz.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

> Install Bun and create your first aixyz agent

## Prerequisites

* [Bun](https://bun.sh) 1.3.9 or later
* An API key for your preferred LLM provider (e.g., OpenAI)

Verify your Bun version:

```bash theme={null}
bun --version  # Should be ≥ 1.3.9
```

## Create a New Project

Scaffold a new agent project with `create-aixyz-app`:

```bash theme={null}
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:

```bash theme={null}
bunx create-aixyz-app my-agent -y
```

## Start the Dev Server

```bash theme={null}
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

```bash theme={null}
# 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:

| Endpoint                       | Protocol | Description                              |
| ------------------------------ | -------- | ---------------------------------------- |
| `/.well-known/agent-card.json` | A2A      | Agent discovery card                     |
| `/agent`                       | A2A      | JSON-RPC endpoint with x402 payment gate |
| `/mcp`                         | MCP      | Tool sharing with MCP clients            |
