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.
Signature
def Agent(name: str, role: str, instructions: Optional[str], tools: Optional[List[Any]], memory: bool, knowledge: Optional[List[str]]) -> AgentParameters
ParamField
strAgent name
ParamField
strAgent role
ParamField
OptionalAgent instructions
ParamField
OptionalList of tools for the agent
ParamField
boolEnable memory for the agent
ParamField
OptionalKnowledge sources for the agent **kwargs: Additional agent parameters
Returns
ResponseField
AgentConfigured Agent instance
Exceptions
ValueError
If this is a remote session (use chat() instead)
Uses
ValueErrorAgent
Used By
ContextAgent.analyze_codebase_with_gitingestContextAgent.perform_ast_analysisContextAgent.extract_implementation_patternsContextAgent.analyze_test_patternsContextAgent.generate_comprehensive_prp
Source
View on GitHubpraisonaiagents/session.py at line 133