aixyz
Original:🇺🇸 English
Translated
Build, run, and deploy an AI agent using the aixyz framework. Use this skill when creating a new agent, adding tools, wiring up A2A/MCP protocols, configuring x402 micropayments, or deploying to Vercel.
3installs
Sourceagentlyhq/aixyz
Added on
NPX Install
npx skill4agent add agentlyhq/aixyz aixyzTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Working with aixyz
Where to Find the Latest Information
The project evolves quickly. Always consult these sources for up-to-date details:
- Docs site: aixyz.sh — Getting Started guides, API reference, protocol docs, and templates
- GitHub: github.com/AgentlyHQ/aixyz — source, issues, and examples
- CLI help: every command has — run it to discover the current flags
--help
Immutable Facts
These things will not change:
- Runtime is always Bun — install with , run with
bun, test withbunbun test - Agent logic uses the Vercel AI SDK (package) —
ai,ToolLoopAgent,tool()fromstepCountIs()— check ai-sdk.dev for the current version"ai" - LLM providers use adapters —
@ai-sdk/*is the default but any Vercel AI SDK provider works (@ai-sdk/openai,@ai-sdk/anthropic,@ai-sdk/google, etc.)@ai-sdk/amazon-bedrock - is always available for scaffolding — use
create-aixyz-appto see all optionsbunx create-aixyz-app --help - CLI is always available —
aixyzfor the dev/test loop,aixyz devfor buildingaixyz build - Environment variables follow Next.js load order — ,
.env(don't commit),.env.local,.env.<NODE_ENV>.env.<NODE_ENV>.local
Getting Started
bash
# See all scaffolding options (TTY is disabled in AI/CI — every prompt has a flag)
bunx create-aixyz-app --help
# Scaffold with defaults
bunx create-aixyz-app my-agent --yes
# Dev/test loop
cd my-agent && bun run dev # aixyz dev — hot reload at http://localhost:3000
# Build for deployment
bun run build # aixyz buildCore Concepts
Project layout
Bare minimum to get started:
my-agent/
aixyz.config.ts # Agent identity, payment config, skills declaration
app/
agent.ts # Root agent (ToolLoopAgent from "ai") — required
tools/name.ts # Tools (optional) — each file auto-registered; not exported directly
agents/name.ts # Sub-agents (optional) — each file → /name/agent endpoint
package.json
.env.local # API keys — never commitFull layout with optional files:
my-agent/
aixyz.config.ts
app/
agent.ts
agents/ # Sub-agents
tools/ # Tools; _prefix files are ignored
server.ts # Custom server (overrides auto-generation)
accepts.ts # Custom x402 facilitator
erc-8004.ts # On-chain ERC-8004 identity
icon.png # Agent icon
package.json
vercel.json
.env.localGetting paid (x402)
Export from (gates ) or from a tool file (gates it on ):
acceptsapp/agent.ts/agent/mcpts
import type { Accepts } from "aixyz/accepts";
export const accepts: Accepts = { scheme: "exact", price: "$0.005" };No export → endpoint is not exposed. → explicitly free.
See aixyz.sh/getting-started/payments for full details.
acceptsscheme: "free"On-chain identity (ERC-8004)
Register your agent on-chain with:
bash
aixyz erc-8004 register --help # see all non-TTY flags
aixyz erc-8004 register --url https://my-agent.vercel.app --broadcastSee aixyz.sh/protocols/erc-8004 for full details.
Testing (optional)
Tests are optional but recommended for advanced users. Tests use Bun's built-in runner (). Write
deterministic tests (no API calls) and use for non-deterministic
ones. Use from for fully offline CI-safe tests.
bun:testtest.skipIf(!process.env.OPENAI_API_KEY)fake()"aixyz/model"bash
bun test # run all tests
bun test app/agent.test.ts # run a specific fileSee aixyz.sh/getting-started/testing for full details.
Protocol Endpoints
Every deployed agent exposes these endpoints automatically:
| Endpoint | Protocol | Description |
|---|---|---|
| A2A | Agent discovery card |
| A2A | JSON-RPC endpoint with x402 payment gate |
| MCP | Tool sharing with MCP clients |
Examples
The directory in github.com/AgentlyHQ/aixyz contains
working agents for common patterns. When in doubt, find an example that matches what you need.
examples/If you have GitHub access, clone the repo and explore directly:
examples/bash
gh repo clone AgentlyHQ/aixyz
ls aixyz/examples/Each example has an , , and you can learn from.
The Templates tab on aixyz.sh documents each example.
aixyz.config.tsapp/agent.tsapp/tools/Repo Structure (for exploration)
If you clone the repo, the key areas are:
packages/
aixyz/ # Framework core (server, adapters, x402)
aixyz-cli/ # CLI: dev, build, erc-8004 commands
aixyz-config/ # Config loading (Zod-validated aixyz.config.ts)
aixyz-erc-8004/ # ERC-8004 ABIs, addresses, schemas
create-aixyz-app/ # Scaffolding CLI
docs/ # Mintlify docs
examples/ # Working agent examplesUse on any CLI command, read the docs at aixyz.sh, or browse examples in
github.com/AgentlyHQ/aixyz/tree/main/examples
for the most current information.
--help