aixyz by agentlyhq/aixyz
npx skills add https://github.com/agentlyhq/aixyz --skill aixyz项目发展迅速。请务必查阅以下来源以获取最新详情:
--help — 运行它以发现当前可用的标志以下内容不会改变:
bun 安装,使用 bun 运行,使用 bun test 测试ai 包) — 来自 "ai" 的 、、 — 请访问 查看当前版本广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
ToolLoopAgenttool()stepCountIs()@ai-sdk/* 适配器 — @ai-sdk/openai 是默认选项,但任何 Vercel AI SDK 提供商都适用 (@ai-sdk/anthropic、@ai-sdk/google、@ai-sdk/amazon-bedrock 等)create-aixyz-app 始终可用 用于脚手架搭建 — 使用 bunx create-aixyz-app --help 查看所有选项aixyz CLI 始终可用 — aixyz dev 用于开发/测试循环,aixyz build 用于构建.env、.env.local (不要提交)、.env.<NODE_ENV>、.env.<NODE_ENV>.local# 查看所有脚手架选项 (TTY 在 AI/CI 中被禁用 — 每个提示都有对应的标志)
bunx create-aixyz-app --help
# 使用默认选项搭建脚手架
bunx create-aixyz-app my-agent --yes
# 开发/测试循环
cd my-agent && bun run dev # aixyz dev — 热重载地址为 http://localhost:3000
# 为部署进行构建
bun run build # aixyz build
入门所需的最简结构:
my-agent/
aixyz.config.ts # 智能体身份、支付配置、技能声明
app/
agent.ts # 根智能体 (来自 "ai" 的 ToolLoopAgent) — 必需
tools/name.ts # 工具 (可选) — 每个文件自动注册;不直接导出
agents/name.ts # 子智能体 (可选) — 每个文件对应 /name/agent 端点
package.json
.env.local # API 密钥 — 切勿提交
包含可选文件的完整结构:
my-agent/
aixyz.config.ts
app/
agent.ts
agents/ # 子智能体
tools/ # 工具;以 _ 为前缀的文件会被忽略
server.ts # 自定义服务器 (覆盖自动生成)
accepts.ts # 自定义 x402 协调器
erc-8004.ts # 链上 ERC-8004 身份
icon.png # 智能体图标
package.json
vercel.json
.env.local
从 app/agent.ts (控制 /agent 端点) 或从工具文件 (控制其在 /mcp 端点的访问) 导出 accepts:
import type { Accepts } from "aixyz/accepts";
export const accepts: Accepts = { scheme: "exact", price: "$0.005" };
没有 accepts 导出 → 端点不对外暴露。scheme: "free" → 明确声明免费。完整详情请参阅 aixyz.sh/getting-started/payments。
在链上注册您的智能体:
aixyz erc-8004 register --help # 查看所有非 TTY 标志
aixyz erc-8004 register --url https://my-agent.vercel.app --broadcast
完整详情请参阅 aixyz.sh/protocols/erc-8004。
测试是可选的,但推荐高级用户使用。测试使用 Bun 内置的运行器 (bun:test)。编写确定性测试 (不调用 API),并使用 test.skipIf(!process.env.OPENAI_API_KEY) 处理非确定性测试。使用来自 "aixyz/model" 的 fake() 进行完全离线的、CI 安全的测试。
bun test # 运行所有测试
bun test app/agent.test.ts # 运行特定文件
完整详情请参阅 aixyz.sh/getting-started/testing。
每个已部署的智能体会自动暴露以下端点:
| 端点 | 协议 | 描述 |
|---|---|---|
/.well-known/agent-card.json | A2A | 智能体发现卡片 |
/agent | A2A | 带有 x402 支付网关的 JSON-RPC 端点 |
/mcp | MCP | 与 MCP 客户端共享工具 |
github.com/AgentlyHQ/aixyz 中的 examples/ 目录包含针对常见模式的工作智能体。如有疑问,请查找与您需求匹配的示例。
如果您有 GitHub 访问权限,可以克隆仓库并直接探索 examples/:
gh repo clone AgentlyHQ/aixyz
ls aixyz/examples/
每个示例都包含 aixyz.config.ts、app/agent.ts 和 app/tools/,您可以从中学习。aixyz.sh 上的模板选项卡 记录了每个示例。
如果您克隆了仓库,关键区域包括:
packages/
aixyz/ # 框架核心 (服务器、适配器、x402)
aixyz-cli/ # CLI:dev、build、erc-8004 命令
aixyz-config/ # 配置加载 (Zod 验证的 aixyz.config.ts)
aixyz-erc-8004/ # ERC-8004 ABI、地址、模式
create-aixyz-app/ # 脚手架 CLI
docs/ # Mintlify 文档
examples/ # 工作智能体示例
在任何 CLI 命令上使用 --help,在 aixyz.sh 阅读文档,或浏览 github.com/AgentlyHQ/aixyz/tree/main/examples 中的示例,以获取最新信息。
每周安装量
177
代码仓库
GitHub 星标数
65
首次出现
2026 年 2 月 23 日
安全审计
安装于
opencode177
gemini-cli177
github-copilot177
amp177
codex177
kimi-cli177
The project evolves quickly. Always consult these sources for up-to-date details:
--help — run it to discover the current flagsThese things will not change:
bun, run with bun, test with bun testai package) — ToolLoopAgent, tool(), stepCountIs() from "ai" — check ai-sdk.dev for the current version@ai-sdk/* adapters — @ai-sdk/openai is the default but any Vercel AI SDK provider works (@ai-sdk/anthropic, @ai-sdk/google, @ai-sdk/amazon-bedrock, etc.)create-aixyz-app is always available for scaffolding — use bunx create-aixyz-app --help to see all optionsaixyz CLI is always available — aixyz dev for the dev/test loop, aixyz build for building.env, .env.local (don't commit), .env.<NODE_ENV>, .env.<NODE_ENV>.local# 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 build
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 commit
Full 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.local
Export accepts from app/agent.ts (gates /agent) or from a tool file (gates it on /mcp):
import type { Accepts } from "aixyz/accepts";
export const accepts: Accepts = { scheme: "exact", price: "$0.005" };
No accepts export → endpoint is not exposed. scheme: "free" → explicitly free. See aixyz.sh/getting-started/payments for full details.
Register your agent on-chain with:
aixyz erc-8004 register --help # see all non-TTY flags
aixyz erc-8004 register --url https://my-agent.vercel.app --broadcast
See aixyz.sh/protocols/erc-8004 for full details.
Tests are optional but recommended for advanced users. Tests use Bun's built-in runner (bun:test). Write deterministic tests (no API calls) and use test.skipIf(!process.env.OPENAI_API_KEY) for non-deterministic ones. Use fake() from "aixyz/model" for fully offline CI-safe tests.
bun test # run all tests
bun test app/agent.test.ts # run a specific file
See aixyz.sh/getting-started/testing for full details.
Every deployed agent exposes these endpoints automatically:
| 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 |
The examples/ directory in github.com/AgentlyHQ/aixyz contains working agents for common patterns. When in doubt, find an example that matches what you need.
If you have GitHub access, clone the repo and explore examples/ directly:
gh repo clone AgentlyHQ/aixyz
ls aixyz/examples/
Each example has an aixyz.config.ts, app/agent.ts, and app/tools/ you can learn from. The Templates tab on aixyz.sh documents each example.
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 examples
Use --help 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.
Weekly Installs
177
Repository
GitHub Stars
65
First Seen
Feb 23, 2026
Security Audits
Gen Agent Trust HubPassSocketWarnSnykWarn
Installed on
opencode177
gemini-cli177
github-copilot177
amp177
codex177
kimi-cli177
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
109,600 周安装