Prompt With Handoff Instructions • AI Agent SDK

prompt_with_handoff_instructions: Add handoff instructions to an agent's prompt.

prompt_with_handoff_instructions

Function

</div>

This function is defined in the handoff module.

Add handoff instructions to an agent’s prompt.

Signature

python
def prompt_with_handoff_instructions(base_prompt: str, agent: 'Agent') -> str

Parameters

ParamField str

The original prompt/instructions

ParamField Agent

The agent that will use handoffs

Returns

ResponseField str

Updated prompt with handoff instructions

Uses

  • Handoff

Source

View on GitHub

praisonaiagents/agent/handoff.py at line 1915


Related Documentation