█

AI/TLDR

मुझे पिलाएं कॉफ़ी
मुझे एक कॉफ़ी पिलाएँ

Atomic Agents

अनुमानित आउटपुट के लिए छोटे, स्कीमा-आधारित ब्लॉक्स से AI agents बनाएं

Agent Frameworks & Buildersओपन सोर्स
भाषा
Python
लाइसेंस
MIT
$pip install atomic-agents
संक्षेप में

Atomic Agents क्या है?

Atomic Agents अनुमानित आउटपुट के लिए छोटे, स्कीमा-आधारित ब्लॉक्स से AI agents बनाएं. यह Agents & Automation टूल्स की Agent Frameworks & Builders श्रेणी में आता है; ओपन सोर्स है, Python में लिखा गया है और MIT लाइसेंस के तहत है। शुरू करने के लिए: atomic Agents इंस्टॉल करें.

सारांश

Atomic Agents एक हल्का, मॉड्यूलर Python framework है, जिससे agentic AI पाइपलाइन और applications बनाए जा सकते हैं। यह Instructor और Pydantic पर आधारित है, इसलिए आप टाइप्ड इनपुट और आउटपुट स्कीमा तय करते हैं, और भाषा मॉडल से कच्चे टेक्स्ट की जगह संरचित, सत्यापित रिस्पॉन्स पाते हैं।

यह framework atomicity पर केंद्रित है: हर हिस्सा, चाहे वह agent हो, tool हो या context provider, एक ही काम के लिए बना होता है, दोबारा इस्तेमाल हो सकता है और दूसरे हिस्सों के साथ जुड़ सकता है, LEGO ब्लॉक्स की तरह। इसका फोकस control और predictability पर है, इसलिए यह उन developers के लिए ठीक है जो लगातार आउटपुट चाहते हैं और सिस्टम के हर हिस्से को अलग-अलग fine-tune करने की क्षमता चाहते हैं।

यह agent-frameworks श्रेणी में आता है और उन Python developers के लिए है जो पूरा logic और control flow सादे Python code में रखना पसंद करते हैं, और परिचित software engineering practices अपनाते हैं, बजाय इसके कि control किसी autonomous multi-agent system को सौंप दिया जाए।

यह क्या करता है

  • स्कीमा-आधारित agents: Pydantic input और output स्कीमा तय करें, ताकि model संरचित, सत्यापित डेटा लौटाए
  • टाइप्ड रिस्पॉन्स और standard Python validation के लिए Instructor और Pydantic पर आधारित
  • जोड़ने योग्य building blocks: single-purpose agents, tools और context providers को मिलाकर पाइपलाइन बनाएं
  • Context Providers रनटाइम पर system prompt में डायनामिक जानकारी डालते हैं
  • SystemPromptGenerator background, steps और output instructions से संरचित prompts बनाता है
  • टूल्स डाउनलोड करने के लिए Atomic Assembler CLI के साथ आता है, और Instructor extras के ज़रिए कई मॉडल प्रोवाइडर के साथ काम करता है (OpenAI, Anthropic, Groq, Gemini)

शुरू करें

pip से package इंस्टॉल करें, फिर अपनी पसंद का मॉडल प्रोवाइडर SDK इंस्टॉल करें, एक typed agent बनाएं और typed input के साथ run() कॉल करें।

Atomic Agents इंस्टॉल करें

framework को pip से इंस्टॉल करें। इससे टूल्स डाउनलोड करने वाला Atomic Assembler CLI भी इंस्टॉल हो जाता है।

bashbash
pip install atomic-agents

मॉडल प्रोवाइडर इंस्टॉल करें

प्रोवाइडर SDKs, Instructor extras के रूप में मिलते हैं। OpenAI डिफ़ॉल्ट रूप से शामिल है; बाकी को ज़रूरत के हिसाब से इंस्टॉल करें।

bashbash
pip install instructor[anthropic]   # for Anthropic
pip install instructor[groq]        # for Groq
pip install instructor[google-genai] # for Gemini

Agent बनाएं और चलाएं

एक आउटपुट स्कीमा तय करें, system prompt सेट करें, अपने मॉडल क्लाइंट को Instructor से रैप करें, और typed input के साथ run() कॉल करें।

pythonpython
from pydantic import Field
from openai import OpenAI
import instructor
from atomic_agents import AtomicAgent, AgentConfig, BasicChatInputSchema, BaseIOSchema
from atomic_agents.context import SystemPromptGenerator, ChatHistory

class CustomOutputSchema(BaseIOSchema):
    """docstring for the custom output schema"""
    chat_message: str = Field(..., description="The chat message from the agent.")
    suggested_questions: list[str] = Field(..., description="Suggested follow-up questions.")

system_prompt_generator = SystemPromptGenerator(
    background=["This assistant is knowledgeable, helpful, and suggests follow-up questions."],
    steps=[
        "Analyze the user's input to understand the context and intent.",
        "Formulate a relevant and informative response.",
        "Generate 3 suggested follow-up questions for the user."
    ],
    output_instructions=[
        "Provide clear and concise information in response to user queries.",
        "Conclude each response with 3 relevant suggested questions for the user."
    ]
)

client = instructor.from_openai(OpenAI())

agent = AtomicAgent[BasicChatInputSchema, CustomOutputSchema](
    config=AgentConfig(
        client=client,
        model="gpt-5-mini",
        system_prompt_generator=system_prompt_generator,
        history=ChatHistory(),
    )
)

response = agent.run(BasicChatInputSchema(chat_message="Tell me about atomic agents framework"))
print(response.chat_message)

कमांड और कोड प्रोजेक्ट के अपने दस्तावेज़ों से लिए गए हैं — हमेशा जांचें आधिकारिक repo ताज़ा जानकारी के लिए।

कब इस्तेमाल करें

  • ऐसे चैट असिस्टेंट बनाना जिन्हें free text की जगह संरचित, सत्यापित फ़ील्ड्स लौटाने हों (जैसे एक message के साथ सुझाए गए फ़ॉलो-अप सवाल)
  • छोटे, दोबारा इस्तेमाल होने वाले agents और tools से multi-step AI पाइपलाइन बनाना, जहां हर step का साफ़ इनपुट और आउटपुट स्कीमा हो
  • Context Providers के ज़रिए agent के prompt में रनटाइम का डायनामिक संदर्भ (जैसे user data या search results) डालना
  • ऐसी टीमें जिन्हें पूरी तरह autonomous agents के बजाय किसी brand या product के अनुरूप अनुमानित, नियंत्रित agent व्यवहार चाहिए

How Atomic Agents compares

Atomic Agents alongside other open-source agent frameworks & builders tools AI/TLDR tracks, ranked by GitHub stars.

टूलस्टारयह क्या करता है
DeepSeek Harness★ 290kDeepSeek का ओपन एजेंट हार्नेस, जहाँ हर क्षमता एक प्लगइन है
AutoGPT★ 188kदोबारा इस्तेमाल होने वाले ब्लॉक्स से निरंतर AI एजेंट बनाएं, डिप्लॉय करें और चलाएं
DeerFlow★ 86.1kसब कुछ पहले से शामिल सुपर एजेंट हार्नेस, जिसमें स्किल्स, सब-एजेंट्स, सैंडबॉक्स और मेमोरी हैं
nanobot★ 50.5kWebUI, मेमोरी, MCP और चैट ऐप्स वाला सेल्फ-होस्टेड पर्सनल एजेंट रनटाइम
LangGraph★ 45.7kलंबे समय तक चलने वाले, stateful AI agents बनाने के लिए low-level orchestration framework
Agno★ 43.4kAI agent प्लेटफ़ॉर्म बनाने, चलाने और मैनेज करने के लिए Python SDK
AgentGPT★ 36.3kब्राउज़र में ही ऑटोनॉमस AI एजेंट बनाएं, कॉन्फ़िगर करें और डिप्लॉय करें
Atomic Agents★ 6.4kअनुमानित आउटपुट के लिए छोटे, स्कीमा-आधारित ब्लॉक्स से AI agents बनाएं