Building AI agents, atomically
fix: changing dir name from agent_history to chat_history
jon foxad28b33bf972
diff --git a/README.md b/README.mdindex 454ac6f..9708def 100644--- a/README.md+++ b/README.md@@ -140,7 +140,7 @@ import instructorfrom atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgentInputSchemafrom atomic_agents.lib.base.base_io_schema import BaseIOSchemafrom atomic_agents.lib.components.system_prompt_generator import SystemPromptGenerator-from atomic_agents.lib.components.agent_history import ChatHistory+from atomic_agents.lib.components.chat_history import ChatHistory# Define a custom output schemaclass CustomOutputSchema(BaseIOSchema):diff --git a/atomic-agents/atomic_agents/agents/base_agent.py b/atomic-agents/atomic_agents/agents/base_agent.pyindex c24d399..63afab8 100644--- a/atomic-agents/atomic_agents/agents/base_agent.py+++ b/atomic-agents/atomic_agents/agents/base_agent.py@@ -1,7 +1,7 @@import instructorfrom pydantic import BaseModel, Fieldfrom typing import Optional, Type, Generator, AsyncGenerator, get_args-from atomic_agents.lib.components.agent_history import ChatHistory+from atomic_agents.lib.components.chat_history import ChatHistoryfrom atomic_agents.lib.components.system_prompt_generator import (SystemPromptContextProviderBase,SystemPromptGenerator,diff --git a/atomic-agents/atomic_agents/lib/components/agent_history.py b/atomic-agents/atomic_agents/lib/components/chat_history.pysimilarity index 100%rename from atomic-agents/atomic_agents/lib/components/agent_history.pyrename to atomic-agents/atomic_agents/lib/components/chat_history.pydiff --git a/atomic-agents/tests/lib/components/test_agent_history.py b/atomic-agents/tests/lib/components/test_chat_history.pysimilarity index 97%rename from atomic-agents/tests/lib/components/test_agent_history.pyrename to atomic-agents/tests/lib/components/test_chat_history.pyindex 1708cd5..cf75594 100644--- a/atomic-agents/tests/lib/components/test_agent_history.py+++ b/atomic-agents/tests/lib/components/test_chat_history.py@@ -2,7 +2,7 @@ import pytestimport jsonfrom typing import List, Dictfrom pydantic import Field-from atomic_agents.lib.components.agent_history import ChatHistory, Message+from atomic_agents.lib.components.chat_history import ChatHistory, Messagefrom atomic_agents.lib.base.base_io_schema import BaseIOSchemaimport instructor@@ -150,10 +150,10 @@ def test_load_invalid_data(history):def test_get_class_from_string():- class_string = "tests.lib.components.test_agent_history.InputSchema"+ class_string = "tests.lib.components.test_chat_history.InputSchema"cls = ChatHistory._get_class_from_string(class_string)assert cls.__name__ == InputSchema.__name__- assert cls.__module__.endswith("test_agent_history")+ assert cls.__module__.endswith("test_chat_history")assert issubclass(cls, BaseIOSchema)@@ -244,7 +244,7 @@ def test_history_turn_consistency():assert history.history[2].turn_id == new_turn_id-def test_agent_history_delete_turn_id(history):+def test_chat_history_delete_turn_id(history):mock_input = InputSchema(test_field="Test input")mock_output = InputSchema(test_field="Test output")diff --git a/atomic-examples/mcp-agent/example-client/example_client/main_sse.py b/atomic-examples/mcp-agent/example-client/example_client/main_sse.pyindex f5598c5..8b343dc 100644--- a/atomic-examples/mcp-agent/example-client/example_client/main_sse.py+++ b/atomic-examples/mcp-agent/example-client/example_client/main_sse.py@@ -9,7 +9,7 @@ import instructorfrom pydantic import Fieldfrom atomic_agents.agents.base_agent import BaseIOSchema, BaseAgent, BaseAgentConfigfrom atomic_agents.lib.components.system_prompt_generator import SystemPromptGenerator-from atomic_agents.lib.components.agent_history import ChatHistory+from atomic_agents.lib.components.chat_history import ChatHistoryfrom typing import Union, Type, Dictfrom dataclasses import dataclassimport rediff --git a/atomic-examples/mcp-agent/example-client/example_client/main_stdio.py b/atomic-examples/mcp-agent/example-client/example_client/main_stdio.pyindex 3fcbffa..d063549 100644--- a/atomic-examples/mcp-agent/example-client/example_client/main_stdio.py+++ b/atomic-examples/mcp-agent/example-client/example_client/main_stdio.py@@ -11,7 +11,7 @@ from contextlib import AsyncExitStackfrom pydantic import Fieldfrom atomic_agents.agents.base_agent import BaseIOSchema, BaseAgent, BaseAgentConfigfrom atomic_agents.lib.components.system_prompt_generator import SystemPromptGenerator-from atomic_agents.lib.components.agent_history import ChatHistory+from atomic_agents.lib.components.chat_history import ChatHistoryfrom typing import Union, Type, Dict, Optionalfrom dataclasses import dataclassfrom mcp import ClientSession, StdioServerParametersdiff --git a/atomic-examples/quickstart/quickstart/1_0_basic_chatbot.py b/atomic-examples/quickstart/quickstart/1_0_basic_chatbot.pyindex c84941a..9ec33cf 100644--- a/atomic-examples/quickstart/quickstart/1_0_basic_chatbot.py+++ b/atomic-examples/quickstart/quickstart/1_0_basic_chatbot.py@@ -4,7 +4,7 @@ import openaifrom rich.console import Consolefrom rich.panel import Panelfrom rich.text import Text-from atomic_agents.lib.components.agent_history import ChatHistory+from atomic_agents.lib.components.chat_history import ChatHistoryfrom atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgentInputSchema, BaseAgentOutputSchema# API Key setupdiff --git a/atomic-examples/quickstart/quickstart/1_1_basic_chatbot_streaming.py b/atomic-examples/quickstart/quickstart/1_1_basic_chatbot_streaming.pyindex 7f10650..40d76f9 100644--- a/atomic-examples/quickstart/quickstart/1_1_basic_chatbot_streaming.py+++ b/atomic-examples/quickstart/quickstart/1_1_basic_chatbot_streaming.py@@ -4,7 +4,7 @@ import openaifrom rich.console import Consolefrom rich.panel import Panelfrom rich.text import Text-from atomic_agents.lib.components.agent_history import ChatHistory+from atomic_agents.lib.components.chat_history import ChatHistoryfrom atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgentInputSchema, BaseAgentOutputSchema# API Key setupdiff --git a/atomic-examples/quickstart/quickstart/1_2_basic_chatbot_async_streaming.py b/atomic-examples/quickstart/quickstart/1_2_basic_chatbot_async_streaming.pyindex 1c81eb4..99cc1ce 100644--- a/atomic-examples/quickstart/quickstart/1_2_basic_chatbot_async_streaming.py+++ b/atomic-examples/quickstart/quickstart/1_2_basic_chatbot_async_streaming.py@@ -5,7 +5,7 @@ from rich.console import Consolefrom rich.panel import Panelfrom rich.text import Textfrom rich.live import Live-from atomic_agents.lib.components.agent_history import ChatHistory+from atomic_agents.lib.components.chat_history import ChatHistoryfrom atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgentInputSchema, BaseAgentOutputSchema# API Key setupdiff --git a/atomic-examples/quickstart/quickstart/2_basic_custom_chatbot.py b/atomic-examples/quickstart/quickstart/2_basic_custom_chatbot.pyindex e7c17f2..0ae5e62 100644--- a/atomic-examples/quickstart/quickstart/2_basic_custom_chatbot.py+++ b/atomic-examples/quickstart/quickstart/2_basic_custom_chatbot.py@@ -5,7 +5,7 @@ from rich.console import Consolefrom rich.panel import Panelfrom rich.text import Textfrom atomic_agents.lib.components.system_prompt_generator import SystemPromptGenerator-from atomic_agents.lib.components.agent_history import ChatHistory+from atomic_agents.lib.components.chat_history import ChatHistoryfrom atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgentInputSchema, BaseAgentOutputSchema# API Key setupdiff --git a/atomic-examples/quickstart/quickstart/3_0_basic_custom_chatbot_with_custom_schema.py b/atomic-examples/quickstart/quickstart/3_0_basic_custom_chatbot_with_custom_schema.pyindex 2971837..5d7aa83 100644--- a/atomic-examples/quickstart/quickstart/3_0_basic_custom_chatbot_with_custom_schema.py+++ b/atomic-examples/quickstart/quickstart/3_0_basic_custom_chatbot_with_custom_schema.py@@ -7,7 +7,7 @@ from rich.text import Textfrom typing import Listfrom pydantic import Fieldfrom atomic_agents.lib.components.system_prompt_generator import SystemPromptGenerator-from atomic_agents.lib.components.agent_history import ChatHistory+from atomic_agents.lib.components.chat_history import ChatHistoryfrom atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgentInputSchemafrom atomic_agents.lib.base.base_io_schema import BaseIOSchemadiff --git a/atomic-examples/quickstart/quickstart/3_1_basic_custom_chatbot_with_custom_schema_streaming.py b/atomic-examples/quickstart/quickstart/3_1_basic_custom_chatbot_with_custom_schema_streaming.pyindex ca75862..3a69b11 100644--- a/atomic-examples/quickstart/quickstart/3_1_basic_custom_chatbot_with_custom_schema_streaming.py+++ b/atomic-examples/quickstart/quickstart/3_1_basic_custom_chatbot_with_custom_schema_streaming.py@@ -8,7 +8,7 @@ from rich.live import Livefrom typing import Listfrom pydantic import Fieldfrom atomic_agents.lib.components.system_prompt_generator import SystemPromptGenerator-from atomic_agents.lib.components.agent_history import ChatHistory+from atomic_agents.lib.components.chat_history import ChatHistoryfrom atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgentInputSchemafrom atomic_agents.lib.base.base_io_schema import BaseIOSchemadiff --git a/atomic-examples/quickstart/quickstart/4_basic_chatbot_different_providers.py b/atomic-examples/quickstart/quickstart/4_basic_chatbot_different_providers.pyindex 8bb3b36..0ff4274 100644--- a/atomic-examples/quickstart/quickstart/4_basic_chatbot_different_providers.py+++ b/atomic-examples/quickstart/quickstart/4_basic_chatbot_different_providers.py@@ -3,7 +3,7 @@ import instructorfrom rich.console import Consolefrom rich.panel import Panelfrom rich.text import Text-from atomic_agents.lib.components.agent_history import ChatHistory+from atomic_agents.lib.components.chat_history import ChatHistoryfrom atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgentInputSchema, BaseAgentOutputSchemafrom dotenv import load_dotenvdiff --git a/atomic-examples/web-search-agent/web_search_agent/main.py b/atomic-examples/web-search-agent/web_search_agent/main.pyindex 36d744b..d0f66fe 100644--- a/atomic-examples/web-search-agent/web_search_agent/main.py+++ b/atomic-examples/web-search-agent/web_search_agent/main.py@@ -5,7 +5,7 @@ from rich.markdown import Markdownfrom pydantic import Fieldfrom atomic_agents.agents.base_agent import BaseIOSchema-from atomic_agents.lib.components.agent_history import ChatHistory+from atomic_agents.lib.components.chat_history import ChatHistoryfrom atomic_agents.lib.components.system_prompt_generator import SystemPromptContextProviderBasefrom web_search_agent.tools.searxng_search import (diff --git a/docs/api/agents.md b/docs/api/agents.mdindex 5f1d46b..b0a376e 100644--- a/docs/api/agents.md+++ b/docs/api/agents.md@@ -103,7 +103,7 @@ The `BaseAgent` class is the foundation for building AI agents in the Atomic Age```pythonfrom atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig-from atomic_agents.lib.components.agent_history import ChatHistory+from atomic_agents.lib.components.chat_history import ChatHistoryfrom atomic_agents.lib.components.system_prompt_generator import SystemPromptGenerator# Create agent with basic configurationdiff --git a/docs/api/components.md b/docs/api/components.mdindex 09bb978..71df4cf 100644--- a/docs/api/components.md+++ b/docs/api/components.md@@ -5,7 +5,7 @@The `ChatHistory` class manages conversation history and state for AI agents:```python-from atomic_agents.lib.components.agent_history import ChatHistory+from atomic_agents.lib.components.chat_history import ChatHistoryfrom atomic_agents.lib.base.base_io_schema import BaseIOSchema# Initialize history with optional max messages@@ -203,7 +203,7 @@ Key features:For full API details:```{eval-rst}-.. automodule:: atomic_agents.lib.components.agent_history+.. automodule:: atomic_agents.lib.components.chat_history:members::undoc-members::show-inheritance:diff --git a/docs/guides/quickstart.md b/docs/guides/quickstart.mdindex a215d06..62277b3 100644--- a/docs/guides/quickstart.md+++ b/docs/guides/quickstart.md@@ -24,7 +24,7 @@ import osimport instructorimport openaifrom rich.console import Console-from atomic_agents.lib.components.agent_history import ChatHistory+from atomic_agents.lib.components.chat_history import ChatHistoryfrom atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgentInputSchema, BaseAgentOutputSchema# Initialize console for pretty outputs@@ -80,7 +80,7 @@ from rich.console import Consolefrom rich.panel import Panelfrom rich.text import Textfrom rich.live import Live-from atomic_agents.lib.components.agent_history import ChatHistory+from atomic_agents.lib.components.chat_history import ChatHistoryfrom atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgentInputSchema, BaseAgentOutputSchema# Initialize console for pretty outputs@@ -152,7 +152,7 @@ from rich.console import Consolefrom typing import Listfrom pydantic import Fieldfrom atomic_agents.lib.components.system_prompt_generator import SystemPromptGenerator-from atomic_agents.lib.components.agent_history import ChatHistory+from atomic_agents.lib.components.chat_history import ChatHistoryfrom atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgentInputSchemafrom atomic_agents.lib.base.base_io_schema import BaseIOSchema@@ -258,7 +258,7 @@ import osimport instructorfrom rich.console import Consolefrom rich.text import Text-from atomic_agents.lib.components.agent_history import ChatHistory+from atomic_agents.lib.components.chat_history import ChatHistoryfrom atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgentInputSchema, BaseAgentOutputSchemafrom dotenv import load_dotenvdiff --git a/docs/index.md b/docs/index.mdindex ab1a2a9..781f92e 100644--- a/docs/index.md+++ b/docs/index.md@@ -61,7 +61,7 @@ Here's a glimpse of how easy it is to create an agent:```pythonimport instructorimport openai-from atomic_agents.lib.components.agent_history import ChatHistory+from atomic_agents.lib.components.chat_history import ChatHistoryfrom atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgentInputSchema, BaseAgentOutputSchema