Proposal: Async agent steering

Open
#47,200 0 comments 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
12/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Active
Domain
ai, backend

Research direction

The payload names no files, tests or entry points, so there is no obvious first file to open. Start by agreeing on the design: where inbound user messages are queued during an active run, and at which points in the agent loop they are consumed. Done would mean a written proposal the maintainers accept, with a smaller first step identified.

Written by the indexing model from the issue text.

Description

💪 enhancement
Self Checks
  • I have read the Contributing Guide and Language Policy.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • Please do not modify this template :) and fill in all the required fields.
1. Is this request related to a challenge you're experiencing? Tell me about your story.

Background

Today, users cannot send a new message while an Agent App is responding. They have to wait for the current run to finish, even if they only want to clarify an instruction or redirect the agent.

With asynchronous steering, users can submit a message while a run is active. The backend queues it immediately and delivers it at a defined point in the agent loop—for example, before the next model call, or instantly after queued. The user does not have to wait for the entire run to finish, and the agent does not have to interrupt a model call already in progress.

An event-driven agent loop

The design is analogous to how an operating system handles I/O: the LLM is like the CPU, while tool completions and user messages are events from the outside world. Instead of blocking the whole loop on a tool call, the runtime can launch the tool asynchronously and make its result available to the model when it is ready. User input follows the same pattern: a message arrives, enters the run’s inbox, and is picked up at the next model call that can accept it.

The key distinction is between accepting an input and acting on it. The backend can accept input at any time during an active run, while the agent consumes it at predictable points. This gives us a foundation for asynchronous tool calls and richer steering without requiring the UI to expose a queue or other runtime controls.

2. Additional context or comments

No response

3. Can you help us with this feature?
  • I am interested in contributing to this feature.
Dominant language
Python
Stars
162k
Forks
25.6k
Avg merge
15h 9m
Merged PRs (30d)
606

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

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.

More from langgenius/dify

All issues in langgenius/dify

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.