Deep Agents - Event Streaming issue

DeepAgents Projection Streams (stream.messages / stream.subagents) Return No Items Despite Raw Events Streaming

I’m using DeepAgents 0.6.10 with event streaming(Event streaming - Docs by LangChain).

Raw events are streaming correctly, but the projection streams (stream.messages and stream.subagents) never yield any items.

Code -

async def run_stream(
    deepagent_config: dict,
    run_config: dict,
    stream_input: dict,
    group_name: str,
    trace_sink: list[dict[str, Any]] | None = None,
) -> str:
    assistant_parts = []

    deepagent_config["checkpointer"] = await get_async_redis_checkpointer()
    agent_manager = AgentManager()
    async_agent = agent_manager.build_agent(deepagent_config)

    stream = await async_agent.astream_events(
        stream_input,
        config=run_config,
        version="v3",
    )

    async def consume_coordinator():
        logger.debug("consume_coordinator called")
        try:
            async for message in stream.messages:
                text = await message.text
                print("[coordinator]", text)
                logger.debug("coordinator message: %s", message)
            logger.debug("coordinator stream finished")
        except Exception:
            logger.exception("Coordinator consumer failed")

    async def consume_subagents():
        logger.debug("consume_subagents called")
        try:
            async for subagent in stream.subagents:
                logger.debug("subagent started: %s path=%s", subagent.name, subagent.path)
                async for message in subagent.messages:
                    text = await message.text
                    print(f"[{subagent.name}]", text)
                    logger.debug("subagent message: %s", message)
            logger.debug("subagent stream finished")
        except Exception:
            logger.exception("Subagent consumer failed")

    await asyncio.gather(
        consume_coordinator(),
        consume_subagents(),
    )

    await publish(
        group_name,
        {
            "type": "status",
            "stage": "completed",
            "message": "Agent request finished streaming.",
        },
    )
    return "".join(assistant_parts)

What I Observe

The projection streams finish immediately:

DEBUG 2026-06-16 05:44:06,235 chat_uuid Consuming chat UUID. Cache key: chat:2:1:none, Cached value: None, Provided chat_uuid: 019eceba-4a38-7972-844a-5ce777606cac
DEBUG 2026-06-16 05:44:06,288 deep_agent_config Resolved tool names for agent 1: []
DEBUG 2026-06-16 05:44:06,292 deep_agent_config Resolved tool names for agent 12: []
DEBUG 2026-06-16 05:44:06,646 channel_chat_helper consume_coordinator called
DEBUG 2026-06-16 05:44:06,647 channel_chat_helper consume_subagents called
DEBUG 2026-06-16 05:44:08,430 channel_chat_helper coordinator stream finished
DEBUG 2026-06-16 05:44:08,430 channel_chat_helper subagent stream finished

No items are yielded by either stream.

Questions

  1. Why do stream.messages and stream.subagents finish with zero items even though raw method='messages' events are emitted?
  2. Is my usage of await message.text correct, or should message.text be consumed differently?
  3. Do projection streams require additional configuration, such as subgraph streaming or specific stream modes?
  4. Is this expected behavior when the agent has no tools?

Any guidance or working examples using DeepAgents 0.6.x projection streams would be appreciated.

Hi @mudra-mjpro, your asyncio.gather pattern matches the official Deep Agents event streaming docs. I reproduced this locally on deepagents 0.6.x with astream_events(..., version="v3") and projections work as documented.

Your usage is correct. await message.text is valid. For token-by-token output, use async for delta in message.text. You do not need subgraphs=True or stream_mode, those are for the legacy agent.astream(...) API, not v3 projections.

Why your streams are empty:

  1. stream.subagents empty: Expected if the coordinator never calls the built-in task tool. Subagent handles only appear when work is delegated via task (with a subagent_type).

  2. stream.messages empty: Not expected on a standard Deep Agent graph. Even with no subagent delegation, coordinator LLM turns should appear on stream.messages (I reproduced 1 coordinator message in that case).

If raw method="messages" events appear but projections yield nothing, likely causes:

  • How the agent is built: Please share how AgentManager.build_agent() constructs the agent. v3 projections are served by the LangGraph compiled graph returned from astream_events. If that object is a wrapper/proxy, or raw events are logged from a different stream/callback than the projection consumers, you can see raw events without projection items.
  • Version mismatch: Align packages: deepagents>=0.6, langchain>=1.3.6, langchain-core>=1.4.2, and a compatible langgraph (I tested with langgraph 1.2.4).
  • Checkpointer + thread_id: With a Redis checkpointer, run_config must include {"configurable": {"thread_id": "..."}}. Without it, the run errors (KeyError: 'thread_id' in my test), so this is less likely if your consumers finish cleanly without logged exceptions.

Quick diagnostic:

stream = await async_agent.astream_events(stream_input, config=run_config, version="v3")

await asyncio.gather(consume_coordinator(), consume_subagents())
final = await stream.output()
msgs = (final or {}).get("messages", [])
print(len(msgs), msgs[-1].content if msgs else None)
  • msgs has content but projections were empty → likely agent construction, version skew, or raw events coming from a different source than the projection stream. Please share pinned versions + AgentManager code.
  • msgs empty / no AI output → the run didn’t produce LLM output (model/config/input), not a projection bug.

Docs: Event streaming · Subagents streaming