framework
Skill này làm gì
Đây là tổng quan về framework Atomic Agents, với các khối xây dựng chính và ghi chú tham khảo cho từng phần. Dành cho lập trình viên Python xây dựng ứng dụng LLM với đầu vào và đầu ra có kiểu.
Khi nào nên dùng
- ✓Khi dự án của lập trình viên import framework Atomic Agents và cần đúng mẫu thiết kế.
- ✓Khi lập trình viên hỏi agent, công cụ và context provider khớp với nhau như thế nào.
- ✓Khi lập trình viên muốn kết nối một nhà cung cấp AI vào dự án Atomic Agents.
Liên kết skill
https://github.com/Eigenwise/atomic-agents/blob/main/claude-plugin/atomic-agents/skills/framework/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Agent, công cụ và schema khớp với nhau thế nào trong dự án Atomic Agents của tôi?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill liệt kê các lớp cốt lõi như agent, cấu hình agent, schema và công cụ, rồi chỉ đến các ghi chú tham khảo chuyên sâu cho từng phần mà tác vụ cần.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Atomic Agents Framework
Atomic Agents is a lightweight Python framework for building LLM applications with typed, structured input and output. It layers on top of Instructor and Pydantic so every interaction between user, agent, tool, and context is a validated schema.
This skill orients Claude on the framework and routes to focused reference files as the task requires.
Core abstractions
| Concept | Class | Role |
|---|---|---|
| Schema | BaseIOSchema |
Typed input/output contract — every agent/tool I/O is one |
| Agent | AtomicAgent[In, Out] |
LLM-backed transformer from input schema to output schema |
| Config | AgentConfig |
Wires client, model, history, prompt, roles, API params |
| Prompt | SystemPromptGenerator |
Three-section prompt: background, steps, output_instructions |
| History | ChatHistory |
Conversation state, serializable, token-counted |
| Tool | BaseTool[In, Out] |
Deterministic capability the agent can invoke |
| Context | BaseDynamicContextProvider |
Dynamic section injected into the system prompt at runtime |
All communication between these uses BaseIOSchema subclasses with docstring-required descriptions.
Canonical imports
from atomic_agents import (
AtomicAgent, AgentConfig,
BasicChatInputSchema, BasicChatOutputSchema,
BaseIOSchema, BaseTool, BaseToolConfig,
)
from atomic_agents.context import (
ChatHistory, Message,
SystemPromptGenerator, BaseDynamicContextProvider,
)
# Optional: MCP interop
from atomic_agents.connectors.mcp import fetch_mcp_tools, MCPTransportType
Do not use legacy paths like atomic_agents.lib.base.* or atomic_agents.agents.base_agent — those were retired. Import from the top-level package where possible.
Minimum viable agent
import os, instructor, openai
from atomic_agents import AtomicAgent, AgentConfig, BasicChatInputSchema, BasicChatOutputSchema
from atomic_agents.context import ChatHistory
client = instructor.from_openai(openai.OpenAI(api_key=os.environ["OPENAI_API_KEY"]))
agent = AtomicAgent[BasicChatInputSchema, BasicChatOutputSchema](
config=AgentConfig(
client=client,
model="gpt-5-mini",
history=ChatHistory(),
)
)
reply = agent.run(BasicChatInputSchema(chat_message="Hello"))
print(reply.chat_message)
AtomicAgent and BaseTool use PEP 695 generics — the type parameters carry runtime information, so write them explicitly and keep them accurate. Full runnable version: atomic-examples/quickstart/quickstart/1_0_basic_chatbot.py.
Targeted creation skills
For the four most common authoring tasks, dedicated atomic skills give a step-by-step workflow (clarify → write → verify → hand off) instead of just reference material. Prefer them when the user is actively building something specific.
| User intent | Atomic skill |
|---|---|
| "create a schema" / "design the input/output schema" | atomic-agents:create-atomic-schema |
"create an agent" / "add another agent" / "wire up an AtomicAgent" |
atomic-agents:create-atomic-agent |
"add a tool" / "wrap an API as a tool" / "build a BaseTool" |
atomic-agents:create-atomic-tool |
| "add a context provider" / "inject X into the prompt" / "wire up RAG" | atomic-agents:create-atomic-context-provider |
| "my agent is broken / crashing / returning garbage" + a traceback or error | atomic-agents:troubleshoot |
These skills auto-trigger on the matching phrasing. The reference files below are what they (and you) load for deeper material.
Decision routing
Pick the reference file that matches the task. Each is loaded only when read.
| Task | Reference |
|---|---|
| Design or validate an input/output schema | references/schemas.md |
| Build, configure, or run an agent | references/agents.md |
| Write a tool the agent will invoke | references/tools.md |
| Inject dynamic data into the system prompt | references/context-providers.md |
| Structure the system prompt | references/prompts.md |
| Coordinate multiple agents | references/orchestration.md |
| Manage conversation state and multi-agent memory | references/memory.md |
| Register telemetry, retries, or logging | references/hooks.md |
| Swap LLM provider or configure roles | [references/provi |
Câu hỏi thường gặp
Atomic Agents là gì?
Đó là một framework Python nhẹ để xây dựng ứng dụng LLM với đầu vào và đầu ra có kiểu, được kiểm tra hợp lệ.
Nó được xây dựng trên gì?
Skill nói nó được xây dựng trên Instructor và Pydantic.
Nó có bao gồm thiết lập nhiều agent không?
Có. Skill nhắc đến điều phối giữa các agent như một phần của framework.
Chi tiết
Mô tả gốc của tác giả
Guide for the Atomic Agents Python framework — schemas, agents, tools, context providers, prompts, orchestration, and provider configuration. Use when code imports from `atomic_agents`, defines an `AtomicAgent`, `BaseTool`, or `BaseIOSchema`, or the user asks about multi-agent orchestration or LLM-provider wiring in an atomic-agents project.
repo: Eigenwise/atomic-agents
Độ phổ biến
- Sao GitHub
- 6.3k
- Vị trí xếp hạng
- #14241
- Giấy phép
- MIT
- Cập nhật
- 29/10/2026
Bình luận
- …
Thêm skill từ kho mã này
create-atomic-agent
6.3kGiúp agent của bạn xây dựng một Atomic Agents agent mới với đầu vào và đầu ra có kiểu, system prompt và nhà cung cấp AI đã chọn.
create-atomic-context-provider
6.3kGiúp agent của bạn thêm một context provider vào Atomic Agents agent, để các thông tin mới như thời gian hoặc tài liệu truy xuất xuất hiện trong prompt.
create-atomic-schema
6.3kGiúp agent của bạn thiết kế schema đầu vào và đầu ra có kiểu cho Atomic Agents agent và công cụ, với mô tả trường rõ ràng.
create-atomic-tool
6.3kGiúp agent của bạn xây dựng một công cụ có kiểu cho ứng dụng Atomic Agents, chẳng hạn một lớp bọc API hoặc máy tính mà agent có thể gọi.
Skill tương tự
diffs
394kGiúp agent của bạn tạo một diff có thể chia sẻ về các chỉnh sửa, dưới dạng liên kết xem hoặc file ảnh, thay vì một bản tóm tắt viết tay.
coding-agent
394kGiúp agent của bạn giao một việc lập trình lớn cho Codex, Claude Code hoặc OpenCode chạy nền, rồi theo dõi tiến độ của nó.
gh-issues
394kGiúp agent của bạn tìm issue trên GitHub, chọn những issue cần xử lý và mở pull request với bản sửa, kể cả theo dõi nhận xét đánh giá.