aixyz
aixyzフレームワークを使ってAIエージェントを構築、実行、デプロイするために、新規エージェント作成、ツール追加、A2A/MCPプロトコル接続、x402マイクロペイメント設定、Vercelへのデプロイなどを行うSkill。
📜 元の英語説明(参考)
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.
🇯🇵 日本人クリエイター向け解説
aixyzフレームワークを使ってAIエージェントを構築、実行、デプロイするために、新規エージェント作成、ツール追加、A2A/MCPプロトコル接続、x402マイクロペイメント設定、Vercelへのデプロイなどを行うSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o aixyz.zip https://jpskill.com/download/10186.zip && unzip -o aixyz.zip && rm aixyz.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/10186.zip -OutFile "$d\aixyz.zip"; Expand-Archive "$d\aixyz.zip" -DestinationPath $d -Force; ri "$d\aixyz.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
aixyz.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
aixyzフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
aixyz を使用したエージェントの構築
どのような時に使用するか
このスキルは、以下のような場合に使用します。
- 新しい AI エージェントプロジェクトをゼロから構築する場合
- 既存のエージェントに新しいツールを追加する場合
- エージェントまたはツールに x402 マイクロペイメントを設定する場合
- A2A および MCP プロトコルのエンドポイントを接続する場合
- エージェントを Vercel にデプロイする場合
手順
1. 新しいプロジェクトの構築
bunx create-aixyz-app my-agent
cd my-agent
これにより、標準的なプロジェクトレイアウトが作成されます。
my-agent/
aixyz.config.ts # エージェントのメタデータとスキル
app/
agent.ts # エージェントの定義
tools/ # ツールごとに1つのファイル
icon.png # エージェントのアイコン (オプション)
package.json
vercel.json
2. エージェントの設定 (aixyz.config.ts)
すべてのエージェントは、プロジェクトのルートに設定ファイルが必要です。アイデンティティ、支払いアドレス、およびスキルを宣言します。
import type { AixyzConfig } from "aixyz/config";
const config: AixyzConfig = {
name: "My Agent",
description: "このエージェントが何をするかの簡単な説明。",
version: "0.1.0",
x402: {
payTo: process.env.X402_PAY_TO!,
network: process.env.NODE_ENV === "production" ? "eip155:8453" : "eip155:84532",
},
skills: [
{
id: "my-skill",
name: "My Skill",
description: "このスキルが呼び出し元に対して何をするか。",
tags: ["example"],
examples: ["Do something with my skill"],
},
],
};
export default config;
3. 支払い: accepts エクスポート (aixyz/accepts)
すべてのエージェントとツールは、aixyz/accepts から accepts をエクスポートすることにより、支払いを要求するかどうかを制御します。
このエクスポートがない場合、エンドポイントは支払いゲーティングに登録されません。
import type { Accepts } from "aixyz/accepts";
// x402 マイクロペイメントを要求する
export const accepts: Accepts = {
scheme: "exact",
price: "$0.001", // USD建て
network: "eip155:8453", // オプション — デフォルトは config.x402.network
payTo: "0x...", // オプション — デフォルトは config.x402.payTo
};
// または、エンドポイントを無料にする
export const accepts: Accepts = {
scheme: "free",
};
A2A エンドポイントをゲートするには app/agent.ts から accepts をエクスポートし、MCP 経由でそのツールをゲートするにはツールファイルからエクスポートします。
4. ツールの作成 (app/tools/<name>.ts)
app/tools/ 内の各ファイルは、Vercel AI SDK tool をデフォルトのエクスポートとしてエクスポートします。
import { tool } from "ai";
import { z } from "zod";
import type { Accepts } from "aixyz/accepts";
export const accepts: Accepts = { scheme: "exact", price: "$0.001" };
export default tool({
description: "このツールが何をするかの簡単な説明。",
inputSchema: z.object({
query: z.string().describe("ツールへの入力"),
}),
execute: async ({ query }) => {
// ここにロジックを記述します
return { result: query };
},
});
_ で始まるファイル (例: _helpers.ts) は、自動生成されたサーバーによって無視されます。
5. エージェントの定義 (app/agent.ts)
import { openai } from "@ai-sdk/openai";
import { stepCountIs, ToolLoopAgent } from "ai";
import type { Accepts } from "aixyz/accepts";
import myTool from "./tools/my-tool";
export const accepts: Accepts = { scheme: "exact", price: "$0.005" };
export default new ToolLoopAgent({
model: openai("gpt-4o-mini"),
instructions: "あなたは親切なアシスタントです。",
tools: { myTool },
stopWhen: stepCountIs(10),
});
6. 環境変数 (.env ファイル)
環境変数は、Next.js と同じ優先順位でロードされます。
.env.<NODE_ENV>.local(最優先;NODE_ENV=testの場合はロードされません).env.local.env.<NODE_ENV>(例:.env.production,.env.development).env
一般的な変数:
| 変数 | 説明 |
|---|---|
X402_PAY_TO |
支払いを受け取るデフォルトの EVM アドレス |
X402_NETWORK |
デフォルトの支払いネットワーク (例: eip155:8453) |
X402_FACILITATOR_URL |
カスタムのファシリテーター URL (デフォルト: https://x402.agently.to/facilitator) |
OPENAI_API_KEY |
OpenAI API キー |
7. エージェントのアイコン (app/icon.png)
アイコンファイルを app/icon.png に配置します (.svg, .jpeg, .jpg も使用できます)。aixyz build 中に、これは次のようになります。
icon.pngとして出力にコピーされますfavicon.ico(32×32) に変換され、public/に配置されます
設定は不要です — ビルドステップはアイコンを自動的に検出し、処理します。
8. カスタムファシリテーター (app/accepts.ts)
デフォルトでは、aixyz は https://x402.agently.to/facilitator を使用して支払いを検証します。別の
ファシリテーターを使用するには、app/accepts.ts を作成し、facilitator をエクスポートします。
import { HTTPFacilitatorClient } from "aixyz/accepts";
export const facilitator = new HTTPFacilitatorClient({
url: process.env.X402_FACILITATOR_URL ?? "https://www.x402.org/facilitator",
});
9. 開発サーバーの実行
bun run dev # aixyz dev — http://localhost:3000 でホットリロードを開始します
bun run dev -- -p 4000 # カスタムポート
自動的に提供されるエンドポイント:
| エンドポイント | プロトコル | 説明 |
|---|---|---|
/.well-known/agent-card.json |
A2A | エージェントの検出 |
/agent |
A2A | JSON-RPC, x402 支払いゲート |
/mcp |
MCP | MCP クライアントとのツール共有 |
10. (オプション) カスタムサーバー (app/server.ts)
完全に制御するには、app/server.ts を作成します。これは自動生成よりも優先されます。
mcp.register の accepts フィールドはオプションです — 支払いをゲートせずにツールを公開するには、省略してください。
import { AixyzServer } from "aixyz/server";
import { useA2A } from "aixyz/server/adapters/a2a";
import { AixyzMCP } from "aixyz/server/adapters/mcp";
import * as agent from "./agent";
import myTool from "./tools/my-tool";
const server = new AixyzServer();
await server.i
(原文がここで切り詰められています) 📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Build an Agent with aixyz
When to Use
Use this skill when:
- Scaffolding a new AI agent project from scratch
- Adding a new tool to an existing agent
- Configuring x402 micropayments for an agent or tool
- Wiring up A2A and MCP protocol endpoints
- Deploying an agent to Vercel
Instructions
1. Scaffold a new project
bunx create-aixyz-app my-agent
cd my-agent
This creates the standard project layout:
my-agent/
aixyz.config.ts # Agent metadata and skills
app/
agent.ts # Agent definition
tools/ # One file per tool
icon.png # Agent icon (optional)
package.json
vercel.json
2. Configure the agent (aixyz.config.ts)
Every agent needs a config file at the project root. Declare identity, payment address, and skills:
import type { AixyzConfig } from "aixyz/config";
const config: AixyzConfig = {
name: "My Agent",
description: "A short description of what this agent does.",
version: "0.1.0",
x402: {
payTo: process.env.X402_PAY_TO!,
network: process.env.NODE_ENV === "production" ? "eip155:8453" : "eip155:84532",
},
skills: [
{
id: "my-skill",
name: "My Skill",
description: "What this skill does for callers.",
tags: ["example"],
examples: ["Do something with my skill"],
},
],
};
export default config;
3. Payment: accepts export (aixyz/accepts)
Every agent and tool controls whether it requires payment by exporting accepts from aixyz/accepts.
Without this export, the endpoint is not registered for payment gating.
import type { Accepts } from "aixyz/accepts";
// Require x402 micropayment
export const accepts: Accepts = {
scheme: "exact",
price: "$0.001", // USD-denominated
network: "eip155:8453", // optional — defaults to config.x402.network
payTo: "0x...", // optional — defaults to config.x402.payTo
};
// Or make the endpoint free
export const accepts: Accepts = {
scheme: "free",
};
Export accepts from app/agent.ts to gate the A2A endpoint, or from a tool file to gate that tool via MCP.
4. Write a tool (app/tools/<name>.ts)
Each file in app/tools/ exports a Vercel AI SDK tool as its default export:
import { tool } from "ai";
import { z } from "zod";
import type { Accepts } from "aixyz/accepts";
export const accepts: Accepts = { scheme: "exact", price: "$0.001" };
export default tool({
description: "A short description of what this tool does.",
inputSchema: z.object({
query: z.string().describe("Input to the tool"),
}),
execute: async ({ query }) => {
// your logic here
return { result: query };
},
});
Files prefixed with _ (e.g. _helpers.ts) are ignored by the auto-generated server.
5. Define the agent (app/agent.ts)
import { openai } from "@ai-sdk/openai";
import { stepCountIs, ToolLoopAgent } from "ai";
import type { Accepts } from "aixyz/accepts";
import myTool from "./tools/my-tool";
export const accepts: Accepts = { scheme: "exact", price: "$0.005" };
export default new ToolLoopAgent({
model: openai("gpt-4o-mini"),
instructions: "You are a helpful assistant.",
tools: { myTool },
stopWhen: stepCountIs(10),
});
6. Environment variables (.env files)
Environment variables are loaded in the same priority order as Next.js:
.env.<NODE_ENV>.local(highest priority; not loaded whenNODE_ENV=test).env.local.env.<NODE_ENV>(e.g..env.production,.env.development).env
Common variables:
| Variable | Description |
|---|---|
X402_PAY_TO |
Default EVM address to receive payments |
X402_NETWORK |
Default payment network (e.g. eip155:8453) |
X402_FACILITATOR_URL |
Custom facilitator URL (default: https://x402.agently.to/facilitator) |
OPENAI_API_KEY |
OpenAI API key |
7. Agent icon (app/icon.png)
Place an icon file at app/icon.png (also accepts .svg, .jpeg, .jpg). During aixyz build it is:
- Copied to the output as
icon.png - Converted to a
favicon.ico(32×32) and placed inpublic/
No configuration needed — the build step auto-detects and processes the icon.
8. Custom facilitator (app/accepts.ts)
By default, aixyz uses https://x402.agently.to/facilitator to verify payments. To use a different
facilitator, create app/accepts.ts and export a facilitator:
import { HTTPFacilitatorClient } from "aixyz/accepts";
export const facilitator = new HTTPFacilitatorClient({
url: process.env.X402_FACILITATOR_URL ?? "https://www.x402.org/facilitator",
});
9. Run the dev server
bun run dev # aixyz dev — starts at http://localhost:3000 with hot reload
bun run dev -- -p 4000 # custom port
Endpoints served automatically:
| Endpoint | Protocol | Description |
|---|---|---|
/.well-known/agent-card.json |
A2A | Agent discovery |
/agent |
A2A | JSON-RPC, x402 payment gate |
/mcp |
MCP | Tool sharing with MCP clients |
10. (Optional) Custom server (app/server.ts)
For full control, create app/server.ts. It takes precedence over auto-generation.
The accepts field in mcp.register is optional — omit it to expose the tool without payment gating:
import { AixyzServer } from "aixyz/server";
import { useA2A } from "aixyz/server/adapters/a2a";
import { AixyzMCP } from "aixyz/server/adapters/mcp";
import * as agent from "./agent";
import myTool from "./tools/my-tool";
const server = new AixyzServer();
await server.initialize();
server.unstable_withIndexPage();
useA2A(server, agent);
const mcp = new AixyzMCP(server);
await mcp.register("myTool", {
default: myTool,
// accepts is optional — omit to expose without payment
accepts: { scheme: "exact", price: "$0.001" },
});
await mcp.connect();
export default server;
11. Build and deploy to Vercel
bun run build # aixyz build — outputs Vercel Build Output API v3 to .vercel/output/
vercel deploy
Examples
Working examples in the repo: examples/agent-boilerplate, examples/agent-price-oracle, examples/agent-byo-facilitator.
Common Edge Cases
- Missing
x402.network— always providex402.network; it has no fallback. - Missing
x402.payTo— setX402_PAY_TOin.env.localor provide it directly in config. - Tool file ignored — files prefixed with
_are excluded; rename to remove the prefix. - Agent card missing skills —
skillsdefaults to[]; add at least one entry to be discoverable. - Free endpoint — export
accepts: { scheme: "free" }to expose an endpoint without payment. - Port conflict in dev — use
aixyz dev -p <port>to change the default port (3000).