Building AI agents, atomically
Fix typo in atomic-agents (#264)
bglglzd728f93bd0098
diff --git a/UPGRADE_DOC.md b/UPGRADE_DOC.mdindex 5fc0821..a3fcd9e 100644--- a/UPGRADE_DOC.md+++ b/UPGRADE_DOC.md@@ -118,7 +118,7 @@ from atomic_agents.lib.base.base_io_schema import BaseIOSchemaclass MyTool(BaseTool):input_schema = MyInputSchemaoutput_schema = MyOutputSchema-+def run(self, params: MyInputSchema) -> MyOutputSchema:# Tool logicpass@@ -141,7 +141,7 @@ class MyTool(BaseTool[MyInputSchema, MyOutputSchema]):class CalculatorTool(BaseTool):input_schema = CalculatorInputSchemaoutput_schema = CalculatorOutputSchema-+# NEWclass CalculatorTool(BaseTool[CalculatorInputSchema, CalculatorOutputSchema]):# No need for input_schema and output_schema attributes@@ -249,15 +249,15 @@ agent = AtomicAgent[CustomInputSchema, CustomOutputSchema](# Example with custom schemas:from atomic_agents import BaseIOSchemafrom pydantic import Field-+class TranslationInput(BaseIOSchema):text: str = Field(..., description="Text to translate")target_language: str = Field(..., description="Target language code")-+class TranslationOutput(BaseIOSchema):translated_text: str = Field(..., description="The translated text")confidence: float = Field(..., description="Translation confidence score")-+# OLD - Schemas passed in configagent = BaseAgent(BaseAgentConfig(@@ -268,7 +268,7 @@ agent = AtomicAgent[CustomInputSchema, CustomOutputSchema](output_schema=TranslationOutput # Was here))-+# NEW - Schemas as type parametersagent = AtomicAgent[TranslationInput, TranslationOutput](AgentConfig(@@ -290,7 +290,7 @@ agent = AtomicAgent[CustomInputSchema, CustomOutputSchema](temperature=0.7, # Direct parametermax_tokens=1000 # Direct parameter)-+# NEW - Grouped parametersconfig = AgentConfig(client=client,@@ -320,7 +320,7 @@ The v2.0 upgrade brings several key benefits:1. **Shorter imports**: Eliminated `.lib` from import paths2. **Consistent API**: All base classes from main package3. **Cleaner code**: More readable import statements-4. **Better organization**:+4. **Better organization**:- `components` → `context` (better reflects purpose)- `factories` → `connectors` with MCP-specific functionality grouped under `connectors.mcp`- `connectors` structure allows future extension for agent-to-agent communications and other connectivity modules@@ -501,14 +501,14 @@ class WeatherToolOutputSchema(BaseIOSchema):class WeatherTool(BaseTool):"""Tool for fetching weather information"""-+input_schema = WeatherToolInputSchemaoutput_schema = WeatherToolOutputSchema-+def __init__(self, api_key: str, config: BaseToolConfig = BaseToolConfig()):super().__init__(config)self.api_key = api_key-+def run(self, params: WeatherToolInputSchema) -> WeatherToolOutputSchema:# Tool implementationresponse = requests.get(@@ -543,11 +543,11 @@ class WeatherToolOutputSchema(BaseIOSchema):class WeatherTool(BaseTool[WeatherToolInputSchema, WeatherToolOutputSchema]):"""Tool for fetching weather information"""-+def __init__(self, api_key: str, config: BaseToolConfig = BaseToolConfig()):super().__init__(config)self.api_key = api_key-+def run(self, params: WeatherToolInputSchema) -> WeatherToolOutputSchema:# Tool implementation (unchanged)response = requests.get(@@ -721,7 +721,7 @@ If you encounter import errors after upgrading:1. Ensure all old `.lib` imports are updated2. Check that class renames are applied:- `BaseAgent` → `AtomicAgent`- - `BaseAgentConfig` → `AgentConfig`+ - `BaseAgentConfig` → `AgentConfig`- `BaseAgentInputSchema` → `BasicChatInputSchema`- `BaseAgentOutputSchema` → `BasicChatOutputSchema`- `AgentMemory` → `ChatHistory`diff --git a/agents.md b/agents.mdindex 8417247..e925db1 100644--- a/agents.md+++ b/agents.md@@ -391,4 +391,4 @@ criteria, and cross-reference related skills both ways.- Shared surfaces to compose: core framework `atomic-agents/atomic_agents/` (AtomicAgent, BaseIOSchema, BaseTool, context providers, MCP connectors); CLI `atomic` (atomic-assembler); downloadable tools `atomic-forge/tools/*`; runnable examples `atomic-examples/*`- Skill convention: frontmatter `name` + `description` (optional `allowed-tools`); one skill per dir at `.claude/skills/<name>/SKILL.md`- Current skills: `release` (project-local); `skill-forge` + `skill-forge-setup` (installed via plugin `claude-dev-kitchen`)-<!-- skill-forge:end -->\ No newline at end of file+<!-- skill-forge:end -->diff --git a/atomic-assembler/README.md b/atomic-assembler/README.mdindex e69de29..8b13789 100644--- a/atomic-assembler/README.md+++ b/atomic-assembler/README.md@@ -0,0 +1 @@+diff --git a/atomic-examples/hooks-example/README.md b/atomic-examples/hooks-example/README.mdindex 5c64fd3..e39b8f3 100644--- a/atomic-examples/hooks-example/README.md+++ b/atomic-examples/hooks-example/README.md@@ -5,7 +5,7 @@ This example demonstrates the powerful hook system integration in AtomicAgent, w## Features Demonstrated- **🔍 Comprehensive Monitoring**: Track all aspects of agent execution-- **🛡️ Robust Error Handling**: Graceful handling of validation and completion errors+- **🛡️ Robust Error Handling**: Graceful handling of validation and completion errors- **🔄 Intelligent Retry Patterns**: Implement smart retry logic based on error context- **📊 Performance Metrics**: Monitor response times, success rates, and error patterns- **🔧 Easy Debugging**: Detailed error information and execution flow visibility@@ -47,7 +47,7 @@ The example demonstrates several key hook system patterns:- Completion monitoring and metrics collection### Advanced Error Handling-- Comprehensive validation error analysis+- Comprehensive validation error analysis- Intelligent retry mechanisms with backoff strategies- Error isolation to prevent hook failures from disrupting execution@@ -83,7 +83,7 @@ This hook system implementation provides:This example demonstrates the complete resolution of GitHub issue #173, showing how the AtomicAgent hook system enables:- ✅ Parse error hooks triggering on validation failures-- ✅ Comprehensive error context for retry mechanisms+- ✅ Comprehensive error context for retry mechanisms- ✅ Full Instructor hook event support- ✅ 100% backward compatibility- ✅ Robust error isolation@@ -95,4 +95,4 @@ After running this example, you can:1. Experiment with different hook combinations2. Implement custom retry strategies3. Add your own monitoring and alerting logic-4. Explore integration with observability platforms\ No newline at end of file+4. Explore integration with observability platformsdiff --git a/atomic-examples/web-search-agent/README.md b/atomic-examples/web-search-agent/README.mdindex 27580f4..57792ef 100644--- a/atomic-examples/web-search-agent/README.md+++ b/atomic-examples/web-search-agent/README.md@@ -59,7 +59,7 @@ Make sure to add these lines to `settings.tml`:SEARXNG_BASE_URL=your_searxng_instance_url```- Replace `your_openai_api_key` with your actual OpenAI API key and `your_searxng_instance_url` with the URL of your SearXNG instance.+ Replace `your_openai_api_key` with your actual OpenAI API key and `your_searxng_instance_url` with the URL of your SearXNG instance.If you do not have a SearxNG instance, see the instructions below to set up one locally with docker.2. Run the Web Search Agent:diff --git a/pytest.ini b/pytest.iniindex 24cac01..13c41d7 100644--- a/pytest.ini+++ b/pytest.ini@@ -6,4 +6,4 @@ asyncio_default_fixture_loop_scope = functiontestpaths = atomic-agents/testspython_files = test_*.pypython_classes = Test*-python_functions = test_*\ No newline at end of file+python_functions = test_*