mirror of https://github.com/kortix-ai/suna.git
wip
This commit is contained in:
parent
1eb750eacd
commit
21e06f3162
86
README.md
86
README.md
|
@ -1,37 +1,79 @@
|
|||
# agentpress
|
||||
|
||||
## WordPress for AI Agents
|
||||
|
||||
()
|
||||
|
||||
### Overview
|
||||
|
||||
()
|
||||
AgentPress simplifies the process of creating AI agents by providing a robust thread management system and a flexible tool integration mechanism. With AgentPress, you can easily create, configure, and run AI agents that can engage in conversations, perform tasks, and interact with various tools.
|
||||
|
||||
### Key Features
|
||||
|
||||
()
|
||||
- **Thread Management System**: Manage conversations and task executions through a sophisticated thread system.
|
||||
- **Flexible Tool Integration**: Easily integrate and use custom tools within your AI agents.
|
||||
- **Configurable Agent Behavior**: Fine-tune your agent's behavior with customizable settings and callbacks.
|
||||
- **Autonomous Iterations**: Allow your agent to run multiple iterations autonomously.
|
||||
- **State Management**: Control your agent's behavior at different stages of execution.
|
||||
|
||||
### Getting Started
|
||||
|
||||
(Add instructions for installation, setup, and basic usage here)
|
||||
To get started with AgentPress, all you need to do is write your agent similar to the example in `agent.py`. Here's a basic outline:
|
||||
|
||||
1. Import necessary modules:
|
||||
```python
|
||||
from agentpress.db import Database
|
||||
from agentpress.thread_manager import ThreadManager
|
||||
from tools.files_tool import FilesTool
|
||||
```
|
||||
|
||||
2. Create a ThreadManager instance:
|
||||
```python
|
||||
db = Database()
|
||||
manager = ThreadManager(db)
|
||||
```
|
||||
|
||||
3. Set up your agent's configuration:
|
||||
```python
|
||||
settings = {
|
||||
"thread_id": thread_id,
|
||||
"system_message": system_message,
|
||||
"model_name": "gpt-4",
|
||||
"temperature": 0.7,
|
||||
"max_tokens": 150,
|
||||
"autonomous_iterations_amount": 3,
|
||||
"continue_instructions": "Continue the conversation...",
|
||||
"tools": list(tool_schemas.keys()),
|
||||
"tool_choice": "auto"
|
||||
}
|
||||
```
|
||||
|
||||
4. Define callback functions (optional):
|
||||
```python
|
||||
def initializer():
|
||||
# Code to run at the start of the thread
|
||||
|
||||
def pre_iteration():
|
||||
# Code to run before each iteration
|
||||
|
||||
def after_iteration():
|
||||
# Code to run after each iteration
|
||||
|
||||
def finalizer():
|
||||
# Code to run at the end of the thread
|
||||
```
|
||||
|
||||
5. Run your agent:
|
||||
```python
|
||||
response = await manager.run_thread(settings)
|
||||
```
|
||||
|
||||
### Documentation
|
||||
|
||||
(Provide links or information about where to find detailed documentation)
|
||||
The core of AgentPress is the `ThreadManager` class in `thread_manager.py`. It provides a comprehensive thread management system where you can:
|
||||
|
||||
### Contributing
|
||||
- Create and manage threads
|
||||
- Add messages to threads
|
||||
- Run threads with specific settings
|
||||
- Configure autonomous iterations
|
||||
- Integrate and use tools
|
||||
|
||||
We welcome contributions from the community! Please see our [Contributing Guidelines](CONTRIBUTING.md) for more information on how to get involved.
|
||||
Tools in AgentPress are based on the `Tool` class defined in `tool.py`. You can create custom tools by inheriting from this class and implementing the required methods. An example is the `FilesTool` in `files_tool.py`.
|
||||
|
||||
### License
|
||||
For more detailed documentation, please refer to the comments in the source code files.
|
||||
|
||||
(Specify the license under which this project is released)
|
||||
|
||||
### Support
|
||||
|
||||
(Provide information on how users can get support or contact the maintainers)
|
||||
|
||||
---
|
||||
|
||||
Built with ❤️ by [Kortix AI Corp]
|
||||
Built with ❤️ by [Kortix AI Corp](https://www.kortix.ai)
|
||||
|
|
Loading…
Reference in New Issue