agent_tools
Managed agent tools
Attributes
Classes
Functions
derive_persona
derive_persona(
*,
agent: Agent,
include_description: bool = True,
include_special_instructions: bool = True,
wrap: bool = True
) -> str
Applies consistent logic when deriving an Agent’s persona.
Including special instructions for this function is typically used for completion-style inferencing. For chat-style inferencing it is usually better to add special instructions as a system-level chat message at the end if the input context so it has the greatest effect.
Parameters:
-
agent
(Agent
) –ORM reference of the agent to derive the persona for.
-
include_description
(bool
, default:True
) –Include the agent’s (physical) description in the persona, this is useful for roleplaying however is just noise for utility / reasoning agents. Defaults to True.
-
include_special_instructions
(bool
, default:True
) –Include the agent’s special instructions in the persona, see description above. Defaults to True.
-
wrap
(bool
, default:True
) –Wrap the persona in a PEM-style header/footer for the LLM. Defaults to True.
Returns:
-
str
(str
) –The derived persona for the agent.