NASA-IMPACT / NASA-IMPACT/akd-core

Planner Occasional Issue with Workflow Generation

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

@muthukumaranR is already working on this.

Since Dec 4, 2025.

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

Description

Describe the bug

Sometimes chatting with Planner gives:

{
  "detail": "Chat operation failed: No workflow plan available. Continue the conversation first."
}

Might be coming from :

if not self.workflow_plan:
    raise ValueError("No workflow plan available. Continue the conversation first.")

because the planner reached a state where response.ready_to_generate = True,
even though the LLM did NOT return a workflow_plan

Steps to reproduce the behavior

Note: Its hard to reproduce this issue

  1. Go to http://akdbac-apise-ulverh4gaexc-980808868.us-east-1.elb.amazonaws.com/api/v1/docs
  2. Create a new chat
curl -X 'POST' \
  'http://akdbac-apise-ulverh4gaexc-980808868.us-east-1.elb.amazonaws.com/api/v1/chats/' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI2NmY5ZGRjOC01OTJjLTRmNzItYWIyYS03YmE5MDIzMTg2YjAiLCJhdWQiOlsiZmFzdGFwaS11c2VyczphdXRoIl0sImV4cCI6MTc2MDA1OTQ4OH0.t1Lj_79FL6rhY6zTTojiVgsLQ-VWinnPeg6mRNXWi8Y' \
  -H 'Content-Type: application/json' \
  -d '{
  "initial_request": "social impacts of covid 19 in nepal"
}'
  1. To continue back and forth with the planner, send a request with the chat_id and the response to recent planner message as user_message:
curl -X 'POST' \
  'http://akdbac-apise-ulverh4gaexc-980808868.us-east-1.elb.amazonaws.com/api/v1/chats/' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI2NmY5ZGRjOC01OTJjLTRmNzItYWIyYS03YmE5MDIzMTg2YjAiLCJhdWQiOlsiZmFzdGFwaS11c2VyczphdXRoIl0sImV4cCI6MTc2MDA1OTQ4OH0.t1Lj_79FL6rhY6zTTojiVgsLQ-VWinnPeg6mRNXWi8Y' \
  -H 'Content-Type: application/json' \
  -d '{
  "initial_request": "social impacts of covid 19 in nepal",
 "chat_id": "0477cd2b-3248-457b-8413-b7060add28d4",
"user_message": "mental health"

}'
Expected Behavior

Chat with planner should be smooth and should eventually generate a workflow.

Relevant log output
{
  "message": "I will create a workflow to explore the social impacts of COVID-19 in Nepal. To refine this, could you specify if you're looking for academic papers, reports, or specific types of social impacts (e.g., mental health, economic effects)?",
  "ready_to_generate": false,
  "conversation_history": [
    {
      "role": "user",
      "content": "social impacts of covid 19 in nepal"
    },
    {
      "role": "assistant",
      "content": "I will create a workflow to explore the social impacts of COVID-19 in Nepal. To refine this, could you specify if you're looking for academic papers, reports, or specific types of social impacts (e.g., mental health, economic effects)?"
    }
  ],
  "workflow_config": null,
  "chat_id": "788d9826-962b-488c-b24f-2bbf6c20bd93",
  "user_id": "66f9ddc8-592c-4f72-ab2a-7ba9023186b0"
}

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.