nimble-agents

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Nimble Agents

Nimble Agents

Use this skill when the user wants structured extraction by running a Nimble agent/template.
User request: $ARGUMENTS
当用户希望通过运行Nimble agent/模板进行结构化数据提取时,使用此skill。
用户请求:$ARGUMENTS

Prerequisites

前置条件

Before using this skill, ensure the Nimble MCP server is connected:
Claude Code:
bash
export NIMBLE_API_KEY="your_api_key"
claude mcp add --transport http nimble-mcp-server https://mcp.nimbleway.com/mcp \
  --header "Authorization: Bearer ${NIMBLE_API_KEY}"
VS Code (Copilot / Continue): Add to your MCP config:
json
{
  "nimble-mcp-server": {
    "command": "npx",
    "args": ["-y", "mcp-remote@latest", "https://mcp.nimbleway.com/mcp",
             "--header", "Authorization:Bearer YOUR_API_KEY"]
  }
}
Get an API key: app.nimbleway.com/signup → Account Settings → API Keys
使用此skill之前,请确保已连接Nimble MCP server:
Claude Code:
bash
export NIMBLE_API_KEY="your_api_key"
claude mcp add --transport http nimble-mcp-server https://mcp.nimbleway.com/mcp \
  --header "Authorization: Bearer ${NIMBLE_API_KEY}"
VS Code (Copilot / Continue): 添加到你的MCP配置中:
json
{
  "nimble-mcp-server": {
    "command": "npx",
    "args": ["-y", "mcp-remote@latest", "https://mcp.nimbleway.com/mcp",
             "--header", "Authorization:Bearer YOUR_API_KEY"]
  }
}
获取API密钥: app.nimbleway.com/signup → 账户设置 → API密钥

Goal

目标

Always finish with an executed agent run result.
  • Preferred path: find an existing agent/template and run it.
  • Fallback path: generate a new agent, publish it, then run it.
最终必须输出已执行的agent运行结果。
  • 优先路径:查找现有agent/模板并运行它。
  • 备选路径:生成新的agent,发布后再运行它。

Execution principle

执行原则

Infer and advance when the next action is unambiguous. Present options only when there is genuine ambiguity.
At every decision point, evaluate whether the next step can be determined from the original request and current context. If yes, proceed immediately — narrate what you're doing but do not wait for confirmation. Only present numbered options when:
  • Multiple agents could plausibly match and you cannot rank them confidently.
  • Required parameters cannot be inferred from the original request.
  • An error or unexpected result requires a user decision.
This applies to all consumers — interactive human users and autonomous agents alike. Autonomous agents (no human-in-the-loop) cannot respond to prompts at all, so unnecessary options will stall them.
当下一步操作明确时,直接推断并执行。仅当存在真正的歧义时才提供选项。
在每个决策点,评估是否可以根据原始请求和当前上下文确定下一步操作。如果可以,立即执行——说明你正在执行的操作,但无需等待确认。仅在以下情况提供编号选项:
  • 多个agent都可能匹配,且你无法自信地排序时。
  • 无法从原始请求中推断出所需参数时。
  • 出现错误或意外结果,需要用户决策时。
此规则适用于所有使用者——交互式人类用户和自主agent。自主agent(无人工介入)无法响应提示,因此不必要的选项会导致流程停滞。

Presentation rules

展示规则

  • After every tool call, present results in markdown tables. Never show raw JSON.
  • Present numbered options only when the next action is ambiguous (see Execution principle). When auto-advancing, narrate the action instead (e.g. "No exact match found. Generating a custom agent...").
  • Keep tables to 5 rows max per page. Use pagination when more results exist.
  • 每次工具调用后,以Markdown表格形式展示结果。绝不显示原始JSON。
  • 仅当下一步操作存在歧义时(见执行原则),才提供编号选项。自动执行时,只需说明操作内容即可(例如:"未找到完全匹配的agent。正在生成自定义agent...")。
  • 每页表格最多显示5行。结果较多时使用分页。

Required flow

必选流程

1. Validate authentication

1. 验证身份认证

Call
nimble_agents_list
with a broad one-word query to validate auth and connectivity. If auth fails, show:
Could not connect to Nimble. Please set your
NIMBLE_API_KEY
environment variable and retry.
Do not proceed until auth is valid.
调用
nimble_agents_list
并传入宽泛的单字查询,以验证认证和连接性。 如果认证失败,显示:
无法连接到Nimble。请设置你的
NIMBLE_API_KEY
环境变量并重试。
在认证有效之前,请勿继续。

2. Parse extraction intent

2. 解析提取意图

From
$ARGUMENTS
, identify:
  • Target domain/URL if provided.
  • What fields/records the user expects in output.
  • One or two broad keywords for search (e.g. "amazon", "reviews", "linkedin", "products").
  • Completeness check: Does the request already specify a website/URL AND what data to extract? If yes, mark intent as "complete" — this allows auto-advancing through later steps without asking for information you already have.
$ARGUMENTS
中识别:
  • 若提供了目标域名/URL,请提取。
  • 用户期望输出的字段/记录类型。
  • 一个或两个用于搜索的宽泛关键词(例如:"amazon"、"reviews"、"linkedin"、"products")。
  • 完整性检查: 请求是否已指定网站/URL以及要提取的数据?如果是,将意图标记为"完整"——这允许在后续步骤中自动执行,无需询问已有的信息。

3. Search for existing agents

3. 搜索现有agent

Call
nimble_agents_list
with a short, general query (one or two keywords only). Never use full sentences.
Always present options after search. Never silently auto-advance past this step. The user must always see what was found and have the choice to generate a new agent.
Show top 5 with numbered action options:
undefined
调用
nimble_agents_list
并传入简短的通用查询(仅一个或两个关键词)。绝不要使用完整句子。
搜索后必须展示选项。绝不要在此步骤后静默自动执行。用户必须始终看到搜索结果,并有权选择生成新的agent。
显示前5个结果及编号操作选项:
undefined

Existing agents for "{query}"

与"{query}"匹配的现有agents

#Agent nameDescriptionRequired inputs
1
agent-name-a
Extracts product listings
url
(string)
2
agent-name-b
Extracts search results
query
(string),
url
(string)
3
agent-name-c
Extracts product details
product_url
(string)
4
agent-name-d
Extracts pricing data
url
(string)
5
agent-name-e
Extracts review data
url
(string)
Showing 1–5 of {total} results.
Pick a number: 6. Search with different keywords 7. Show next page of results 8. Generate a new custom agent

Omit option 7 ("next page") when current page shows all results (count <= 5 or last page).

If zero results:
No agents matched "{query}".
Pick a number:
  1. Search with different keywords
  2. Generate a new custom agent
undefined
序号Agent名称描述必填输入
1
agent-name-a
提取产品列表
url
(字符串)
2
agent-name-b
提取搜索结果
query
(字符串),
url
(字符串)
3
agent-name-c
提取产品详情
product_url
(字符串)
4
agent-name-d
提取定价数据
url
(字符串)
5
agent-name-e
提取评论数据
url
(字符串)
显示第1–5条,共{total}条结果。
选择编号: 6. 使用其他关键词搜索 7. 显示下一页结果 8. 生成新的自定义agent

当当前页面显示所有结果(数量≤5或为最后一页)时,省略选项7("显示下一页结果")。

如果无匹配结果:
未找到与"{query}"匹配的agents。
选择编号:
  1. 使用其他关键词搜索
  2. 生成新的自定义agent
undefined

4. Handle selection

4. 处理选择

Options are always presented after search:
  • User/agent picks an agent number (1-5) → existing-agent path (step 5).
  • User/agent picks "search with different keywords" → ask what keywords, then repeat step 3.
  • User/agent picks "show next page" → call
    nimble_agents_list
    with
    skip
    incremented by 5, present next page.
  • User/agent picks "generate a new custom agent" → proceed to step 6. Only ask for a description if the original request lacks a website/URL or what data to extract.
搜索后始终会展示选项:
  • 用户/agent选择agent编号(1-5) → 进入现有agent路径(步骤5)。
  • 用户/agent选择"使用其他关键词搜索" → 询问关键词,然后重复步骤3。
  • 用户/agent选择"显示下一页结果" → 调用
    nimble_agents_list
    并将
    skip
    参数增加5,展示下一页。
  • 用户/agent选择"生成新的自定义agent" → 进入步骤6。仅当原始请求缺少网站/URL或要提取的数据时,才询问描述信息。

5. Existing-agent path

5. 现有agent路径

5a. Call
nimble_agents_get
with the selected agent name. Always present details with options — the user must always be able to choose "Generate a new agent instead":
undefined
5a. 调用
nimble_agents_get
并传入所选agent名称。必须展示详情及选项——用户必须始终可以选择"改为生成新的agent":
undefined

Agent:
agent-name

Agent:
agent-name

{description}
{描述}

Input parameters

输入参数

ParameterTypeRequiredDescription
url
stringYesTarget page URL
query
stringNoOptional search filter
参数类型是否必填描述
url
字符串目标页面URL
query
字符串可选搜索过滤器

Output fields

输出字段

FieldType
title
string
price
number
rating
number
Pick a number:
  1. Run this agent
  2. Go back to search results
  3. Generate a new agent instead

**5b.** Map values from the original request to input parameters. Infer as much as possible (URLs from mentioned websites, queries from described topics, etc.). Only ask for required params that truly cannot be inferred:
I need a few more values to run this agent:
#ParameterTypeDescription
1
url
stringTarget page URL
2
query
stringSearch keywords
Please provide the values (e.g. "1: https://example.com, 2: shoes").

**5c.** Call `nimble_agents_run` with `agent_name` and complete `params`. Present results:
字段类型
title
字符串
price
数字
rating
数字
选择编号:
  1. 运行此agent
  2. 返回搜索结果
  3. 改为生成新的agent

**5b.** 将原始请求中的值映射到输入参数。尽可能多地推断(从提及的网站获取URL,从描述的主题获取查询词等)。仅当确实无法推断时,才询问必填参数:
我需要以下几个值来运行此agent:
序号参数类型描述
1
url
字符串目标页面URL
2
query
字符串搜索关键词
请提供对应值(例如:"1: https://example.com, 2: shoes")。

**5c.** 调用`nimble_agents_run`并传入`agent_name`和完整的`params`。展示结果:

Results —
agent-name

结果 —
agent-name

Source: {url} Records: {count}
#TitlePriceRatingURL
1Product A$29.994.5https://...
2Product B$19.994.2https://...
3Product C$39.994.8https://...
Pick a number: 4. Run again with different inputs 5. Get Python code for this extraction 6. Generate a new custom agent 7. Search for a different agent 8. Done

Adapt column headers to match the actual output fields returned.

**Auto-advance:** If the original request is fully satisfied by the results, proceed directly to the final summary (step 7). Only present post-result options if the user is in an interactive session and might want follow-up actions.

If user picks "Get Python code" → go to step 8.
来源: {url} 记录数: {count}
序号标题价格评分URL
1产品A$29.994.5https://...
2产品B$19.994.2https://...
3产品C$39.994.8https://...
选择编号: 4. 使用不同输入重新运行 5. 获取此提取任务的Python代码 6. 生成新的自定义agent 7. 搜索其他agent 8. 完成

根据返回的实际输出字段调整列标题。

**自动执行:** 如果原始请求已被结果完全满足,直接进入最终总结(步骤7)。仅当用户处于交互式会话且可能需要后续操作时,才展示结果后的选项。

如果用户选择"获取Python代码" → 进入步骤8。

6. Generate path

6. 生成路径

6a. Check whether the original request already provides a website/URL and what data to extract.
Auto-advance: If both pieces are present (or can be reasonably inferred, e.g. "github trending repos" implies
https://github.com/trending
and repo metadata fields) → proceed directly to 6b. Do not ask the user to repeat information they already provided.
Ask only if genuinely missing:
Before I generate a new agent, please describe:
1. Which website/URL to extract from
2. What data fields you need (e.g. product name, price, rating)
Do not call generate until you have both pieces.
6b. Create a stable
session_id
(reuse for all generate/publish calls in this flow).
6c. Call
nimble_agents_generate
with a clear prompt. Present status with numbered options:
If
"waiting"
(follow-up questions):
The agent generator needs more information:

| # | Question |
|---|----------|
| 1 | {first question from response} |
| 2 | {second question from response} |

Please answer the questions above by number.
If
"processing"
:
Agent generation in progress... I'll check back shortly.
If
"complete"
:
Auto-advance: Narrate the generated agent's schema, then proceed directly to publish and run (steps 6e–6f). The user already expressed intent to extract data and generation succeeded — do not wait for confirmation.
undefined
6a. 检查原始请求是否已提供网站/URL以及要提取的数据。
自动执行: 如果两者都已提供(或可合理推断,例如:"github trending repos"意味着
https://github.com/trending
和仓库元数据字段) → 直接进入6b。不要让用户重复已提供的信息。
仅当确实缺少信息时询问:
在生成新agent之前,请描述:
1. 要从中提取数据的网站/URL
2. 需要的数据字段(例如:产品名称、价格、评分)
在获取到这两项信息之前,请勿调用生成接口。
6b. 创建稳定的
session_id
(在此流程的所有生成/发布调用中复用)。
6c. 调用
nimble_agents_generate
并传入清晰的提示。展示状态及编号选项:
如果返回
"waiting"
(需要后续问题):
agent生成器需要更多信息:

| 序号 | 问题 |
|---|----------|
| 1 | {响应中的第一个问题} |
| 2 | {响应中的第二个问题} |

请按编号回答上述问题。
如果返回
"processing"
Agent生成中... 我会稍后检查状态。
如果返回
"complete"
自动执行: 说明生成的agent的架构,然后直接进入发布和运行步骤(6e–6f)。用户已表达提取数据的意图且生成成功——无需等待确认。
undefined

Agent generated:
agent-name

已生成Agent:
agent-name

Input parameters

输入参数

ParameterTypeRequiredDescription
url
stringYesTarget URL
参数类型是否必填描述
url
字符串目标URL

Output fields

输出字段

FieldType
name
string
value
string
Publishing and running...

If the generated schema looks clearly wrong for the user's intent, present options instead:
Pick a number:
  1. Publish and run this agent
  2. Regenerate with a different description
  3. Go back to search existing agents

If `"error"` or `"failed"`:
Generation failed: {error message}
Pick a number:
  1. Retry with a modified description
  2. Search for an existing agent instead

**6d.** Repeat generate calls with the same `session_id` until `"complete"`.

**6e.** Once generation is complete, call `nimble_agents_publish` with the same `session_id` **before** running the agent. Confirm:
Agent
agent-name
published successfully. Preparing to run...

If publish fails with a 409 conflict, the agent was already published — proceed to run.

**6f.** Build params from schema, infer values from the original request. Only ask for values that truly cannot be inferred (see step 5b). Call `nimble_agents_run` and present results using the format in step 5c.
字段类型
name
字符串
value
字符串
正在发布并运行...

如果生成的架构明显不符合用户意图,展示选项:
选择编号:
  1. 发布并运行此agent
  2. 使用不同描述重新生成
  3. 返回搜索现有agent

如果返回`"error"`或`"failed"`:
生成失败:{错误信息}
选择编号:
  1. 修改描述后重试
  2. 改为搜索现有agent

**6d.** 使用相同的`session_id`重复调用生成接口,直到返回`"complete"`。

**6e.** 生成完成后,在运行agent之前,调用`nimble_agents_publish`并传入相同的`session_id`。确认:
Agent
agent-name
发布成功。准备运行...

如果发布时出现409冲突,说明该agent已被发布——直接运行即可。

**6f.** 根据架构构建参数,从原始请求中推断值。仅当确实无法推断时,才询问值(见步骤5b)。调用`nimble_agents_run`并按照步骤5c的格式展示结果。

7. Final response

7. 最终响应

Always end with a clean summary:
undefined
始终以清晰的总结结尾:
undefined

Summary

总结

DetailValue
Agent used
agent-name
SourceExisting / Generated
Records extracted{count}
PublishedYes / N/A
{extraction results table from step 5c}
undefined
详情
使用的Agent
agent-name
来源现有 / 生成
提取的记录数{count}
是否已发布是 / 不适用
{步骤5c中的提取结果表格}
undefined

8. Codegen (on request)

8. 代码生成(按需)

When the user picks "Get Python code", generate a ready-to-run script using
nimble_python
(
pip install nimble_python
) that reproduces the agent run.
Substitute actual values from the completed run into the template below.
Template:
```python
import os
from nimble_python import Nimble

client = Nimble(api_key=os.environ["NIMBLE_API_KEY"])
当用户选择"获取Python代码"时,使用
nimble_python
(需
pip install nimble_python
)生成可直接运行的脚本,复现agent的运行过程。
将已完成运行中的实际值代入以下模板。
模板:
```python
import os
from nimble_python import Nimble

client = Nimble(api_key=os.environ["NIMBLE_API_KEY"])

Run {agent-name} agent

运行{agent-name} agent

response = client.extract( url="{url}", skill="{agent-name}", )
response = client.extract( url="{url}", skill="{agent-name}", )

Process results

处理结果

for record in response.data.parsing.entities: print( {field_prints} )

Install: `pip install nimble_python`
Set env: `export NIMBLE_API_KEY=<your-key>`
Substitution rules:
  • {agent-name}
    → the
    agent_name
    from the run.
  • {url}
    → the URL value passed in
    params
    .
  • {field_prints}
    → one
    f"field: {record.get('field')}"
    line per output field from the agent's output schema. Use actual field names, e.g.:
    python
    print(
        f"title: {record.get('title')}, "
        f"price: {record.get('price')}, "
        f"rating: {record.get('rating')}"
    )
  • If the agent's input schema has params beyond
    url
    , pass them via
    extra_body
    :
    python
    response = client.extract(
        url="{url}",
        skill="{agent-name}",
        extra_body={"{param}": "{value}", ...},
    )
    Only include non-URL params that were actually used in the run.
After showing the code, return to the post-results options (minus the codegen option).
for record in response.data.parsing.entities: print( {field_prints} )

安装:`pip install nimble_python`
设置环境变量:`export NIMBLE_API_KEY=<your-key>`
替换规则:
  • {agent-name}
    → 运行时使用的
    agent_name
  • {url}
    → 传入
    params
    中的URL值。
  • {field_prints}
    → 针对agent输出架构中的每个输出字段,添加一行
    f"field: {record.get('field')}"
    。使用实际字段名称,例如:
    python
    print(
        f"title: {record.get('title')}, "
        f"price: {record.get('price')}, "
        f"rating: {record.get('rating')}"
    )
  • 如果agent的输入架构包含
    url
    之外的参数,通过
    extra_body
    传入:
    python
    response = client.extract(
        url="{url}",
        skill="{agent-name}",
        extra_body={"{param}": "{value}", ...},
    )
    仅包含运行中实际使用的非URL参数。
展示代码后,返回结果后的选项(移除代码生成选项)。

Error recovery

错误恢复

Authentication failure (401/403 from any tool call):
Could not connect to Nimble. Please set your
NIMBLE_API_KEY
environment variable and retry. Get a key at app.nimbleway.com → Account Settings → API Keys.
Agent not found (404 from
nimble_agents_get
):
Agent "{name}" was not found. It may have been removed or renamed. Use
nimble_agents_list
to search for available agents.
Empty results (run returns no records):
The agent returned no results. Possible causes:
  • The target URL may be unreachable or behind authentication.
  • The page structure may have changed since the agent was created.
  • Required parameters may be missing — check the agent's input_schema.
Generation stuck (repeated
processing
status): After 3 consecutive
processing
responses, inform the user:
Agent generation is taking longer than expected. You can wait or try a simpler prompt.
Publish conflict (409 from
nimble_agents_publish
): The agent was already published in a previous session. The tool will automatically fetch and return the existing agent details. If it cannot resolve the name, suggest using
nimble_agents_list
to find the agent.
身份认证失败(任何工具调用返回401/403):
无法连接到Nimble。请设置你的
NIMBLE_API_KEY
环境变量并重试。 在app.nimbleway.com → 账户设置 → API密钥获取密钥。
Agent未找到
nimble_agents_get
返回404):
未找到Agent "{name}"。它可能已被移除或重命名。 使用
nimble_agents_list
搜索可用的agents。
结果为空(运行后未返回记录):
Agent未返回任何结果。可能原因:
  • 目标URL可能无法访问或需要身份认证。
  • 自agent创建以来,页面结构可能已更改。
  • 可能缺少必填参数——请检查agent的input_schema。
生成停滞(重复返回
processing
状态): 连续3次返回
processing
响应后,告知用户:
Agent生成耗时超出预期。你可以等待或尝试更简单的提示。
发布冲突
nimble_agents_publish
返回409): 该agent已在之前的会话中发布。工具将自动获取并返回现有agent的详情。如果无法解析名称,建议使用
nimble_agents_list
查找该agent。

Guardrails

约束规则

  • This skill is for agent workflows only — list, get, generate, run, and publish. Do not suggest scheduling, monitoring, automation, cron jobs, or any functionality outside the allowed tools.
  • Do not suggest or offer capabilities beyond what the allowed tools provide.
  • Never ask for information already present in the original request. Infer URLs, fields, and parameters from context.
  • Only present numbered options when the next action is genuinely ambiguous. When auto-advancing, narrate the action.
  • Always publish generated agents before running them (step 6e).
  • Session IDs must be reused across generate and publish calls within the same flow.
  • Present tool call results in tables. Never show raw JSON.
  • Adapt table columns to match actual data returned; templates above are examples.
  • For the generate path, only ask for extraction description if the original request lacks a target website or what data to extract.
  • 此skill仅适用于agent工作流——列表、获取、生成、运行和发布。请勿建议调度、监控、自动化、定时任务或超出允许工具范围的任何功能。
  • 请勿建议或提供超出允许工具能力的功能。
  • 绝不要询问已存在于原始请求中的信息。从上下文中推断URL、字段和参数。
  • 仅当下一步操作确实存在歧义时,才展示编号选项。自动执行时,只需说明操作内容。
  • 生成的agent必须先发布再运行(步骤6e)。
  • Session ID必须在同一流程的生成和发布调用中复用。
  • 以表格形式展示工具调用结果。绝不显示原始JSON。
  • 根据返回的实际数据调整表格列;上述模板仅为示例。
  • 对于生成路径,仅当原始请求缺少目标网站或要提取的数据时,才询问提取描述。