API Reference
NvwaX Developer API 完整文档。所有公开 API 使用 API Key 认证(Authorization: Bearer nvwx_xxx)。
认证方式#
所有 API 请求需要在 HTTP Header 中携带 API Key:
Authorization: Bearer nvwx_your_api_key_hereAPI Key 可在用户中心 > Profile > API Keys 页面创建。不同权限的 Key 可以访问不同的 API 端点。
Marketplace - Agent/AiTeam 市场#
/api/v1/marketplace/agents搜索已发布的 Agent 列表
认证方式: API Key (marketplace:read)
请求参数
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| q | string | 否 | 搜索关键词 |
| category | string | 否 | 分类过滤 |
| tags | string | 否 | 标签过滤(逗号分隔) |
| page | number | 否 | 页码,默认 1 |
| limit | number | 否 | 每页数量,最大 50,默认 20 |
响应示例
{
"success": true,
"data": {
"agents": [
{
"id": "agent-uuid",
"name": "电商客服 Agent",
"description": "智能客服机器人...",
"category": "customer-service",
"tags": ["ecommerce", "chatbot"],
"rating": 4.7,
"download_count": 1523,
"publish_status": "published"
}
],
"total": 156
}
}/api/v1/marketplace/agents/:id获取单个 Agent 完整详情
认证方式: API Key (marketplace:read)
/api/v1/marketplace/categories获取 Agent 分类列表(含各分类数量)
认证方式: API Key (marketplace:read)
/api/v1/marketplace/aiteams搜索已发布的 AiTeam 列表
认证方式: API Key (marketplace:read)
请求参数
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| q | string | 否 | 搜索关键词 |
| industry | string | 否 | 行业过滤 |
| page | number | 否 | 页码,默认 1 |
| limit | number | 否 | 每页数量,最大 50,默认 20 |
/api/v1/marketplace/aiteams/:id获取单个 AiTeam 完整详情
认证方式: API Key (marketplace:read)
/api/v1/marketplace/industries获取行业分类列表
认证方式: API Key (marketplace:read)
/api/v1/marketplace/plugins/:id获取行业插件详情(含 Agent 明细)
认证方式: API Key (marketplace:read)
Agents - Agent 管理#
/api/v1/agents创建新的 Agent
认证方式: API Key (agent:create)
请求示例
{
"name": "我的自定义 Agent",
"description": "用于处理订单查询的智能体",
"config": {
"model": "deepseek-v3",
"temperature": 0.7,
"system_prompt": "你是一个订单查询助手..."
},
"skills": ["order-query"],
"category": "customer-service",
"tags": ["ecommerce", "order"]
}/api/v1/agents列出当前开发者创建的所有 Agent
认证方式: API Key (agent:read)
请求参数
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| status | string | 否 | 过滤状态: draft, published, private |
| page | number | 否 | 页码,默认 1 |
| limit | number | 否 | 每页数量,默认 20 |
/api/v1/agents/:id获取自己的 Agent 详情
认证方式: API Key (agent:read)
/api/v1/agents/:id更新 Agent 配置
认证方式: API Key (agent:update)
/api/v1/agents/:id删除 Agent
认证方式: API Key (agent:delete)
/api/v1/agents/:id/publish发布 Agent 到市场
认证方式: API Key (agent:publish)
/api/v1/agents/:id/unpublish取消发布 Agent
认证方式: API Key (agent:publish)
AiTeams - AiTeam 管理#
/api/v1/aiteams创建新的 AiTeam
认证方式: API Key (aiteam:create)
请求示例
{
"name": "电商运营团队",
"description": "负责电商日常运营的 AI 团队",
"members": [
{ "agent_id": "agent-uuid-1", "role": "客服主管" },
{ "agent_id": "agent-uuid-2", "role": "数据分析师" }
],
"category": "ecommerce",
"tags": ["operations"]
}/api/v1/aiteams列出当前开发者创建的所有 AiTeam
认证方式: API Key (aiteam:read)
/api/v1/aiteams/:id获取自己的 AiTeam 详情
认证方式: API Key (aiteam:read)
/api/v1/aiteams/:id更新 AiTeam 配置
认证方式: API Key (aiteam:update)
/api/v1/aiteams/:id删除 AiTeam
认证方式: API Key (aiteam:delete)
/api/v1/aiteams/:id/publish发布 AiTeam 到市场
认证方式: API Key (aiteam:publish)
/api/v1/aiteams/:id/unpublish取消发布 AiTeam
认证方式: API Key (aiteam:publish)
Search - 搜索#
/api/v1/search/agents全网 Agent 搜索(GitHub / HuggingFace / 本地)
认证方式: API Key (search:read)
请求参数
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| q | string | 是 | 搜索关键词 |
| page | number | 否 | 页码,默认 1 |
| limit | number | 否 | 每页数量,最大 50,默认 20 |
/api/v1/search/skillsSkillHub 技能搜索
认证方式: API Key (search:read)
请求参数
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| q | string | 是 | 搜索关键词 |
| page | number | 否 | 页码,默认 1 |
| limit | number | 否 | 每页数量,最大 50,默认 20 |
/api/v1/search/unified统一搜索(同时搜索 Agents + Skills)
认证方式: API Key (search:read)
请求示例
{
"q": "客服机器人",
"page": 1,
"limit": 20
}Export - 导出下载#
/api/v1/agents/:id/export导出 Agent(JSON / YAML / ProClaw 格式)
认证方式: API Key (export:read)
请求示例
{
"format": "json",
"includeMetadata": true,
"includeImplementation": false
}/api/v1/aiteams/:id/export导出 AiTeam(JSON / YAML / ProClaw 格式)
认证方式: API Key (export:read)
请求示例
{
"format": "json",
"includeMetadata": true
}/api/v1/export/batch批量导出多个 Agent/AiTeam
认证方式: API Key (export:read)
请求示例
{
"items": [
{ "type": "agent", "id": "agent-uuid-1" },
{ "type": "aiteam", "id": "aiteam-uuid-2" }
],
"format": "json"
}/api/v1/export/history获取导出历史记录
认证方式: API Key (export:read)
请求参数
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| limit | number | 否 | 返回条数,默认 20 |
错误码#
| 状态码 | 错误码 | 说明 |
|---|---|---|
| 400 | VALIDATION_ERROR | 请求参数验证失败 |
| 401 | MISSING_AUTH_HEADER / INVALID_API_KEY | 缺少认证信息或 API Key 无效 |
| 403 | INSUFFICIENT_PERMISSIONS | API Key 权限不足 |
| 404 | NOT_FOUND | 请求的资源不存在 |
| 429 | RATE_LIMIT_EXCEEDED | 超过速率限制 |
| 500 | INTERNAL_ERROR | 服务器内部错误 |
SDK 快速用法
import { createClient } from '@nvwax/sdk';
const client = createClient('nvwx_your_api_key');
// 浏览市场
const agents = await client.marketplace.searchAgents({ q: '客服', limit: 10 });
// 管理 Agent
const myAgent = await client.agents.create({ name: '我的 Agent', description: '...' });
await client.agents.publish(myAgent.data.id);
// 管理 AiTeam
const team = await client.aiteams.create({
name: '运营团队',
members: [{ agent_id: agentId, role: '主管' }]
});
// 搜索
const results = await client.search.searchAgents({ q: 'transformer' });
// 导出
const exportResult = await client.exportModule.agent(agentId, { format: 'json' });