Feature Type
New functionality
Problem Statement
We need a way to show the progress of long-running jobs to the user.
When we are running tasks over FastAPI/MCP. We need to implement a polling mechanism to update the graph with current status messages without a heavy overhead to the main thread.
Proposed Solution
Langgraph can stream the tool status with the help of stream_writer
But this flow is suitable for tools that run within the current agent.
from langgraph.config import get_stream_writer
writer = get_stream_writer()
writer(f"Progress : {prog_percent}%")
MCP servers offer a way to provide a status update using context.
await ctx.info(f"Progress : {prog_percent}%")
But this implementation doesn't support langgraph tools using MultiServerMCPClient (Still checking)
Alternative Solutions
We can also think about using message queues, which can also handle the server overload.
User Benefits
No response
Implementation Ideas
No response
Contribution
Additional Context
No response