Skip to content

Building AI agents, atomically

fix: fixing renaming from AgentHistory -> ChatHistory

jon foxd0597212201e
diff --git a/README.md b/README.md
index 45e6680..454ac6f 100644
--- a/README.md
+++ b/README.md
@@ -140,7 +140,7 @@ import instructor
from atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgentInputSchema
from atomic_agents.lib.base.base_io_schema import BaseIOSchema
from 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 schema
class 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.py
index 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 instructor
from pydantic import BaseModel, Field
from 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 ChatHistory
from 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.client
self.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_role
self.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.py
index 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_id
return 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 message
original_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 history
diff --git a/atomic-agents/tests/agents/test_base_agent.py b/atomic-agents/tests/agents/test_base_agent.py
index 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.fixture
def 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 mock
diff --git a/atomic-agents/tests/lib/components/test_agent_history.py b/atomic-agents/tests/lib/components/test_agent_history.py
index 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 pytest
import json
from typing import List, Dict
from pydantic import Field
-from atomic_agents.lib.components.agent_history import AgentHistory, Message
+from atomic_agents.lib.components.agent_history import ChatHistory, Message
from atomic_agents.lib.base.base_io_schema import BaseIOSchema
import instructor
@@ -52,7 +52,7 @@ class MockMultimodalSchema(BaseIOSchema):
@pytest.fixture
def 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 load
dumped_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) == 100
def 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) == 0
def 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_id
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.py
index 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 instructor
from pydantic import Field
from atomic_agents.agents.base_agent import BaseIOSchema, BaseAgent, BaseAgentConfig
from 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
from typing import Union, Type, Dict
from dataclasses import dataclass
import re
@@ -140,7 +140,7 @@ def main():
console.print(table)
# Create and initialize orchestrator agent
console.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.py
index 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 AsyncExitStack
from pydantic import Field
from atomic_agents.agents.base_agent import BaseIOSchema, BaseAgent, BaseAgentConfig
from 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
from typing import Union, Type, Dict, Optional
from dataclasses import dataclass
from mcp import ClientSession, StdioServerParameters
@@ -133,7 +133,7 @@ def main():
console.print(table)
# Create and initialize orchestrator agent
console.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.py
index 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 openai
from rich.console import Console
from rich.panel import Panel
from rich.text import Text
-from atomic_agents.lib.components.agent_history import AgentHistory
+from atomic_agents.lib.components.agent_history import ChatHistory
from 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 assistant
initial_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.py
index 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 openai
from rich.console import Console
from rich.panel import Panel
from rich.text import Text
-from atomic_agents.lib.components.agent_history import AgentHistory
+from atomic_agents.lib.components.agent_history import ChatHistory
from 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 assistant
initial_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.py
index 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 Console
from rich.panel import Panel
from rich.text import Text
from rich.live import Live
-from atomic_agents.lib.components.agent_history import AgentHistory
+from atomic_agents.lib.components.agent_history import ChatHistory
from 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 assistant
initial_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.py
index 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 Console
from rich.panel import Panel
from rich.text import Text
from 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
from 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 assistant
initial_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.py
index 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 Text
from typing import List
from pydantic import Field
from 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
from atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgentInputSchema
from 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 schema
diff --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.py
index 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 Live
from typing import List
from pydantic import Field
from 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
from atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgentInputSchema
from 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 schema
diff --git a/atomic-examples/quickstart/quickstart/4_basic_chatbot_different_providers.py b/atomic-examples/quickstart/quickstart/4_basic_chatbot_different_providers.py
index 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 instructor
from rich.console import Console
from rich.panel import Panel
from rich.text import Text
-from atomic_agents.lib.components.agent_history import AgentHistory
+from atomic_agents.lib.components.agent_history import ChatHistory
from atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgentInputSchema, BaseAgentOutputSchema
from 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 assistant
initial_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.py
index 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 Markdown
from pydantic import Field
from atomic_agents.agents.base_agent import BaseIOSchema
-from atomic_agents.lib.components.agent_history import AgentHistory
+from atomic_agents.lib.components.agent_history import ChatHistory
from atomic_agents.lib.components.system_prompt_generator import SystemPromptContextProviderBase
from web_search_agent.tools.searxng_search import (
@@ -25,7 +25,7 @@ load_dotenv()
console = Console()
# History setup
-history = AgentHistory()
+history = ChatHistory()
# Initialize the SearXNGSearchTool
search_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.md
index 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
```python
from 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 ChatHistory
from 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 model
model: str = "gpt-4-turbo-preview" # Model to use
- history: Optional[AgentHistory] = None # History component
+ history: Optional[ChatHistory] = None # History component
system_prompt_generator: Optional[SystemPromptGenerator] = None # Prompt generator
input_schema: Optional[Type[BaseModel]] = None # Custom input schema
output_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 history
diff --git a/docs/api/components.md b/docs/api/components.md
index 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 ChatHistory
from 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 messages
history.add_message(
diff --git a/docs/api/index.md b/docs/api/index.md
index 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 content
diff --git a/docs/examples/mcp_agent.md b/docs/examples/mcp_agent.md
index 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 Methods
diff --git a/docs/guides/quickstart.md b/docs/guides/quickstart.md
index 141ae69..a215d06 100644
--- a/docs/guides/quickstart.md
+++ b/docs/guides/quickstart.md
@@ -24,14 +24,14 @@ import os
import instructor
import openai
from rich.console import Console
-from atomic_agents.lib.components.agent_history import AgentHistory
+from atomic_agents.lib.components.agent_history import ChatHistory
from atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgentInputSchema, BaseAgentOutputSchema
# Initialize console for pretty outputs
console = Console()
# History setup
-history = AgentHistory()
+history = ChatHistory()
# Initialize history with an initial message from the assistant
initial_message = BaseAgentOutputSchema(chat_message="Hello! How can I assist you today?")
@@ -80,14 +80,14 @@ from rich.console import Console
from rich.panel import Panel
from rich.text import Text
from rich.live import Live
-from atomic_agents.lib.components.agent_history import AgentHistory
+from atomic_agents.lib.components.agent_history import ChatHistory
from atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgentInputSchema, BaseAgentOutputSchema
# Initialize console for pretty outputs
console = Console()
# History setup
-history = AgentHistory()
+history = ChatHistory()
# Initialize history with an initial message from the assistant
initial_message = BaseAgentOutputSchema(chat_message="Hello! How can I assist you today?")
@@ -152,7 +152,7 @@ from rich.console import Console
from typing import List
from pydantic import Field
from 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
from atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgentInputSchema
from atomic_agents.lib.base.base_io_schema import BaseIOSchema
@@ -160,7 +160,7 @@ from atomic_agents.lib.base.base_io_schema import BaseIOSchema
console = Console()
# History setup
-history = AgentHistory()
+history = ChatHistory()
# Custom output schema
class CustomOutputSchema(BaseIOSchema):
@@ -258,7 +258,7 @@ import os
import instructor
from rich.console import Console
from rich.text import Text
-from atomic_agents.lib.components.agent_history import AgentHistory
+from atomic_agents.lib.components.agent_history import ChatHistory
from atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseAgentInputSchema, BaseAgentOutputSchema
from 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 assistant
initial_message = BaseAgentOutputSchema(chat_message="Hello! How can I assist you today?")
diff --git a/docs/index.md b/docs/index.md
index 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:
```python
import instructor
import openai
-from atomic_agents.lib.components.agent_history import AgentHistory
+from atomic_agents.lib.components.agent_history import ChatHistory
from 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 provider
client = instructor.from_openai(openai.OpenAI()) # Pass your API key here if not in environment