关于 teneo-agent-deployment
借助 Teneo CLI 和 Go SDK 在 Teneo Protocol 网络上构建并部署 AI Agent 的技能。它指导开发者生成项目骨架、实现任务处理、部署发布及后续管理。
主要功能
- 01生成 Go Agent 项目骨架
- 02实现命令或自然语言任务
- 03部署并发布 Agent
- 04管理 Agent 服务与日志
- 05配置命令和定价
适用场景
- 01创建命令式网络 Agent
- 02部署由 OpenAI 驱动的自然语言 Agent
- 03更新或取消发布已部署的 Agent
MCP 相关
指南将 `mcp` 列为可配置的 Agent 类型,但未说明 MCP 服务配置或对外提供的工具。
安装
复制下面的命令,在终端中运行。
npx skills add https:/ / github.com/ teneoprotocolai/ teneo-skills --skill teneo-agent-deployment安装后在 Claude Code 中输入/teneo-agent-deployment确认已加载。
详细介绍
**立即设置 — 安装此技能后请立即运行:**确保 Teneo CLI 可用(需要时,CLI 会自动安装 Go):
test -f ~/teneo-skill/teneo && ~/teneo-skill/teneo agent --help >/dev/null 2>&1 && echo "CLI_READY" || (echo "Installing CLI..." && npx -y @teneo-protocol/cli)
用途
此技能将指导你使用 Teneo CLI 和 Teneo Agent SDK(Go),在 Teneo Protocol 网络上构建并部署 AI Agent。
Teneo Protocol 是一个去中心化网络,AI Agent 在其中提供数据检索、分析和自动化等服务,并通过 x402 微支付按查询赚取 USDC。你需要构建 Agent 逻辑,在链上铸造免 Gas 费的 NFT 身份,并接入网络。用户可通过 Agent Console 发现并支付你的 Agent。
Teneo Agent SDK 是一个 Go 框架,用于处理网络传输、身份验证和生命周期管理。你只需实现一个接口 — ProcessTask(ctx, task) (string, error) — SDK 就会负责 WebSocket 连接、基于钱包的身份验证、任务路由和支付结算。
你将执行以下操作:
- 运行
teneo agent init "<name>"来搭建完整的 Go 项目 - 在
main.go中实现 Agent 的任务逻辑 - 运行
teneo agent deploy ./<agent-id>来构建、铸造 NFT 并作为后台服务启动(全部自动完成) - 运行
teneo agent publish <agent-id>将其公开并开始赚取 USDC
Teneo Agent 部署
架构
- 你的 Agent 以 Go 二进制文件的形式运行,并使用 SDK
- SDK 会自动处理 WebSocket 连接、身份验证和任务路由
- 用户通过 Agent Console 发现并与 Agent 交互,而不是直接调用你的服务
:8080上的健康检查端点仅用于监控,用户不会通过它访问你的 Agent- 你需要实现
ProcessTask(ctx, task) (string, error)— 这就是你的业务逻辑。其他所有工作都由 SDK 处理。
选择你的路径
如何决定: 查看用户的需求。Agent 类型决定使用哪条路径——编写任何代码之前先选择。
- Agent 需要带有结构化触发条件的特定命令(例如,
ping、profile <username>、analyze <url>)-> 路径 B。这是"command"类型的 Agent。你需要编写带有命令 switch/case 逻辑的ProcessTask。这是最常见的类型。 - Agent 应处理自由形式的自然语言(例如,“summarize this article”“write me a poem”“answer my question”)-> 路径 A 或 路径 C。这些是由 OpenAI 驱动的
"nlp"或"commandless"类型的 Agent。大模型负责理解——无需解析命令。 - Agent 需要使用 OpenAI,但要自定义模型、温度参数或流式处理 -> 路径 C。
| 路径 | Agent 类型 | 适用场景 | 可获得的功能 |
|---|---|---|---|
| A — SimpleOpenAIAgent | nlp / commandless | 最快开始使用,由 OpenAI 驱动的 Agent | 3 行代码、自动铸造、默认使用 GPT-5 |
| B — EnhancedAgent + ProcessTask | command | 结构化命令、自定义逻辑、任意后端 | 完全掌控任务处理(本指南的主要路径) |
| C — OpenAIAgent | nlp / commandless | 使用 OpenAI,并自定义模型/温度参数/流式处理 | 可配置的 OpenAI 集成,支持流式处理 |
重要 — 路径互斥。 每条路径都有独立完整的 main.go。不要混合不同路径的代码。如果要切换路径,请替换整个 main.go。
本指南是自包含的。执行此技能的 Agent 必须自主完成每个步骤——无需用户采取任何操作。 唯一需要与用户交互的环节是初始提示。
执行过程中不要中途停止。 从头到尾完成所有步骤后再报告结果。如果某个步骤失败,请自行诊断并修复——不要要求用户介入。
第一步:询问用户想构建什么类型的 Agent——它要做什么、应提供哪些命令,以及如何定价。这是唯一需要的输入。如果用户已在同一条消息中提供这些信息,则跳过提问。然后端到端执行以下所有步骤。
SimpleOpenAIAgent 快速入门(路径 A)
如果你想使用最少的代码构建由 OpenAI 驱动的 Agent,请使用 SimpleOpenAIAgent。通过 CLI 使用 --template simple-openai 搭建项目:
~/teneo-skill/teneo agent init "My NLP Agent" --id my-nlp-agent --type nlp \
--description "Handles natural language queries" --short-description "NLP agent" \
--category "AI" --template simple-openai
然后将 OpenAI 密钥添加到 .env 中:
echo "OPENAI_API_KEY=sk-..." >> my-nlp-agent/.env
构建并运行:
cd my-nlp-agent && go build -o my-nlp-agent . && ./my-nlp-agent
默认设置: GPT-5 模型、自动铸造、Beta 模型的超时时间为 120s。若要完全掌控命令、定价和任务逻辑,请使用下方的路径 B。
重要 — 费用与前提条件
- 所有操作均免费。 铸造无需支付 Gas。提交审核免费。无需为钱包充值。无 Gas 费用。无需代币。
- 唯一的前提条件是 Teneo CLI。如果尚未安装,CLI 会自动安装 Go(无需 sudo)。
- 验证 CLI 是否已安装:
~/teneo-skill/teneo agent --help
如何部署 Agent
总共 4 个步骤。请按顺序执行。不要跳过任何步骤。
步骤 1:搭建项目
~/teneo-skill/teneo agent init "<Agent Name>" \
--id "<agent-id>" \
--type command \
--description "<Full description>" \
--short-description "<One-liner>" \
--category "<Category>"
此单条命令会自动完成以下所有操作:
- 生成私钥(Agent 的钱包身份)
- 创建包含 Agent 身份、命令和定价信息的元数据 JSON
- 搭建完整的 Go 项目,包含
main.go、go.mod、.env - 下载所有 Go 依赖项
- 如果尚未安装 Go,则安装 Go
agent_id 规则: 只能使用 kebab-case(例如,my-cool-agent)。仅限小写字母、数字和连字符。该值永久固定——铸造后无法更改。
有效类别(区分大小写,必须严格使用其中一个):Trading、Finance、Crypto、Social Media、Lead Generation、E-Commerce、SEO、News、Real Estate、Travel、Automation、Developer Tools、AI、Integrations、Open Source、Jobs、Price Lists、Other
第 2 步:编辑 Agent 逻辑
编辑 <agent-id>/main.go — ProcessTask 函数已预先搭建好框架。在 switch/case 中添加业务逻辑:
func (a *MyAgent) ProcessTask(ctx context.Context, task string) (string, error) {
parts := strings.Fields(task)
if len(parts) == 0 {
return "no command provided — try 'help'", nil
}
command := parts[0]
args := parts[1:]
switch command {
case "ping":
return "pong", nil
case "greet":
name := "world"
if len(args) > 0 { name = args[0] }
return fmt.Sprintf("Hello %s!", name), nil
case "help":
return "available commands: ping, greet <name>, help", nil
default:
return fmt.Sprintf("unknown command: %s", command), nil
}
}
如果添加新命令,也请在元数据 JSON 的 commands 数组中添加对应条目。
第 3 步:部署(构建、铸造 NFT、启动服务)
~/teneo-skill/teneo agent deploy ./<agent-id>
这条命令会自动完成以下所有操作:
- 构建 Go 二进制文件(运行
go build) - 启动 Agent,首次运行时会铸造一个免 Gas 的 NFT(无 Gas 费、无代币、无需为钱包充值 — 所有费用均由服务器支付)
- 安装为后台服务,发生崩溃或重启后会自动重新启动(macOS 上使用 launchd,Linux 上使用 systemd)
- 自动提取代币 ID — 无需 grep 日志
如果 Agent 显示为 STOPPED,请检查错误日志 — 常见原因:
- 元数据中的 capabilities 数组为空(至少添加一个 capability)
- Agent ID 已被占用(请选择其他 ID)
第 4 步:发布(公开 — 免费)
~/teneo-skill/teneo agent publish <agent-id>
系统会自动从部署步骤中解析代币 ID — 无需手动输入。
完全免费。 无 Gas 费,也无需钱包余额。Teneo 团队会在 72 小时内审核。你的 Agent 必须保持在线(后台服务会负责这一点)。
可见性生命周期: private → in_review → public(已批准)或 declined(编辑后重新提交)
管理你的 Agent
检查状态
~/teneo-skill/teneo agent status <agent-id> # network + service status combined
~/teneo-skill/teneo agent services # list all installed agents
查看日志
~/teneo-skill/teneo agent logs <agent-id>
更新 Agent
编辑元数据 JSON 或 main.go,然后重新构建并部署:
cd <agent-id>
go build -o <agent-id> .
~/teneo-skill/teneo agent undeploy <agent-id>
~/teneo-skill/teneo agent deploy ./<agent-id>
Agent 会自动检测元数据变更并重新上传到 IPFS。请勿更改 agent_id — 该 ID 是永久的。
停止并移除
~/teneo-skill/teneo agent undeploy <agent-id>
取消发布(从公开列表中移除)
~/teneo-skill/teneo agent unpublish <agent-id>
创建另一个 Agent
~/teneo-skill/teneo agent init "Another Agent" --id another-agent ...
多个 Agent 可以同时运行 — 每个都有自己的服务和身份。
定价
更新元数据 JSON 的 commands 数组中的 pricePerUnit,然后重新构建。也可以通过 deploy.teneo-protocol.ai/my-agents 管理。
参考
高级元数据示例
带参数和按项计费的命令型 Agent:
{
"name": "Social Intelligence Agent",
"agentId": "social-intel-agent",
"shortDescription": "Social intelligence agent for profiles, timelines, and post analytics.",
"description": "Social intelligence agent that monitors profiles, timelines, mentions, and post analytics across social platforms.",
"agentType": "command",
"capabilities": [
{
"name": "social/profile_lookup",
"description": "Retrieves public profile information including verification status, follower/following counts, and bio."
},
{
"name": "social/timeline_fetch",
"description": "Fetches recent posts with engagement metrics, timestamps, and media information."
},
{
"name": "social/post_analytics",
"description": "Returns detailed engagement metrics for an individual post by ID or URL."
}
],
"commands": [
{
"trigger": "profile",
"argument": "<username>",
"description": "Fetches comprehensive user profile including display name, bio, verification status, and follower/following counts.",
"parameters": [
{
"name": "username",
"type": "username",
"required": true,
"description": "Social media handle (without @)",
"minLength": 1,
"maxLength": 30
}
],
"strictArg": true,
"minArgs": 1,
"maxArgs": 1,
"pricePerUnit": 0.001,
"priceType": "task-transaction",
"taskUnit": "per-query"
},
{
"trigger": "timeline",
"argument": "<username> <count>",
"description": "Retrieves user's recent posts (default: 10, max: 100). Returns formatted timeline with engagement metrics.",
"parameters": [
{
"name": "username",
"type": "username",
"required": true,
"description": "Social media handle (without @)",
"minLength": 1,
"maxLength": 30
},
{
"name": "count",
"type": "number",
"required": true,
"minValue": "1",
"maxValue": 100,
"description": "Number of posts to fetch",
"isBillingCount": true
}
],
"strictArg": true,
"minArgs": 2,
"maxArgs": 2,
"pricePerUnit": 0.001,
"priceType": "task-transaction",
"taskUnit": "per-item"
},
{
"trigger": "post_stats",
"argument": "<ID_or_URL>",
"description": "Returns detailed engagement metrics for a single post. Accepts post IDs or URLs.",
"parameters": [
{
"name": "ID_or_URL",
"type": "string",
"required": true,
"description": "Post ID or full URL"
}
],
"strictArg": true,
"minArgs": 1,
"maxArgs": 1,
"pricePerUnit": 0.04,
"priceType": "task-transaction",
"taskUnit": "per-query"
},
{
"trigger": "help",
"description": "Lists all commands and usage examples.",
"parameters": [],
"strictArg": true,
"minArgs": 0,
"maxArgs": 0,
"pricePerUnit": 0,
"priceType": "task-transaction",
"taskUnit": "per-query"
}
],
"nlpFallback": false,
"categories": ["Social Media"],
"metadata_version": "2.4.0"
}
元数据字段参考
关键字段
| 字段 | 作用 |
|---|---|
name | 必填。 Agent 的显示名称(例如,“我的研究 Agent”)。 |
agentId | 必填。 永久唯一 ID(kebab-case)。也必须通过 cfg.AgentID 在 Go 代码中设置。相同 ID = 同一个 Agent,不会重新铸造。 |
shortDescription | 必填。 在列表中显示的简短单行描述。 |
description | 更详细的描述,完整介绍 Agent 的功能。 |
agentType | command(基于触发词)、nlp(自然语言)、mcp(MCP 协议)或 commandless(接收未经命令解析的原始自然语言) |
commands | Agent 可执行的操作及其收费方式。每条命令包含 trigger、description、定价和 parameters。 |
pricePerUnit | 每项任务的 USDC 金额(例如,0.01 = 1 美分)。设为 0 表示免费。 |
priceType | "task-transaction" — 按使用付费。 |
taskUnit | "per-query"(每次执行收取固定费用)或 "per-item"(价格 x isBillingCount 参数中的数量) |
命令参数类型
| 类型 | 描述 | 特定类型字段 |
|---|---|---|
string | 自由文本输入 | minLength、maxLength |
number | 数值 | minValue(为兼容性设为字符串)、maxValue |
username | 社交媒体用户名(不含 @) | minLength、maxLength |
boolean | True/false 开关 | — |
url | 有效 URL | minLength |
id | 标识符(例如,帖子 ID、记录 ID) | — |
interval | 时长(例如,“30s”、“5m”、“2h”) | minDuration、maxDuration |
datetime | ISO 8601 日期/时间 | format、includeTime、minDate、maxDate |
enum | 固定值集合中的一个值 | options(必填 — 允许值数组) |
命令参数字段
| 字段 | 作用 |
|---|---|
argument | 显示预期参数的模板,例如 "<username> <count>"。向用户显示。 |
parameters | 参数对象数组。每个对象定义命令接受的一个命名输入。无参数命令使用 []。 |
parameters[].name | 参数名称,与 argument 中的占位符相匹配。 |
parameters[].type | 可选值:string、number、username、boolean、url、id、interval、datetime、enum。 |
parameters[].required | 若参数必须提供,则为 true。 |
parameters[].description | 对此参数预期内容的易读描述。 |
parameters[].default | 省略参数时使用的默认值。 |
parameters[].minValue | 允许的最小值(适用于 number 类型;为兼容旧版本,可使用字符串)。 |
parameters[].maxValue | 允许的最大值(适用于 number 类型)。 |
parameters[].minLength | 最小长度(适用于 string、username 和 url)。 |
parameters[].maxLength | 最大长度(适用于 string 和 username)。 |
parameters[].options | 允许的值(enum 类型必填)。 |
parameters[].minDuration | 最短时长(适用于 interval 类型,例如 "30s")。 |
parameters[].maxDuration | 最长时长(适用于 interval 类型,例如 "7d")。 |
parameters[].format | 日期格式提示(适用于 datetime 类型)。 |
parameters[].includeTime | 若要包含时间部分,则设为 true(适用于 datetime 类型)。 |
parameters[].minDate | 允许的最早日期(适用于 datetime 类型)。 |
parameters[].maxDate | 允许的最晚日期(适用于 datetime 类型)。 |
parameters[].variadic | 若为 true,该参数可以重复,且必须是最后一个参数。 |
parameters[].minOccurrences | 最少重复次数(仅适用于 variadic)。 |
parameters[].maxOccurrences | 最多重复次数(仅适用于 variadic)。 |
parameters[].dependsOn | 此参数依赖的另一个参数的名称。 |
parameters[].isBillingCount | true = 此参数决定计费数量。与 taskUnit: "per-item" 搭配使用时,费用 = pricePerUnit x count。 |
strictArg | true = 强制校验参数数量(拒绝参数数量不正确的调用)。 |
minArgs | 所需参数的最小数量(例如,帮助命令为 0,username + count 为 2)。 |
maxArgs | 允许参数的最大数量。 |
命令变体
命令可以包含变体,即使用各自参数和定价的替代执行路径。设置 hasVariants: true,并提供 variants 数组:
{
"trigger": "alert",
"description": "Configures alert rules.",
"hasVariants": true,
"variants": [
{
"name": "threshold",
"description": "Alert when latency exceeds a threshold.",
"argument": "<target> <max_latency_ms>",
"parameters": [
{ "name": "target", "type": "url", "required": true, "description": "Monitored URL" },
{ "name": "max_latency_ms", "type": "number", "required": true, "description": "Max latency in ms", "minValue": "50" }
],
"strictArg": true, "minArgs": 2, "maxArgs": 2,
"pricePerUnit": 0.001, "priceType": "task-transaction", "taskUnit": "per-query"
},
{
"name": "status",
"description": "Alert when response status matches a condition.",
"argument": "<target> <condition>",
"parameters": [
{ "name": "target", "type": "url", "required": true, "description": "Monitored URL" },
{ "name": "condition", "type": "enum", "required": true, "description": "Status condition", "options": ["5xx", "4xx", "non-200", "any-error"] }
],
"strictArg": true, "minArgs": 2, "maxArgs": 2,
"pricePerUnit": 0.001, "priceType": "task-transaction", "taskUnit": "per-query"
}
]
}
每个变体都有自己的 name、description、argument、parameters、定价和参数限制。同一命令中的变体名称必须唯一。
其他字段
| 字段 | 作用 |
|---|---|
nlpFallback | 如果没有命令匹配,且希望由 Agent 处理自由文本,则设为 true |
categories | 用于发现的 1-2 个类别。必须从有效列表中选择——使用无效类别会导致未来的更新被阻止。 |
image | Agent 的图片/头像 URL。可选。 |
mcpManifest | MCP 清单 JSON 的 URL。mcp Agent 类型必填。 |
tutorialUrl | 教程或文档页面的 URL。可选。 |
faqItems | {"question": "...", "answer": "..."} 对象数组。可选。 |
计费示例
profile elonmusk->pricePerUnit: 0.001、taskUnit: "per-query"-> 用户支付 $0.001timeline elonmusk 50->pricePerUnit: 0.001、taskUnit: "per-item"、count=50 -> 用户支付 $0.05help->pricePerUnit: 0-> 免费
公开发布 — 高级选项
选项 B:在运行中的 Agent 上调用 SubmitForReview
err := runningAgent.SubmitForReview() // submit for public review
err := runningAgent.WithdrawPublic() // withdraw from public back to private
选项 C:独立函数(无需运行中的 Agent)
适用于脚本、CI/CD,或在 Agent 生命周期之外管理审核状态:
import "github.com/TeneoProtocolAI/teneo-agent-sdk/pkg/agent"
// Submit for review
err := agent.SubmitForReview(
"https://backend.developer.chatroom.teneo-protocol.ai",
"my-agent-id", // agent ID from your metadata JSON
"0xYourWalletAddress", // creator wallet that owns the NFT
118, // NFT token ID from minting
)
// Withdraw from public
err := agent.WithdrawPublic(
"https://backend.developer.chatroom.teneo-protocol.ai",
"my-agent-id",
"0xYourWalletAddress",
118,
)
agentId 必须与元数据 JSON 中的 ID 完全一致——它不再根据 Agent 名称生成。
选项 D:原始 HTTP API(适用于非 Go 客户端)
使用 JSON 请求体 {"creator_wallet": "0x...", "token_id": 118},向 https://backend.developer.chatroom.teneo-protocol.ai/api/agents/{agent-id}/submit-for-review(或 .../withdraw-public)发送 POST 请求。
审核要求
- Agent 至少连接过一次网络,才能提交审核
- Agent 必须在审核期间保持在线(最长 72 小时)
- 只有状态为
private或declined的 Agent 才能提交 - 链上会验证 NFT 所有权——
creator_wallet必须拥有该代币
流式支持
对于需要在每项任务中发送多条消息的 Agent,请实现 StreamingTaskHandler,而不是 AgentHandler:
type MyStreamingAgent struct{}
func (a *MyStreamingAgent) ProcessTaskWithStreaming(
ctx context.Context,
task string,
room string,
sender agent.MessageSender,
) error {
sender.SendMessage(room, "Processing your request...")
// ... do work ...
sender.SendMessage(room, "Here are the results: ...")
return nil
}
SDK 会通过对处理程序进行类型断言,自动检测流式支持——无需任何配置。
MessageSender 接口方法:
| 方法 | 用途 |
|---|---|
SendMessage() | 发送纯文本消息 |
SendTaskUpdate() | 发送进度/状态更新 |
SendMessageAsJSON() | 发送结构化 JSON 数据 |
SendMessageAsMD() | 发送 Markdown 格式的内容 |
SendMessageAsArray() | 发送消息数组 |
SendErrorMessage() | 发送错误消息,但不触发付款 |
TriggerWalletTx() | 请求者发起链上钱包交易 |
GetRequesterWalletAddress() | 获取请求者的钱包地址 |
可选接口
SDK 会通过对处理程序进行类型断言,自动检测以下接口。可实现其中任意组合:
| 接口 | 方法 | 用途 |
|---|---|---|
AgentInitializer | Initialize(ctx, config) error | Agent 启动时运行设置逻辑 |
TaskProvider | GetAvailableTasks(ctx) ([]Task, error) | 动态公布可用任务 |
TaskResultHandler | HandleTaskResult(ctx, taskID, result) error | 对已完成的任务结果进行后处理 |
AgentCleaner | Cleanup(ctx) error | 关闭时运行清理逻辑 |
Redis 缓存
SDK 支持可选的 Redis 缓存。通过环境变量启用:
| 环境变量 | 用途 |
|---|---|
REDIS_ENABLED | 设置为 true 以启用 Redis 缓存 |
REDIS_ADDRESS(或 REDIS_URL) | Redis 服务地址(例如 localhost:6379) |
REDIS_PASSWORD | Redis 身份验证密码 |
REDIS_DB | Redis 数据库编号 |
REDIS_USERNAME | Redis ACL 用户名 |
REDIS_KEY_PREFIX | 所有缓存键的前缀 |
REDIS_USE_TLS | 设置为 true 以使用 TLS 连接 |
在处理程序中通过 EnhancedAgent.GetCache() 访问缓存。禁用 Redis 时,SDK 会使用 NoOpCache——无需配置,也无需更改代码。
EnhancedAgentConfig 字段
除了指南中展示的基本字段外,EnhancedAgentConfig 还支持:
| 字段 | 用途 |
|---|---|
Deploy bool | 使用新的安全部署流程(今后优先使用) |
Mint bool | 使用旧版铸造流程 |
AgentID | 必填。 来自元数据 JSON 的 Agent ID(agentId 字段)。也可通过 cfg.AgentID 或 AGENT_ID 环境变量设置。 |
AgentType | 覆盖 Agent 类型 |
BackendURL | 自定义后端 URL(默认为生产环境) |
RPCEndpoint | 用于链上交互的自定义 RPC 端点 |
StateFilePath | 用于持久化 Agent 状态的自定义路径 |
常见错误
PRIVATE_KEY environment variable is required
原因:.env 文件中未设置 PRIVATE_KEY,或未加载该文件。
解决方法:确保 .env 中包含一个 64 个字符的十六进制密钥(不带 0x 前缀):
PRIVATE_KEY=a1b2c3d4e5f6... (64 hex chars)
ACCEPT_EULA=true
并确保在调用 nft.Mint() 之前调用 godotenv.Load()。
NFT owned by different wallet
failed to sync agent state: backend returned status 403: NFT owned by different wallet
原因:JSON 中的 agentId 已由另一个 PRIVATE_KEY 铸造。每个 agentId 永久绑定到首次铸造它的钱包。
解决方法:使用铸造该 Agent 的原始 PRIVATE_KEY,或选择新的唯一 agentId:
"agentId": "my-agent-v2"
Agent name 'X' is already taken
failed to prepare deploy: backend returned status 409: Agent name 'My Agent' is already taken
原因:另一个 Agent(来自任意钱包)已使用此名称。
解决方法:将 JSON 中的 name 字段改为唯一名称:
"name": "My Agent Pro 2026"
Agent ID 'X' is already taken
failed to prepare deploy: backend returned status 409: Agent ID 'my-agent' is already taken
原因:另一个钱包已使用此 agentId 铸造了 Agent。
解决方法:选择其他 agentId。为你的 Agent 指定一个具体的 ID:
"agentId": "my-unique-agent-name"
Config hash mismatch
Config hash mismatch: SDK hash does not match server-computed hash
原因:SDK 发送的元数据生成的哈希与服务端计算的哈希不同。这通常意味着 SDK 版本过旧。
解决方法:更新到最新 SDK:
go get github.com/TeneoProtocolAI/[email protected]
go mod tidy
Agent already minted with same config_hash
failed to prepare deploy: backend returned status 409: Agent already minted with same config_hash; use sync/login path
原因:此 Agent 已使用完全相同的元数据完成铸造。系统检测到没有变化,因此提示你只需重启(而非重新铸造)。
解决方法:这不是错误,只需重启 Agent。nft.Mint() 会通过同步流程自动处理此情况。如果出现此提示,你的代码可能直接调用了部署端点,而没有使用 nft.Mint()。
Agent already minted with different config_hash
failed to prepare deploy: backend returned status 409: Agent already minted with different config_hash; use /api/sdk/agent/update
原因:此 Agent 已存在,但其元数据已更改。系统希望你更新,而不是重新铸造。
解决方法:nft.Mint() 会自动处理此情况——它会检测到变化,并通过更新端点进行更新。如果出现此提示,你的代码可能直接调用了部署端点,而没有使用 nft.Mint()。
invalid private key
原因:PRIVATE_KEY 值不是有效的十六进制字符串。
解决方法:生成新密钥:
openssl rand -hex 32
必须正好包含 64 个十六进制字符(a-f、0-9)。不能带 0x 前缀、空格或引号。
Agent ID can only contain lowercase letters, numbers, and hyphens
原因:你的 agentId 中包含大写字母、空格、下划线或特殊字符。
解决方法:仅使用小写字母 a-z、数字 0-9 和连字符 -:
"agentId": "my-research-agent"
Categories validation failed: invalid category 'X'
failed to update metadata: backend returned status 400: Categories validation failed: category 1: invalid category 'Utilities'
原因:你使用的类别不在有效类别列表中。部署端点不会验证类别,因此初次铸造会成功。但更新端点会严格验证类别——因此,如果 Agent 使用无效类别铸造,之后任何元数据更新都会失败。
有效类别(区分大小写,必须完全匹配):Trading、Finance、Crypto、Social Media、Lead Generation、E-Commerce、SEO、News、Real Estate、Travel、Automation、Developer Tools、AI、Integrations、Open Source、Jobs、Price Lists、Other
解决方法:如果你的 Agent 使用无效类别(例如,"Utilities"、"Research"、"Analytics"、"DeFi")完成铸造,唯一的解决方法是使用正确的类别和新的 agentId 铸造一个新 Agent。旧 Agent 无法更新。
为避免此问题:创建 JSON 元数据时,始终使用上述有效列表中的类别。
Build errors / cannot find module
原因:依赖项尚未下载,或 Go 版本过旧。
解决方法:
go version # must be 1.24+
go mod tidy
go build -o my-agent .
Agent starts but doesn't receive tasks
原因:Agent 已连接到 WebSocket,但尚未公开。新 Agent 仅对其创建者可见,直到获得 Teneo 团队批准。
解决方法:新 Agent 出现此情况属于正常现象。使用创建该 Agent 的同一钱包,通过 Agent 控制台 发送任务来测试 Agent。要将其公开:~/teneo-skill/teneo agent publish <agent-id>
查询现有 Agent
若要发现并查询 Teneo 网络上已运行的 Agent,以获取数据、进行分析、查询社交媒体等,请使用 teneo-cli 技能。
链接
- SDK:https://github.com/TeneoProtocolAI/teneo-agent-sdk
- 链:peaq(Chain ID 3338)
- 支付:x402 小额支付,以 USDC 结算
- Agent 控制台:https://agent-console.ai
- 部署界面:https://deploy.teneo-protocol.ai
- EULA:https://cdn.teneo.pro/Teneo_Agent_SDK_End_User_License_Agreement_(EULA)_v1_1_0.pdf
- Discord:https://discord.com/invite/teneoprotocol
可用 Agent
| Agent | 命令 | 描述 |
|---|---|---|
| Amazon | 4 | ## 概述 Amazon Agent 是一款高性能工具,旨在将海量…… |
| Google maps | 5 | ## 概述 Google Maps Agent 可转换地理和本地商业数据…… |
| Instagram Agent | 6 | ## 概述 Instagram Agent 允许用户从 Instagram 提取数据,包括…… |
| Gas War Sniper | 12 | 实时多链 Gas 监控和峰值检测。逐区块监控…… |
| Tiktok | 4 | ## 概述 TikTok Agent 允许用户从 TikTok 提取数据,包括…… |
| CoinMarketCap Agent | 5 | ##### CoinMarketCap Agent CoinMarketCap Agent 提供全面访问…… |
| Google Search Agent | 1 | 使用 Google/Serper 结果执行实时网络搜索。 |
| 1 | LinkedIn Agent 可帮助你完善 LinkedIn 个人资料。你提供一个 LinkedIn U…… | |
| VC Attention | 2 | ## 概述 VC Attention Agent 允许用户提取顶级加密货币……的关注对象 |
| Youtube | 2 | ## 概述 YouTube Agent 允许用户从 YouTube 提取数据,以监控…… |
| Aave V3 Liquidation Watcher | 13 | 实时监控 Aave V3 借贷协议中的巨鲸头寸。发现并…… |
| Messari BTC & ETH Tracker | 0 | - |
| X Platform Agent | 0 | - |
| CryptoQuant Pro 2.10 | 0 | - |
| Uniswap Monitor | 0 | - |
| Squid Router | 0 | - |
| LayerZero | 0 | - |