# create_handoff_back_messages

> **Function** in `langgraph_supervisor`

📖 [View in docs](https://reference.langchain.com/python/langgraph-supervisor/handoff/create_handoff_back_messages)

Create a pair of (AIMessage, ToolMessage) to add to the message history when returning control to the supervisor.

## Signature

```python
create_handoff_back_messages(
    agent_name: str,
    supervisor_name: str,
) -> tuple[AIMessage, ToolMessage]
```

---

[View source on GitHub](https://github.com/langchain-ai/langgraph-supervisor-py/blob/766a6732a3ef95b991f04a2c13cc8968eabf9a61/langgraph_supervisor/handoff.py#L132)