square-activity-46232
08/27/2025, 9:34 PMtall-airline-16756
08/27/2025, 9:35 PMtall-airline-16756
08/27/2025, 9:35 PMchat_ctx and work together to manage state changes. This usually happens by sharing the chat_ctx during setup or through handoffs. Plus, agents can respond to state and conversation updates using lifecycle methods and events like on_user_turn_completed or conversation_item_added.
That said, it’s not totally clear if two agents can listen independently and in real-time to changes in a shared, mutable chat_ctx. Usually, they coordinate through state events, session updates, and carefully controlled context sharing.
If you want me to explain anything further or have a particular scenario in mind, just give me a shout—I’m here to help!
Sources: Agents 0.x migration guide | LiveKit Docs | main.py | VoicePipelineAgent | LiveKit Agents | LLMStream | LiveKit Agents | livekit-agents/livekit/agents/llm/chat_context.pysquare-activity-46232
08/27/2025, 9:37 PMtall-airline-16756
08/27/2025, 9:38 PMchat_ctx changes and responding on their own. While agents can share and update the same chat_ctx, there isn’t a built-in way for them to automatically notice and react to each other’s changes in real-time.
To make this happen for your automated tests, you’d need to set up some custom logic to coordinate what the agents do—like using external state management or triggering responses programmatically when certain events or updates pop up in the chat_ctx.
If you’d like a hand figuring out how to set this up, just give me a shout—I’m here to help!
Sources: main.py | examples/voice_agents/llamaindex-rag/chat_engine.pysquare-activity-46232
08/27/2025, 9:40 PMtall-airline-16756
08/27/2025, 9:40 PMadd_message.
If you want a hand setting this up or have a particular use case you’re thinking about, just give me a shout!
Sources: ChatRole | LiveKit Agents | Role | LiveKit Agents | tests/test_agent_session.py | models/templates/google-gemma-2-2b-it.jinja