Chuyển đến nội dung
Skillpedia
Lập trình chung6.3k · #14241

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.md

Sao 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

Hãy dùng skill này để giúp tôi: https://github.com/Eigenwise/atomic-agents/blob/main/claude-plugin/atomic-agents/skills/framework/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

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

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự