Description
Hi PydanticAI Team,
I’ve been working on a multi-agent system and found the current documentation on Messages and Chat History a bit challenging to navigate, especially regarding sharing history between agents in a graph-based setup.
Issue:
I initially attempted to share the messages history directly between agents but discovered that PydanticAI doesn’t support this approach. Instead, I learned that the recommended method is to serialize the message history into a string and inject it into the system prompt of the subsequent agent.
Request:
Could the documentation be enhanced to include a detailed explanation of this process? A step-by-step example demonstrating how to serialize the message history and incorporate it into the system prompt for the next agent for example in Graph would be incredibly helpful.
This addition would greatly assist users in implementing multi-agent workflows in Graph more effectively.
Thank you for your continuous efforts in improving PydanticAI.