Concerns with prompt caching I am building an age...
# agents
b
Concerns with prompt caching I am building an agent workflow like using multiple agent hand-offs: https://github.com/livekit-examples/python-agents-examples/blob/main/flows/simple_flow.py. However, each time a new agent is created, it comes with its own instructions (= system prompt). These go at the very beginning of a message list. I also found in the code that the same thing happens when we call
generate_reply()
. When the system prompt is modified, the entire cache is invalidated - it is inefficient both latency-wise and cost-wise. 1. Is my understanding correct? 2. Is there a more efficient way to build a workflow, for example, by restricting the tools that could be called? For example, first call tool_1, then [tool_2 or tool_3], then ... so on. Here is a Langgraph example. https://langchain-ai.github.io/langgraph/tutorials/sql/sql-agent/#3-customizing-the-agent PS: I know we can integrate Langgraph into Livekit (like this). But, I prefer to do everything in one framework, rather than mix two frameworks.
🔖 1
t
How do you integrate langraph in to livekit? Just seeing that this is possible. Do you have any example to share