Skip to main content

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

Methods

new

Create a new agent builder

simple

Create an agent with minimal config Parameters:

id

Get the agent ID

name

Get the agent name

instructions

Get the instructions

model

Get the LLM model name

chat

Chat with the agent (main entry point) This is the primary method for interacting with an agent. It handles the full conversation loop including tool calls. Parameters:

start

Start a conversation (alias for chat) Parameters:

run

Run a task (alias for chat) Parameters:

add_tool

Add a tool to the agent Parameters:

tool_count

Get the number of tools

clear_memory

Clear conversation memory

history

Get conversation history

Source

View on GitHub

praisonai/src/agent/mod.rs at line 39

Rust Agent

Rust Overview

Rust Quickstart

Rust Installation

Rust Autonomy