Agent • AI Agent SDK

Agent: Create an agent with session context.

Agent

Method

</div>

This is a method of the Session class in the session module.

Create an agent with session context.

Diagram

Input Data

Agent: Agent

Output Result

Signature

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

Parameters

ParamField str

Agent name

ParamField str

Agent role

ParamField Optional

Agent instructions

ParamField Optional

List of tools for the agent

ParamField bool

Enable memory for the agent

ParamField Optional

Knowledge sources for the agent **kwargs: Additional agent parameters

Returns

ResponseField Agent

Configured Agent instance

Exceptions

ValueError

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

Uses

  • ValueError
  • Agent

Used By

Source

View on GitHub

praisonaiagents/session.py at line 133


Related Documentation