跳转到主要内容

创建原子工具

技能 已验证 活跃

构建一个 `BaseTool[InSchema, OutSchema]` 子类 — 输入/输出模式,`BaseToolConfig`,`run()`(和可选的 `run_async()`),环境变量驱动的 secret,类型化的失败输出。当用户要求“添加工具”、“创建工具”、“将 API 包装成工具”、“构建 `BaseTool`”、“制作计算器/搜索/天气工具”或运行 `/atomic-agents:create-atomic-tool` 时使用。

目的

为开发人员提供一个结构化且有指导的过程,以便使用 Atomic Agents 框架为 AI 代理创建自定义工具。

功能

  • 构建带有类型化模式的 `BaseTool` 子类。
  • 支持同步(`run`)和异步(`run_async`)方法。
  • 指导通过环境变量和 `BaseToolConfig` 配置 secret。
  • 促进类型化的失败输出以实现健壮的错误处理。
  • 为本地和 HTTP 后端工具提供骨架实现。

使用场景

  • 当用户要求为其 AI 代理添加新工具时。
  • 当用户需要将外部 API 包装成工具时。
  • 构建计算器、搜索功能或数据库查询工具等实用工具时。
  • 在 Atomic Agents 框架内创建自定义 `BaseTool` 实现时。

非目标

  • 创建代理或整个 AI 应用程序。
  • 管理工具的部署或分发。
  • 处理工具创建之外的一般框架问题。

实践

  • 工具开发
  • 模式设计
  • 错误处理

先决条件

  • Python 3.8+
  • 已安装 Atomic Agents 库
  • 已安装 Pydantic

安装

请先添加 Marketplace

/plugin marketplace add BrainBlend-AI/atomic-agents
/plugin install atomic-agents@brainblend-plugins

质量评分

已验证
99 /100
1 day ago 分析

信任信号

最近提交15 days ago
星标5.9k
许可证MIT
状态
查看源代码

类似扩展

Cli Creator

100

Build a composable CLI for Codex from API docs, an OpenAPI spec, existing curl examples, an SDK, a web app, an admin tool, or a local script. Use when the user wants Codex to create a command-line tool that can run from any repo, expose composable read/write commands, return stable JSON, manage auth, and pair with a companion skill.

技能
openai

Instructor

98

Extract structured data from LLM responses with Pydantic validation, retry failed extractions automatically, parse complex JSON with type safety, and stream partial results with Instructor - battle-tested structured output library

技能
Orchestra-Research

Create Atomic Schema

98

设计和编写 Atomic Agents 代理或工具的 `BaseIOSchema` 输入/输出对 — 文档字符串、字段描述、验证器、错误变体。当用户要求“创建 schema”、“设计输入/输出 schema”、“定义 `IOSchema`”、“编写 `BaseIOSchema`”、“建模代理的输出”或运行 `/atomic-agents:create-atomic-schema` 时使用。

技能
BrainBlend-AI

Instructor

75

Extract structured data from LLM responses with Pydantic validation, retry failed extractions automatically, parse complex JSON with type safety, and stream partial results with Instructor - battle-tested structured output library

技能
davila7

Context Mode Ops

100

使用并行子代理军队管理 context-mode GitHub 问题、PR、发布和营销。为每个任务编排 10-20 个动态代理。在分类问题、审查 PR、发布版本、撰写 LinkedIn 帖子、宣布发布、修复错误、合并贡献、验证 ENV 变量、测试适配器或同步分支时使用。

技能
mksglu

Fixflow

100

使用严格的交付工作流执行编码任务:构建完整计划、分步实现、持续运行测试,并默认在每一步 (`per_step`) 后提交。当用户要求行为驱动交付或需求不明确时,支持显式提交策略覆盖 (`final_only`, `milestone`) 和可选的 BDD(给定/当/则)。

技能
majiayu000