Aller au contenu
Skillpedia
Agents6.3k · #14237

create-atomic-agent

Ce qu’il fait

Ce guide explique comment concevoir et câbler un agent IA dans le framework Python Atomic Agents, des formes d'entrée et de sortie jusqu'à la connexion au fournisseur. Il s'adresse aux développeurs qui construisent des agents IA structurés.

Quand l’utiliser

  • ✓Quand un développeur veut ajouter un agent planificateur, aiguilleur ou extracteur à un projet Atomic Agents.
  • ✓Quand un développeur veut un agent de discussion simple construit sur le framework.
  • ✓Quand un développeur a besoin d'un agent qui renvoie une sortie structurée pour que d'autres codes l'utilisent.

Lien du skill

https://github.com/Eigenwise/atomic-agents/blob/main/claude-plugin/atomic-agents/skills/create-atomic-agent/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/Eigenwise/atomic-agents/blob/main/claude-plugin/atomic-agents/skills/create-atomic-agent/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Créez un agent Atomic Agents qui lit des tickets de support et renvoie la catégorie et l'urgence.”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

Le skill demande d'abord ce que l'agent doit faire, quels schémas et quel fournisseur utiliser, puis écrit les schémas, l'invite système, la configuration du client et l'agent, et l'exécute pour vérifier.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis GitHub.

Create an Atomic Agent

An agent is an LLM-backed transformer from one BaseIOSchema to another. Building one means: design the schemas, write the system prompt, wire the provider client, build the AgentConfig, instantiate AtomicAgent[In, Out].

For deep material (streaming, token counting, hooks, multi-agent memory), the authority is ../framework/references/agents.md plus providers.md, prompts.md, and memory.md. This skill is the action-oriented path: clarify → write → run.

When this fires vs the umbrella framework skill

  • This skill: the user is creating or wiring a specific agent — "add a planner agent", "build a Q&A agent", "make a router that classifies tickets".
  • framework skill: questions about Atomic Agents in general, or the user is doing something other than authoring an agent.

Phase 1 — Clarify

Bundle into one message:

  1. What should the agent do? One sentence. Becomes the persona / background line.
  2. Inputs and outputs. Use BasicChatInputSchema / BasicChatOutputSchema for free-form chat. Use a custom pair for anything structured (extraction, classification, planning, routing). When custom, branch to the create-atomic-schema skill for the schema authoring.
  3. Provider. OpenAI / Anthropic / Groq / Ollama / Gemini / OpenRouter / MiniMax. Default: whatever the project already uses; otherwise OpenAI.
  4. Conversational? Yes → wire a ChatHistory. No (single-shot transformer) → omit it for stateless behavior.
  5. Context providers. Anything to inject into the prompt at runtime (current time, user identity, retrieved docs)? If yes, plan to also use the create-atomic-context-provider skill afterwards.

Skip anything already settled in context.

Phase 2 — Plan

State the plan in one short block:

  • File: <project>/agents/<agent_name>.py (or directly in main.py for a tiny project — see ../framework/references/project-structure.md).
  • Schemas: which pair, where they live.
  • Provider + model + Instructor mode. Default models: OpenAI gpt-5-mini, Anthropic claude-haiku-4-5, Groq llama-3.3-70b-versatile, Ollama llama3.1, Gemini gemini-2.5-flash.
  • SystemPromptGenerator content — three sections: background, steps, output_instructions.
  • History? Hooks? Context providers?

Phase 3 — Implement

Canonical imports (do not deviate)

from atomic_agents import (
    AtomicAgent, AgentConfig,
    BasicChatInputSchema, BasicChatOutputSchema,
)
from atomic_agents.context import ChatHistory, SystemPromptGenerator
from instructor import Mode

Wire the provider client (always Instructor-wrapped)

The full per-provider matrix lives in ../framework/references/providers.md. Quick recap:

# OpenAI — default mode is Mode.TOOLS
import os, instructor, openai
client = instructor.from_openai(openai.OpenAI(api_key=os.environ["OPENAI_API_KEY"]))
model = "gpt-5-mini"
api_params: dict = {}

# Anthropic — Mode.TOOLS, max_tokens REQUIRED in model_api_parameters
import anthropic
client = instructor.from_anthropic(anthropic.Anthropic(api_key=os.environ["ANTHROPIC_API_KEY"]))
model = "claude-haiku-4-5"
api_params = {"max_tokens": 4096}

# Gemini — Mode.GENAI_TOOLS, assistant_role="model"
from google import genai
client = instructor.from_genai(genai.Client(api_key=os.environ["GEMINI_API_KEY"]), mode=Mode.GENAI_TOOLS)
model = "gemini-2.5-flash"
api_params = {}

# Groq / Ollama / MiniMax — Mode.JSON in both factory and AgentConfig

Build the agent

from atomic_agents import AtomicAgent, AgentConfig
from atomic_agents.context import ChatHistory, SystemPromptGenerator

agent = AtomicAgent[MyInput, MyOutput](
    config=AgentConfig(
        client=client,
        model=model,
        history=ChatHistory(),  # omit for stateless
        system_prompt_generator=SystemPromptGenerator(
            background=["You are a concise research assistant."],
            steps=[
                "Read the question carefully.",
                "Decide what minimum information answers it.",
                "Produce the answer in the required schema.",
            ],
            output_instructions=[
                "Reply under 100 words.",
                "If unsure, set status='error' and explain why.",
            ],
        ),
        # Provider-specific knobs — match the Instructor factory
        # mode=Mode.TOOLS,                         # OpenAI / Anthropic / OpenRouter
        # mode=Mode.JSON,                      
Questions fréquentes

Prend-il en charge plusieurs fournisseurs d'IA ?

Oui. Le skill liste OpenAI, Anthropic, Groq, Ollama, Gemini, OpenRouter et MiniMax.

L'agent a-t-il toujours besoin de schémas personnalisés ?

Non. Pour une discussion libre, il utilise les schémas de chat de base du framework.

À quoi sert le schéma ?

C'est le contrat typé qui définit ce qui entre dans l'agent et ce qui en sort.

Détails

Description originale de l’auteur

Build and wire an `AtomicAgent[InSchema, OutSchema]` — schemas, `AgentConfig`, `SystemPromptGenerator`, provider client, history, hooks, optional context providers. Use when the user asks to "create an agent", "add another agent", "build an `AtomicAgent`", "wire up an agent", "make a planner/router/extractor agent", or runs `/atomic-agents:create-atomic-agent`.

repo: Eigenwise/atomic-agents

Popularité

Étoiles GitHub
6.3k
Position au classement
#14237
Licence
MIT
Mis à jour
29/10/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires