跳转到主要内容
POST
/
api
/
v1
/
agents
Create Agent
curl --request POST \
  --url https://api.agentwallex.com/api/v1/agents \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "agent_name": "research-bot",
  "agent_description": "Market research automation agent",
  "chain": "eip155:84532",
  "metadata": "{\"team\":\"growth\"}"
}
'
{
  "id": "agent_abc123",
  "agent_name": "research-bot",
  "agent_description": "Market research automation agent",
  "wallet": {
    "address": "0x1234567890abcdef1234567890abcdef12345678",
    "chain": "eip155:84532"
  },
  "status": "active",
  "created_at": "2025-06-01T10:00:00Z"
}
创建一个自动配置 MPC 安全钱包的新代理。钱包地址通过分布式密钥生成(DKG)生成,可立即接收资金。

请求体

agent_name
string
必填
代理的显示名称。在您的账户内必须唯一。
agent_description
string
代理用途的可选描述。
chain
string
必填
代理钱包的 CAIP-2 链标识符。请参阅支持的链了解可用选项。示例:eip155:1(Ethereum)、eip155:8453(Base)、eip155:84532(Base Sepolia 测试网)
metadata
string
JSON 编码的元数据字符串,用于自定义键值对。

响应

示例

curl -X POST https://api.agentwallex.com/api/v1/agents \
  -H "X-API-Key: awx_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_name": "research-bot",
    "agent_description": "Market research automation agent",
    "chain": "eip155:84532",
    "metadata": "{\"team\":\"growth\"}"
  }'
Response
{
  "id": "agent_abc123",
  "agent_name": "research-bot",
  "agent_description": "Market research automation agent",
  "wallet": {
    "address": "0x1234567890abcdef1234567890abcdef12345678",
    "chain": "eip155:84532"
  },
  "status": "active",
  "created_at": "2025-06-01T10:00:00Z"
}

授权

X-API-Key
string
header
必填

API key authentication. Keys are prefixed with awx_.

请求体

application/json
agent_name
string
必填

Display name for the agent. Must be unique within your account.

chain
string
必填

CAIP-2 chain identifier for the agent's wallet (e.g., eip155:1 for Ethereum, eip155:8453 for Base, eip155:84532 for Base Sepolia testnet).

agent_description
string

Optional description of the agent's purpose.

metadata
string

JSON-encoded metadata string for custom key-value pairs.

响应

Agent created successfully.

An AI agent with an MPC-secured wallet.

id
string

Unique agent identifier (e.g., agent_abc123).

agent_name
string

Agent display name.

agent_description
string

Agent description.

wallet
object

An on-chain wallet associated with an agent.

status
enum<string>

Agent status.

可用选项:
active,
inactive
metadata
string

JSON-encoded metadata string.

created_at
string<date-time>

ISO 8601 creation timestamp.