create-atomic-tool

Creates typed BaseTool subclasses with Pydantic schemas for Atomic Agents.

6.2k|536|Updated Jun 3, 2024
One-click install
npx skills add https://github.com/BrainBlend-AI/atomic-agents --skill create-atomic-tool
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-atomic-tool
Source: https://github.com/BrainBlend-AI/atomic-agents/tree/main/claude-plugin/atomic-agents/skills/create-atomic-tool
Command: npx skills add https://github.com/BrainBlend-AI/atomic-agents --skill create-atomic-tool

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Building a custom tool for an Atomic Agents pipeline requires correctly wiring generic type parameters, Pydantic input/output schemas, configuration, and error handling — mistakes like shadowing schema properties or raising on routine failures break the agent loop. This Skill guides the full authoring workflow from clarification to verification.

Core Features & Use Cases

  • Guided Tool Authoring: Walks through clarify, plan, implement, wire, and verify phases to produce a BaseTool[InSchema, OutSchema] subclass.
  • Ready Skeletons: Provides templates for local-computation tools and HTTP-backed tools with BaseToolConfig, env-driven secrets, timeouts, and typed failure outputs.
  • Agent Integration Patterns: Shows single-tool and router-agent wiring, plus sync and run_async implementations.
  • Use Case: You want to wrap a weather API as an agent tool — the Skill generates the config, schemas, sync/async run methods with typed error outputs, and shows how the agent invokes it.

Quick Start

Ask the assistant to create an Atomic Agents tool that fetches current weather for a city using an API key from an environment variable.

Frequently Asked Questions about create-atomic-tool

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a custom tool in Atomic Agents?

Subclass BaseTool with generic input and output schema parameters, define Pydantic BaseIOSchema classes for both, and implement run() returning the output schema instance. Add run_async for async I/O and a BaseToolConfig for API keys or timeouts.

How do I wrap an HTTP API as an Atomic Agents tool?

Create a BaseToolConfig holding the API key (from an environment variable), base URL, and timeout, then call the API with httpx inside run() or run_async(). Convert HTTP errors into a typed failure output rather than raising exceptions.

Why is self.input_schema None on my Atomic Agents tool?

The generic parameters are missing from the class definition. Write class FooTool(BaseTool[FooInput, FooOutput]) instead of class FooTool(BaseTool), and never assign input_schema or output_schema as class attributes since that shadows the framework-managed property.

Should an Atomic Agents tool raise exceptions on API failures?

No, routine failures like rate limits, 404s, or upstream validation errors should be returned as typed failure outputs with a status field. Reserve raise for programmer errors only, so the agent can reason about failures.

Does Atomic Agents support async tool execution?

Yes, implement async def run_async alongside run() and the framework will call it in async contexts. The hook must be named run_async, not arun, and should use async clients such as httpx.AsyncClient.