Skip to content

Commit 65a350f

Browse files
committed
README
1 parent 9935daa commit 65a350f

File tree

2 files changed

+45
-38
lines changed

2 files changed

+45
-38
lines changed

README.md

Lines changed: 45 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2,47 +2,16 @@
22

33
AgentPress is a collection of _simple, but powerful_ utilities that serve as building blocks for creating AI agents. *Plug, play, and customize.*
44

5-
## How It Works
6-
7-
Each AI agent iteration follows a clear, modular flow:
8-
9-
1. **Message & LLM Handling**
10-
- Messages are managed in threads via `ThreadManager`
11-
- LLM API calls are made through a unified interface (`llm.py`)
12-
- Supports streaming responses for real-time interaction
13-
14-
2. **Response Processing**
15-
- LLM returns both content and tool calls
16-
- Content is streamed in real-time
17-
- Tool calls are parsed using either:
18-
- Standard OpenAPI function calling
19-
- XML-based tool definitions
20-
- Custom parsers (extend `ToolParserBase`)
21-
22-
3. **Tool Execution**
23-
- Tools are executed either:
24-
- In real-time during streaming (`execute_tools_on_stream`)
25-
- After complete response
26-
- In parallel or sequential order
27-
- Supports both standard and XML tool formats
28-
- Extensible through `ToolExecutorBase`
29-
30-
4. **Results Management**
31-
- Results from both content and tool executions are handled
32-
- Supports different result formats (standard/XML)
33-
- Customizable through `ResultsAdderBase`
5+
![AgentPress Flow](images/cover.png)
346

35-
This modular architecture allows you to:
36-
- Use standard OpenAPI function calling
37-
- Switch to XML-based tool definitions
38-
- Create custom processors by extending base classes
39-
- Mix and match different approaches
7+
See [How It Works](#how-it-works) for an explanation of this flow.
408

41-
- **Threads**: Simple message thread handling utilities with streaming support
42-
- **Tools**: Flexible tool definition with both OpenAPI and XML formats
9+
## Core Components
10+
- **Threads**: Manage Messages[] as threads.
11+
- **Tools**: Register code as callable tools with definitions in both OpenAPI and XML
12+
- **Response Processing**: Support for both native-LLM OpenAPI and XML-based tool calling
4313
- **State Management**: Thread-safe JSON key-value state management
44-
- **LLM Integration**: Provider-agnostic LLM calls via LiteLLM
45-
- **Response Processing**: Support for both standard and XML-based tool calling
14+
- **LLM**: +100 LLMs using the OpenAI I/O Format powered by LiteLLM
4615

4716
## Installation & Setup
4817

@@ -66,6 +35,8 @@ Check out [File Overview](#file-overview) for explanations of the generated file
6635
- Creates a `workspace` directory for the agent to work in
6736

6837

38+
39+
6940
## Quick Start
7041

7142
1. Set up your environment variables in a `.env` file:
@@ -175,6 +146,42 @@ asyncio.run(main())
175146
streamlit run agentpress/thread_viewer_ui.py
176147
```
177148

149+
## How It Works
150+
151+
Each AI agent iteration follows a clear, modular flow:
152+
153+
1. **Message & LLM Handling**
154+
- Messages are managed in threads via `ThreadManager`
155+
- LLM API calls are made through a unified interface (`llm.py`)
156+
- Supports streaming responses for real-time interaction
157+
158+
2. **Response Processing**
159+
- LLM returns both content and tool calls
160+
- Content is streamed in real-time
161+
- Tool calls are parsed using either:
162+
- Standard OpenAPI function calling
163+
- XML-based tool definitions
164+
- Custom parsers (extend `ToolParserBase`)
165+
166+
3. **Tool Execution**
167+
- Tools are executed either:
168+
- In real-time during streaming (`execute_tools_on_stream`)
169+
- After complete response
170+
- In parallel or sequential order
171+
- Supports both standard and XML tool formats
172+
- Extensible through `ToolExecutorBase`
173+
174+
4. **Results Management**
175+
- Results from both content and tool executions are handled
176+
- Supports different result formats (standard/XML)
177+
- Customizable through `ResultsAdderBase`
178+
179+
This modular architecture allows you to:
180+
- Use standard OpenAPI function calling
181+
- Switch to XML-based tool definitions
182+
- Create custom processors by extending base classes
183+
- Mix and match different approaches
184+
178185
## File Overview
179186

180187
### Core Components

images/cover.png

49.7 KB
Loading

0 commit comments

Comments
 (0)