Building AI agents, atomically
fix: fixing renaming from AgentHistory -> ChatHistory
jon foxd0597212201e
diff --git a/README.md b/README.mdindex 45e6680..454ac6f 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 AgentHistory+from atomic_agents.lib.components.agent_history import ChatHistory# 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,- history=AgentHistory(),+ history=ChatHistory(),))diff --git a/atomic-agents/atomic_agents/agents/base_agent.py b/atomic-agents/atomic_agents/agents/base_agent.pyindex 33b08d7..c24d399 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 AgentHistory+from atomic_agents.lib.components.agent_history import ChatHistoryfrom 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.")- history: Optional[AgentHistory] = Field(default=None, description="History component for storing chat history.")+ history: Optional[ChatHistory] = Field(default=None, description="History 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.- history (AgentHistory): History component for storing chat history.+ history (ChatHistory): History 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_history (AgentHistory): Initial state of the history.+ initial_history (ChatHistory): Initial state of the history.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.history = config.history or AgentHistory()+ self.history = config.history or ChatHistory()self.system_prompt_generator = config.system_prompt_generator or SystemPromptGenerator()self.system_role = config.system_roleself.initial_history = self.history.copy()diff --git a/atomic-agents/atomic_agents/lib/components/agent_history.py b/atomic-agents/atomic_agents/lib/components/agent_history.pyindex f494613..27583b6 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 AgentHistory:+class ChatHistory:"""Manages the chat history for an AI agent.@@ -32,7 +32,7 @@ class AgentHistory:def __init__(self, max_messages: Optional[int] = None):"""- Initializes the AgentHistory with an empty history and optional constraints.+ Initializes the ChatHistory 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 AgentHistory:history.append({"role": message.role, "content": json.dumps(content.model_dump(mode="json"))})return history- def copy(self) -> "AgentHistory":+ def copy(self) -> "ChatHistory":"""Creates a copy of the chat history.Returns:- AgentHistory: A copy of the chat history.+ ChatHistory: A copy of the chat history."""- new_history = AgentHistory(max_messages=self.max_messages)+ new_history = ChatHistory(max_messages=self.max_messages)new_history.load(self.dump())new_history.current_turn_id = self.current_turn_idreturn new_history@@ -182,10 +182,10 @@ class AgentHistory:def dump(self) -> str:"""- Serializes the entire AgentHistory instance to a JSON string.+ Serializes the entire ChatHistory instance to a JSON string.Returns:- str: A JSON string representation of the AgentHistory.+ str: A JSON string representation of the ChatHistory."""serialized_history = []for message in self.history:@@ -209,10 +209,10 @@ class AgentHistory:def load(self, serialized_data: str) -> None:"""- Deserializes a JSON string and loads it into the AgentHistory instance.+ Deserializes a JSON string and loads it into the ChatHistory instance.Args:- serialized_data (str): A JSON string representation of the AgentHistory.+ serialized_data (str): A JSON string representation of the ChatHistory.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 history with complex data- original_history = AgentHistory(max_messages=10)+ original_history = ChatHistory(max_messages=10)# Add a complex input messageoriginal_history.add_message(@@ -330,7 +330,7 @@ if __name__ == "__main__":print(dumped_data)# Create a new history and load the dumped data- loaded_history = AgentHistory()+ loaded_history = ChatHistory()loaded_history.load(dumped_data)# Print detailed information about the loaded historydiff --git a/atomic-agents/tests/agents/test_base_agent.py b/atomic-agents/tests/agents/test_base_agent.pyindex 0d30fa6..b704e55 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,- AgentHistory,+ ChatHistory,SystemPromptContextProviderBase,)from instructor.dsl.partial import PartialBase@@ -58,10 +58,10 @@ def mock_instructor_async():@pytest.fixturedef mock_history():- mock = Mock(spec=AgentHistory)+ mock = Mock(spec=ChatHistory)mock.get_history.return_value = []mock.add_message = Mock()- mock.copy = Mock(return_value=Mock(spec=AgentHistory))+ mock.copy = Mock(return_value=Mock(spec=ChatHistory))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 2a6acb3..1708cd5 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 AgentHistory, Message+from atomic_agents.lib.components.agent_history import ChatHistory, Messagefrom atomic_agents.lib.base.base_io_schema import BaseIOSchemaimport instructor@@ -52,7 +52,7 @@ class MockMultimodalSchema(BaseIOSchema):@pytest.fixturedef history():- return AgentHistory(max_messages=5)+ return ChatHistory(max_messages=5)def test_initialization(history):@@ -132,7 +132,7 @@ def test_dump_and_load(history):)dumped_data = history.dump()- new_history = AgentHistory()+ new_history = ChatHistory()new_history.load(dumped_data)assert new_history.max_messages == history.max_messages@@ -151,7 +151,7 @@ def test_load_invalid_data(history):def test_get_class_from_string():class_string = "tests.lib.components.test_agent_history.InputSchema"- cls = AgentHistory._get_class_from_string(class_string)+ cls = ChatHistory._get_class_from_string(class_string)assert cls.__name__ == InputSchema.__name__assert cls.__module__.endswith("test_agent_history")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)):- AgentHistory._get_class_from_string("invalid.module.Class")+ ChatHistory._get_class_from_string("invalid.module.Class")def test_message_model():@@ -196,7 +196,7 @@ def test_complex_scenario(history):# Dump and loaddumped_data = history.dump()- new_history = AgentHistory()+ new_history = ChatHistory()new_history.load(dumped_data)# Verify loaded data@@ -215,21 +215,21 @@ def test_complex_scenario(history):def test_history_with_no_max_messages():- unlimited_history = AgentHistory()+ unlimited_history = ChatHistory()for i in range(100):unlimited_history.add_message("user", InputSchema(test_field=f"Message {i}"))assert len(unlimited_history.history) == 100def test_history_with_zero_max_messages():- zero_max_history = AgentHistory(max_messages=0)+ zero_max_history = ChatHistory(max_messages=0)for i in range(10):zero_max_history.add_message("user", InputSchema(test_field=f"Message {i}"))assert len(zero_max_history.history) == 0def test_history_turn_consistency():- history = AgentHistory()+ history = ChatHistory()history.initialize_turn()turn_id = history.get_current_turn_id()history.add_message("user", InputSchema(test_field="Hello"))@@ -248,7 +248,7 @@ def test_agent_history_delete_turn_id(history):mock_input = InputSchema(test_field="Test input")mock_output = InputSchema(test_field="Test output")- history = AgentHistory()+ history = ChatHistory()initial_turn_id = "123-456"history.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 ec8cddb..f5598c5 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 AgentHistory+from atomic_agents.lib.components.agent_history import ChatHistoryfrom 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]")- history = AgentHistory()+ history = ChatHistory()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 66e2f88..3fcbffa 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 AgentHistory+from atomic_agents.lib.components.agent_history import ChatHistoryfrom 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]")- history = AgentHistory()+ history = ChatHistory()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 27ebddd..c84941a 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 AgentHistory+from atomic_agents.lib.components.agent_history import ChatHistoryfrom atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgentInputSchema, BaseAgentOutputSchema# API Key setup@@ -21,7 +21,7 @@ if not API_KEY:console = Console()# History setup-history = AgentHistory()+history = ChatHistory()# Initialize history 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 8caf281..7f10650 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 AgentHistory+from atomic_agents.lib.components.agent_history import ChatHistoryfrom atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgentInputSchema, BaseAgentOutputSchema# API Key setup@@ -21,7 +21,7 @@ if not API_KEY:console = Console()# History setup-history = AgentHistory()+history = ChatHistory()# Initialize history 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 00572ca..1c81eb4 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 AgentHistory+from atomic_agents.lib.components.agent_history import ChatHistoryfrom atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgentInputSchema, BaseAgentOutputSchema# API Key setup@@ -22,7 +22,7 @@ if not API_KEY:console = Console()# History setup-history = AgentHistory()+history = ChatHistory()# Initialize history 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 5f939d7..e7c17f2 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 AgentHistory+from atomic_agents.lib.components.agent_history import ChatHistoryfrom atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgentInputSchema, BaseAgentOutputSchema# API Key setup@@ -22,7 +22,7 @@ if not API_KEY:console = Console()# History setup-history = AgentHistory()+history = ChatHistory()# Initialize history 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 fcde61d..2971837 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 AgentHistory+from atomic_agents.lib.components.agent_history import ChatHistoryfrom 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()# History setup-history = AgentHistory()+history = ChatHistory()# 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 5eec19b..ca75862 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 AgentHistory+from atomic_agents.lib.components.agent_history import ChatHistoryfrom 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()# History setup-history = AgentHistory()+history = ChatHistory()# 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 9043da2..8bb3b36 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 AgentHistory+from atomic_agents.lib.components.agent_history import ChatHistoryfrom atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgentInputSchema, BaseAgentOutputSchemafrom dotenv import load_dotenv@@ -13,7 +13,7 @@ load_dotenv()console = Console()# History setup-history = AgentHistory()+history = ChatHistory()# Initialize history 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 7ad36a0..36d744b 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 AgentHistory+from atomic_agents.lib.components.agent_history import ChatHistoryfrom atomic_agents.lib.components.system_prompt_generator import SystemPromptContextProviderBasefrom web_search_agent.tools.searxng_search import (@@ -25,7 +25,7 @@ load_dotenv()console = Console()# History setup-history = AgentHistory()+history = ChatHistory()# 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 5d0386a..5f1d46b 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 AgentHistory+from atomic_agents.lib.components.agent_history import ChatHistoryfrom 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",- history=AgentHistory(),+ history=ChatHistory(),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- history: Optional[AgentHistory] = None # History component+ history: Optional[ChatHistory] = None # History 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():### History Management-The agent automatically manages conversation history through the `AgentHistory` component:+The agent automatically manages conversation history through the `ChatHistory` component:```python# Access historydiff --git a/docs/api/components.md b/docs/api/components.mdindex be5a175..09bb978 100644--- a/docs/api/components.md+++ b/docs/api/components.md@@ -2,14 +2,14 @@## Agent History-The `AgentHistory` class manages conversation history and state for AI agents:+The `ChatHistory` class manages conversation history and state for AI agents:```python-from atomic_agents.lib.components.agent_history import AgentHistory+from atomic_agents.lib.components.agent_history import ChatHistoryfrom atomic_agents.lib.base.base_io_schema import BaseIOSchema# Initialize history with optional max messages-history = AgentHistory(max_messages=10)+history = ChatHistory(max_messages=10)# Add messageshistory.add_message(diff --git a/docs/api/index.md b/docs/api/index.mdindex a55e663..08c3ca0 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:-- `AgentHistory`: Manages conversation history and state with support for:+- `ChatHistory`: 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 c94ba51..a06a4d5 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 AgentHistory+- Maintains conversation context through ChatHistory## MCP Transport Methodsdiff --git a/docs/guides/quickstart.md b/docs/guides/quickstart.mdindex 141ae69..a215d06 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_history import AgentHistory+from atomic_agents.lib.components.agent_history import ChatHistoryfrom atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgentInputSchema, BaseAgentOutputSchema# Initialize console for pretty outputsconsole = Console()# History setup-history = AgentHistory()+history = ChatHistory()# Initialize history 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_history import AgentHistory+from atomic_agents.lib.components.agent_history import ChatHistoryfrom atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgentInputSchema, BaseAgentOutputSchema# Initialize console for pretty outputsconsole = Console()# History setup-history = AgentHistory()+history = ChatHistory()# Initialize history 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_history import AgentHistory+from atomic_agents.lib.components.agent_history import ChatHistoryfrom 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()# History setup-history = AgentHistory()+history = ChatHistory()# 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_history import AgentHistory+from atomic_agents.lib.components.agent_history import ChatHistoryfrom atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgentInputSchema, BaseAgentOutputSchemafrom dotenv import load_dotenv@@ -268,7 +268,7 @@ load_dotenv()console = Console()# History setup-history = AgentHistory()+history = ChatHistory()# Initialize history 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 b726f4d..ab1a2a9 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 AgentHistory+from atomic_agents.lib.components.agent_history import ChatHistoryfrom 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 history-history = AgentHistory()+history = ChatHistory()# Set up client with your preferred providerclient = instructor.from_openai(openai.OpenAI()) # Pass your API key here if not in environment