renamed agent2 to agent

This commit is contained in:
Dillon DuPont
2025-07-25 12:35:01 -04:00
parent b56a49f2ed
commit 4c3adb31db
6 changed files with 11 additions and 11 deletions

View File

@@ -12,7 +12,7 @@ An agent can be thought of as a loop - it generates actions, executes them, and
To run an agent loop simply do:
```python
from agent2 import ComputerAgent
from agent import ComputerAgent
from computer import Computer
computer = Computer() # Connect to a c/ua container

View File

@@ -10,7 +10,7 @@ Optimize agent costs with budget management and image retention callbacks.
## Budget Manager Callbacks Example
```python
from agent2.callbacks import BudgetManagerCallback
from agent.callbacks import BudgetManagerCallback
agent = ComputerAgent(
model="anthropic/claude-3-5-sonnet-20241022",
@@ -47,7 +47,7 @@ agent = ComputerAgent(
## Image Retention Callbacks Example
```python
from agent2.callbacks import ImageRetentionCallback
from agent.callbacks import ImageRetentionCallback
agent = ComputerAgent(
model="anthropic/claude-3-5-sonnet-20241022",

View File

@@ -10,7 +10,7 @@ Built-in logging callback and custom logger creation for agent monitoring.
## Callbacks Example
```python
from agent2.callbacks import LoggingCallback
from agent.callbacks import LoggingCallback
import logging
agent = ComputerAgent(
@@ -40,7 +40,7 @@ agent = ComputerAgent(
Create custom loggers by extending AsyncCallbackHandler:
```python
from agent2.callbacks.base import AsyncCallbackHandler
from agent.callbacks.base import AsyncCallbackHandler
import logging
class CustomLogger(AsyncCallbackHandler):

View File

@@ -10,7 +10,7 @@ The TrajectorySaverCallback records complete agent conversations including messa
## Callbacks Example
```python
from agent2.callbacks import TrajectorySaverCallback
from agent.callbacks import TrajectorySaverCallback
agent = ComputerAgent(
model="anthropic/claude-3-5-sonnet-20241022",

View File

@@ -20,7 +20,7 @@ def read_file(location: str) -> str:
You can then register this as a tool for your agent:
```python
from agent2 import ComputerAgent
from agent import ComputerAgent
from computer import Computer
computer = Computer(...)

View File

@@ -12,7 +12,7 @@ The Agent library provides the ComputerAgent class and tools for building AI age
### Basic Usage
```python
from agent2 import ComputerAgent
from agent import ComputerAgent
from computer import Computer
computer = Computer() # Connect to a c/ua container
@@ -66,9 +66,9 @@ The `ComputerAgent` constructor provides a wide range of options for customizing
**Example with advanced options:**
```python
from agent2 import ComputerAgent
from agent import ComputerAgent
from computer import Computer
from agent2.callbacks import ImageRetentionCallback
from agent.callbacks import ImageRetentionCallback
agent = ComputerAgent(
model="anthropic/claude-3-5-sonnet-20241022",
@@ -113,7 +113,7 @@ See [Agent Loops](../../agent-sdk/agent-loops) for supported models and details.
You can add preprocessing and postprocessing hooks using callbacks, or write your own by subclassing `AsyncCallbackHandler`:
```python
from agent2.callbacks import ImageRetentionCallback, PIIAnonymizationCallback
from agent.callbacks import ImageRetentionCallback, PIIAnonymizationCallback
agent = ComputerAgent(
model="anthropic/claude-3-5-sonnet-20241022",