NASA-IMPACT / NASA-IMPACT/akd-core

Streaming Tool Execution Progress (to user) for Long-Running Tool Jobs (Factual/Storm Agents)

Open
#45 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
4
Forks
0
PR merge metrics
No merged PRs in 30d

Description

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
  • I'm willing to submit a PR for this feature
  • I'm willing to test this feature
  • I'm willing to help document this feature
Additional Context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by comparing the proposed LangGraph stream_writer approach with MCP context status updates in the FastAPI/MCP execution flow, then determine a polling or queue design that avoids heavy main-thread overhead. Done means long-running tool jobs expose current status updates to users through the graph.

Written by the indexing model from the issue text.

Assessment

Tech stack
fastapi, python
Domain
backend-api-design, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.