Building AI agents, atomically
refactor: AgentMemory renamed to ChatHistory, #115
jon foxa2407508e553
diff --git a/README.md b/README.mdindex 8afbfe8..05e5670 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_memory import AgentMemory+from atomic_agents.lib.components.agent_memory import AgentHistory# Define a custom output schemaclass CustomOutputSchema(BaseIOSchema):@@ -173,7 +173,7 @@ agent = BaseAgent[BaseAgentInputSchema, CustomOutputSchema](client=client,model="gpt-4o-mini",system_prompt_generator=system_prompt_generator,- memory=AgentMemory(),+ memory=AgentHistory(),))diff --git a/atomic-agents/atomic_agents/agents/base_agent.py b/atomic-agents/atomic_agents/agents/base_agent.pyindex 096c5c1..f02fc1e 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 AgentMemory+from atomic_agents.lib.components.agent_history import AgentHistoryfrom atomic_agents.lib.components.system_prompt_generator import (SystemPromptContextProviderBase,SystemPromptGenerator,@@ -60,7 +60,7 @@ class BaseAgentOutputSchema(BaseIOSchema):class BaseAgentConfig(BaseModel):client: instructor.client.Instructor = Field(..., description="Client for interacting with the language model.")model: str = Field(default="gpt-4o-mini", description="The model to use for generating responses.")- memory: Optional[AgentMemory] = Field(default=None, description="Memory component for storing chat history.")+ memory: Optional[AgentHistory] = Field(default=None, description="Memory component for storing chat history.")system_prompt_generator: Optional[SystemPromptGenerator] = Field(default=None, description="Component for generating system prompts.")@@ -85,10 +85,10 @@ class BaseAgent[InputSchema: BaseIOSchema, OutputSchema: BaseIOSchema]:Attributes:client: Client for interacting with the language model.model (str): The model to use for generating responses.- memory (AgentMemory): Memory component for storing chat history.+ memory (AgentHistory): Memory component for storing chat history.system_prompt_generator (SystemPromptGenerator): Component for generating system prompts.system_role (Optional[str]): The role of the system in the conversation. None means no system prompt.- initial_memory (AgentMemory): Initial state of the memory.+ initial_memory (AgentHistory): Initial state of the memory.current_user_input (Optional[InputSchema]): The current user input being processed.model_api_parameters (dict): Additional parameters passed to the API provider.- Use this for parameters like 'temperature', 'max_tokens', etc.@@ -103,7 +103,7 @@ class BaseAgent[InputSchema: BaseIOSchema, OutputSchema: BaseIOSchema]:"""self.client = config.clientself.model = config.model- self.memory = config.memory or AgentMemory()+ self.memory = config.memory or AgentHistory()self.system_prompt_generator = config.system_prompt_generator or SystemPromptGenerator()self.system_role = config.system_roleself.initial_memory = self.memory.copy()diff --git a/atomic-agents/atomic_agents/lib/components/agent_history.py b/atomic-agents/atomic_agents/lib/components/agent_history.pyindex 0890153..b9f6fd4 100644--- a/atomic-agents/atomic_agents/lib/components/agent_history.py+++ b/atomic-agents/atomic_agents/lib/components/agent_history.py@@ -20,7 +20,7 @@ class Message(BaseModel):turn_id: Optional[str] = None-class AgentMemory:+class AgentHistory:"""Manages the chat history for an AI agent.@@ -32,7 +32,7 @@ class AgentMemory:def __init__(self, max_messages: Optional[int] = None):"""- Initializes the AgentMemory with an empty history and optional constraints.+ Initializes the AgentHistory with an empty history and optional constraints.Args:max_messages (Optional[int]): Maximum number of messages to keep in history.@@ -124,14 +124,14 @@ class AgentMemory:history.append({"role": message.role, "content": json.dumps(content.model_dump(mode="json"))})return history- def copy(self) -> "AgentMemory":+ def copy(self) -> "AgentHistory":"""Creates a copy of the chat memory.Returns:- AgentMemory: A copy of the chat memory.+ AgentHistory: A copy of the chat memory."""- new_memory = AgentMemory(max_messages=self.max_messages)+ new_memory = AgentHistory(max_messages=self.max_messages)new_memory.load(self.dump())new_memory.current_turn_id = self.current_turn_idreturn new_memory@@ -182,10 +182,10 @@ class AgentMemory:def dump(self) -> str:"""- Serializes the entire AgentMemory instance to a JSON string.+ Serializes the entire AgentHistory instance to a JSON string.Returns:- str: A JSON string representation of the AgentMemory.+ str: A JSON string representation of the AgentHistory."""serialized_history = []for message in self.history:@@ -209,10 +209,10 @@ class AgentMemory:def load(self, serialized_data: str) -> None:"""- Deserializes a JSON string and loads it into the AgentMemory instance.+ Deserializes a JSON string and loads it into the AgentHistory instance.Args:- serialized_data (str): A JSON string representation of the AgentMemory.+ serialized_data (str): A JSON string representation of the AgentHistory.Raises:ValueError: If the serialized data is invalid or cannot be deserialized.@@ -287,7 +287,7 @@ if __name__ == "__main__":images: List[instructor.Image] = Field(..., description="The images to analyze")# Create and populate the original memory with complex data- original_memory = AgentMemory(max_messages=10)+ original_memory = AgentHistory(max_messages=10)# Add a complex input messageoriginal_memory.add_message(@@ -330,7 +330,7 @@ if __name__ == "__main__":print(dumped_data)# Create a new memory and load the dumped data- loaded_memory = AgentMemory()+ loaded_memory = AgentHistory()loaded_memory.load(dumped_data)# Print detailed information about the loaded memorydiff --git a/atomic-agents/tests/agents/test_base_agent.py b/atomic-agents/tests/agents/test_base_agent.pyindex af61284..ad126df 100644--- a/atomic-agents/tests/agents/test_base_agent.py+++ b/atomic-agents/tests/agents/test_base_agent.py@@ -9,7 +9,7 @@ from atomic_agents.agents.base_agent import (BaseAgentInputSchema,BaseAgentOutputSchema,SystemPromptGenerator,- AgentMemory,+ AgentHistory,SystemPromptContextProviderBase,)from instructor.dsl.partial import PartialBase@@ -58,10 +58,10 @@ def mock_instructor_async():@pytest.fixturedef mock_memory():- mock = Mock(spec=AgentMemory)+ mock = Mock(spec=AgentHistory)mock.get_history.return_value = []mock.add_message = Mock()- mock.copy = Mock(return_value=Mock(spec=AgentMemory))+ mock.copy = Mock(return_value=Mock(spec=AgentHistory))mock.initialize_turn = Mock()return mockdiff --git a/atomic-agents/tests/lib/components/test_agent_history.py b/atomic-agents/tests/lib/components/test_agent_history.pyindex d06e8c9..253165a 100644--- a/atomic-agents/tests/lib/components/test_agent_history.py+++ b/atomic-agents/tests/lib/components/test_agent_history.py@@ -2,7 +2,7 @@ import pytestimport jsonfrom typing import List, Dictfrom pydantic import Field-from atomic_agents.lib.components.agent_history import AgentMemory, Message+from atomic_agents.lib.components.agent_history import AgentHistory, Messagefrom atomic_agents.lib.base.base_io_schema import BaseIOSchemaimport instructor@@ -52,7 +52,7 @@ class MockMultimodalSchema(BaseIOSchema):@pytest.fixturedef memory():- return AgentMemory(max_messages=5)+ return AgentHistory(max_messages=5)def test_initialization(memory):@@ -132,7 +132,7 @@ def test_dump_and_load(memory):)dumped_data = memory.dump()- new_memory = AgentMemory()+ new_memory = AgentHistory()new_memory.load(dumped_data)assert new_memory.max_messages == memory.max_messages@@ -151,7 +151,7 @@ def test_load_invalid_data(memory):def test_get_class_from_string():class_string = "tests.lib.components.test_agent_memory.InputSchema"- cls = AgentMemory._get_class_from_string(class_string)+ cls = AgentHistory._get_class_from_string(class_string)assert cls.__name__ == InputSchema.__name__assert cls.__module__.endswith("test_agent_memory")assert issubclass(cls, BaseIOSchema)@@ -159,7 +159,7 @@ def test_get_class_from_string():def test_get_class_from_string_invalid():with pytest.raises((ImportError, AttributeError)):- AgentMemory._get_class_from_string("invalid.module.Class")+ AgentHistory._get_class_from_string("invalid.module.Class")def test_message_model():@@ -196,7 +196,7 @@ def test_complex_scenario(memory):# Dump and loaddumped_data = memory.dump()- new_memory = AgentMemory()+ new_memory = AgentHistory()new_memory.load(dumped_data)# Verify loaded data@@ -215,21 +215,21 @@ def test_complex_scenario(memory):def test_memory_with_no_max_messages():- unlimited_memory = AgentMemory()+ unlimited_memory = AgentHistory()for i in range(100):unlimited_memory.add_message("user", InputSchema(test_field=f"Message {i}"))assert len(unlimited_memory.history) == 100def test_memory_with_zero_max_messages():- zero_max_memory = AgentMemory(max_messages=0)+ zero_max_memory = AgentHistory(max_messages=0)for i in range(10):zero_max_memory.add_message("user", InputSchema(test_field=f"Message {i}"))assert len(zero_max_memory.history) == 0def test_memory_turn_consistency():- memory = AgentMemory()+ memory = AgentHistory()memory.initialize_turn()turn_id = memory.get_current_turn_id()memory.add_message("user", InputSchema(test_field="Hello"))@@ -248,7 +248,7 @@ def test_agent_memory_delete_turn_id(memory):mock_input = InputSchema(test_field="Test input")mock_output = InputSchema(test_field="Test output")- memory = AgentMemory()+ memory = AgentHistory()initial_turn_id = "123-456"memory.current_turn_id = initial_turn_iddiff --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 0d40a70..0ef191b 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 AgentMemory+from atomic_agents.lib.components.agent_history import AgentHistoryfrom typing import Union, Type, Dictfrom dataclasses import dataclassimport re@@ -140,7 +140,7 @@ def main():console.print(table)# Create and initialize orchestrator agentconsole.print("[dim]• Creating orchestrator agent...[/dim]")- memory = AgentMemory()+ memory = AgentHistory()orchestrator_agent = BaseAgent[MCPOrchestratorInputSchema, OrchestratorOutputSchema](BaseAgentConfig(client=client,diff --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 6fe3c7a..ea1f654 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 AgentMemory+from atomic_agents.lib.components.agent_history import AgentHistoryfrom typing import Union, Type, Dict, Optionalfrom dataclasses import dataclassfrom mcp import ClientSession, StdioServerParameters@@ -133,7 +133,7 @@ def main():console.print(table)# Create and initialize orchestrator agentconsole.print("[dim]• Creating orchestrator agent...[/dim]")- memory = AgentMemory()+ memory = AgentHistory()orchestrator_agent = BaseAgent[MCPOrchestratorInputSchema, OrchestratorOutputSchema](BaseAgentConfig(client=client,diff --git a/atomic-examples/quickstart/quickstart/1_0_basic_chatbot.py b/atomic-examples/quickstart/quickstart/1_0_basic_chatbot.pyindex 04536ec..0c1fc69 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 AgentMemory+from atomic_agents.lib.components.agent_history import AgentHistoryfrom atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgentInputSchema, BaseAgentOutputSchema# API Key setup@@ -21,7 +21,7 @@ if not API_KEY:console = Console()# Memory setup-memory = AgentMemory()+memory = AgentHistory()# Initialize memory with an initial message from the assistantinitial_message = BaseAgentOutputSchema(chat_message="Hello! How can I assist you today?")diff --git a/atomic-examples/quickstart/quickstart/1_1_basic_chatbot_streaming.py b/atomic-examples/quickstart/quickstart/1_1_basic_chatbot_streaming.pyindex e36648e..46ca6d3 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 AgentMemory+from atomic_agents.lib.components.agent_history import AgentHistoryfrom atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgentInputSchema, BaseAgentOutputSchema# API Key setup@@ -21,7 +21,7 @@ if not API_KEY:console = Console()# Memory setup-memory = AgentMemory()+memory = AgentHistory()# Initialize memory with an initial message from the assistantinitial_message = BaseAgentOutputSchema(chat_message="Hello! How can I assist you today?")diff --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 0609652..baa9421 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 AgentMemory+from atomic_agents.lib.components.agent_history import AgentHistoryfrom atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgentInputSchema, BaseAgentOutputSchema# API Key setup@@ -22,7 +22,7 @@ if not API_KEY:console = Console()# Memory setup-memory = AgentMemory()+memory = AgentHistory()# Initialize memory with an initial message from the assistantinitial_message = BaseAgentOutputSchema(chat_message="Hello! How can I assist you today?")diff --git a/atomic-examples/quickstart/quickstart/2_basic_custom_chatbot.py b/atomic-examples/quickstart/quickstart/2_basic_custom_chatbot.pyindex 83002ce..a75c3bf 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 AgentMemory+from atomic_agents.lib.components.agent_history import AgentHistoryfrom atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgentInputSchema, BaseAgentOutputSchema# API Key setup@@ -22,7 +22,7 @@ if not API_KEY:console = Console()# Memory setup-memory = AgentMemory()+memory = AgentHistory()# Initialize memory with an initial message from the assistantinitial_message = BaseAgentOutputSchema(diff --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 68d8cf7..90f4d0a 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 AgentMemory+from atomic_agents.lib.components.agent_history import AgentHistoryfrom atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgentInputSchemafrom atomic_agents.lib.base.base_io_schema import BaseIOSchema@@ -25,7 +25,7 @@ if not API_KEY:console = Console()# Memory setup-memory = AgentMemory()+memory = AgentHistory()# Custom output schemadiff --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 7b6c4b4..09fed7b 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 AgentMemory+from atomic_agents.lib.components.agent_history import AgentHistoryfrom atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgentInputSchemafrom atomic_agents.lib.base.base_io_schema import BaseIOSchema@@ -26,7 +26,7 @@ if not API_KEY:console = Console()# Memory setup-memory = AgentMemory()+memory = AgentHistory()# Custom output schemadiff --git a/atomic-examples/quickstart/quickstart/4_basic_chatbot_different_providers.py b/atomic-examples/quickstart/quickstart/4_basic_chatbot_different_providers.pyindex 3e03308..12013a3 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 AgentMemory+from atomic_agents.lib.components.agent_history import AgentHistoryfrom atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgentInputSchema, BaseAgentOutputSchemafrom dotenv import load_dotenv@@ -13,7 +13,7 @@ load_dotenv()console = Console()# Memory setup-memory = AgentMemory()+memory = AgentHistory()# Initialize memory with an initial message from the assistantinitial_message = BaseAgentOutputSchema(chat_message="Hello! How can I assist you today?")diff --git a/atomic-examples/web-search-agent/web_search_agent/main.py b/atomic-examples/web-search-agent/web_search_agent/main.pyindex 46652a6..3234c71 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 AgentMemory+from atomic_agents.lib.components.agent_history import AgentHistoryfrom atomic_agents.lib.components.system_prompt_generator import SystemPromptContextProviderBasefrom web_search_agent.tools.searxng_search import (@@ -25,7 +25,7 @@ load_dotenv()console = Console()# Memory setup-memory = AgentMemory()+memory = AgentHistory()# Initialize the SearXNGSearchToolsearch_tool = SearXNGSearchTool(config=SearXNGSearchToolConfig(base_url=os.getenv("SEARXNG_BASE_URL"), max_results=5))diff --git a/docs/api/agents.md b/docs/api/agents.mdindex 17d8d99..427f86b 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_memory import AgentMemory+from atomic_agents.lib.components.agent_memory import AgentHistoryfrom atomic_agents.lib.components.system_prompt_generator import SystemPromptGenerator# Create agent with basic configuration@@ -111,7 +111,7 @@ agent = BaseAgent[BaseAgentInputSchema, BaseAgentOutputSchema](config=BaseAgentConfig(client=instructor.from_openai(OpenAI()),model="gpt-4-turbo-preview",- memory=AgentMemory(),+ memory=AgentHistory(),system_prompt_generator=SystemPromptGenerator()))@@ -132,7 +132,7 @@ The `BaseAgentConfig` class provides configuration options:class BaseAgentConfig:client: instructor.Instructor # Client for interacting with the language modelmodel: str = "gpt-4-turbo-preview" # Model to use- memory: Optional[AgentMemory] = None # Memory component+ memory: Optional[AgentHistory] = None # Memory componentsystem_prompt_generator: Optional[SystemPromptGenerator] = None # Prompt generatorinput_schema: Optional[Type[BaseModel]] = None # Custom input schemaoutput_schema: Optional[Type[BaseModel]] = None # Custom output schema@@ -207,7 +207,7 @@ async def chat():### Memory Management-The agent automatically manages conversation history through the `AgentMemory` component:+The agent automatically manages conversation history through the `AgentHistory` component:```python# Access memorydiff --git a/docs/api/components.md b/docs/api/components.mdindex b85e5ef..7d68180 100644--- a/docs/api/components.md+++ b/docs/api/components.md@@ -2,14 +2,14 @@## Agent Memory-The `AgentMemory` class manages conversation history and state for AI agents:+The `AgentHistory` class manages conversation history and state for AI agents:```python-from atomic_agents.lib.components.agent_memory import AgentMemory+from atomic_agents.lib.components.agent_memory import AgentHistoryfrom atomic_agents.lib.base.base_io_schema import BaseIOSchema# Initialize memory with optional max messages-memory = AgentMemory(max_messages=10)+memory = AgentHistory(max_messages=10)# Add messagesmemory.add_message(diff --git a/docs/api/index.md b/docs/api/index.mdindex 88cb6bb..0fa7572 100644--- a/docs/api/index.md+++ b/docs/api/index.md@@ -30,7 +30,7 @@ The agents module provides the base classes for creating AI agents:The components module contains essential building blocks:-- `AgentMemory`: Manages conversation history and state with support for:+- `AgentHistory`: Manages conversation history and state with support for:- Message history with role-based messages- Turn-based conversation tracking- Multimodal contentdiff --git a/docs/examples/mcp_agent.md b/docs/examples/mcp_agent.mdindex 617178e..c94ba51 100644--- a/docs/examples/mcp_agent.md+++ b/docs/examples/mcp_agent.md@@ -99,7 +99,7 @@ tool_schema_to_class_map = {2. **Query Processing**:- Uses an orchestrator agent to analyze queries- Extracts parameters and selects appropriate tools-- Maintains conversation context through AgentMemory+- Maintains conversation context through AgentHistory## MCP Transport Methodsdiff --git a/docs/guides/quickstart.md b/docs/guides/quickstart.mdindex b8c7ff2..d6cc8db 100644--- a/docs/guides/quickstart.md+++ b/docs/guides/quickstart.md@@ -24,14 +24,14 @@ import osimport instructorimport openaifrom rich.console import Console-from atomic_agents.lib.components.agent_memory import AgentMemory+from atomic_agents.lib.components.agent_memory import AgentHistoryfrom atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgentInputSchema, BaseAgentOutputSchema# Initialize console for pretty outputsconsole = Console()# Memory setup-memory = AgentMemory()+memory = AgentHistory()# Initialize memory with an initial message from the assistantinitial_message = BaseAgentOutputSchema(chat_message="Hello! How can I assist you today?")@@ -80,14 +80,14 @@ from rich.console import Consolefrom rich.panel import Panelfrom rich.text import Textfrom rich.live import Live-from atomic_agents.lib.components.agent_memory import AgentMemory+from atomic_agents.lib.components.agent_memory import AgentHistoryfrom atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgentInputSchema, BaseAgentOutputSchema# Initialize console for pretty outputsconsole = Console()# Memory setup-memory = AgentMemory()+memory = AgentHistory()# Initialize memory with an initial message from the assistantinitial_message = BaseAgentOutputSchema(chat_message="Hello! How can I assist you today?")@@ -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_memory import AgentMemory+from atomic_agents.lib.components.agent_memory import AgentHistoryfrom atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgentInputSchemafrom atomic_agents.lib.base.base_io_schema import BaseIOSchema@@ -160,7 +160,7 @@ from atomic_agents.lib.base.base_io_schema import BaseIOSchemaconsole = Console()# Memory setup-memory = AgentMemory()+memory = AgentHistory()# Custom output schemaclass CustomOutputSchema(BaseIOSchema):@@ -258,7 +258,7 @@ import osimport instructorfrom rich.console import Consolefrom rich.text import Text-from atomic_agents.lib.components.agent_memory import AgentMemory+from atomic_agents.lib.components.agent_memory import AgentHistoryfrom atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgentInputSchema, BaseAgentOutputSchemafrom dotenv import load_dotenv@@ -268,7 +268,7 @@ load_dotenv()console = Console()# Memory setup-memory = AgentMemory()+memory = AgentHistory()# Initialize memory with an initial message from the assistantinitial_message = BaseAgentOutputSchema(chat_message="Hello! How can I assist you today?")diff --git a/docs/index.md b/docs/index.mdindex e944374..a5fae3a 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_memory import AgentMemory+from atomic_agents.lib.components.agent_memory import AgentHistoryfrom atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgentInputSchema, BaseAgentOutputSchema@@ -70,7 +70,7 @@ from atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgen# or pass it to the client: openai.OpenAI(api_key="your-api-key")# Initialize agent with memory-memory = AgentMemory()+memory = AgentHistory()# Set up client with your preferred providerclient = instructor.from_openai(openai.OpenAI()) # Pass your API key here if not in environment