Agent
Defined in the Agent module.Rust AI Agent SDK The core Agent struct Agents are the primary execution unit in PraisonAI. They combine: - LLM provider for generating responses - Tools for performing actions - Memory for conversation history - Instructions for behavior
Fields
| Name | Type | Description |
|---|---|---|
id | String | Unique agent ID |
name | String | Agent name |
instructions | String | System instructions |
llm | Arc<dyn LlmProvider> | LLM provider |
tools | Arc<RwLock<ToolRegistry>> | Tool registry |
memory | Arc<RwLock<Memory>> | Memory |
config | AgentConfig | Configuration |
Methods
new
simple
| Name | Type |
|---|---|
instructions | impl Into<String> |
id
name
instructions
model
chat
| Name | Type |
|---|---|
prompt | &str |
start
| Name | Type |
|---|---|
prompt | &str |
run
| Name | Type |
|---|---|
task | &str |
add_tool
| Name | Type |
|---|---|
tool | impl Tool + 'static |

