Skip to main content

Agent

Method
This is a method of the Session class in the session module.
Create an agent with session context.

Signature

def Agent(name: str, role: str, instructions: Optional[str], tools: Optional[List[Any]], memory: bool, knowledge: Optional[List[str]]) -> Agent

Parameters

name
str
required
Agent name
role
str
default:"'Assistant'"
Agent role
instructions
Optional
Agent instructions
tools
Optional
List of tools for the agent
memory
bool
default:"True"
Enable memory for the agent
knowledge
Optional
Knowledge sources for the agent **kwargs: Additional agent parameters

Returns

Returns
Agent
Configured Agent instance

Exceptions

If this is a remote session (use chat() instead)