[Agent] Planning Agent
A planning agent has been implemented. The planning agent has read-only tools except for one file that it can write in: a Plan.md at the root of its workspace.
Missing features
- Switch from "Plan" to "Code" mode within a conversation. (probably CLI-only)
- The user should be able to save their model preferences for "Plan" and "Code" mode. For example:
- When in "Plan" mode, a developer may want to use GPT-5 for it's reasoning abilities
- When in "Code" mode, a developer may prefer Claude Sonnet 4 for it's coding ability
- Two planning modes
- CLI-planning = light planning because the plan must be reviewable in the CLI
- Deep planning. The plan can be precise and contain all main API signatures as well as the testing/feature validation strategy. The initial PLAN.md could be filled in with an empty template with sections (Current State / Implementation / Testing / …)
If you find this feature request or enhancement useful, make sure to add a 👍 to the issue
@xingyaoww there are two use cases here:
- "Ask" mode: A mode where you can ask OpenHands questions about a code base and have it provide answers without modifying code
- "Plan" mode: A mode where OpenHands can generate a plan before executing. And then while executing, it will check off tasks.
Let's create a ticket for "Ask" mode, and re-use this ticket for "Plan" mode.
Feedback from a customer today:
- When in "Plan" mode, I'd like to associate Plan w/ a specific model (say GPT-5 due to better reasoning)
- When in "Code" mode, I'd like to associate with a different model (say Claude Sonnet 4 for better coding abilities)
@xingyaoww - I am very interested in helping to get this feature to work either by helping to code or test. Is there any guidance on how to help with this particular feature and where the code is living for what has been done already? Sorry for the noob question for this project, but it is not very clear where we are with this feature and what is left to be done.
Feedback from an OpenHands User on how they use Planning mode:
I don’t start generating code right away — first I work on understanding the task details, then on writing the description/specification of the task, and only once everything is ready I trigger code generation with simple prompts that reference the current task description. What exactly Planning mode in [other AI tool] helps with is showing me what I missed in the task description/spec, which details are worth adding to make code generation more effective. That’s important because each code generation run can take quite a long time (often over 10 minutes), while reviewing and adjusting a plan is much faster.
@jpelletier1 should this move to agent-sdk now? Or is this the UI side of things?
@mamoodi SDK already implements this - we need to implement this in OpenHands App now. So it should probably stays in this repo
Update: We are working on a Planning mode feature. This is a dedicated sub-agent that only has write access to one file - a PLAN.MD - in the workspace. At a high level:
- Users can switch between "Plan" and "Build" modes within the input area
- When in Plan mode, a PLAN.MD is generated and stored in the root of the workspace
- Additional FAQs: https://www.notion.so/Planning-Agent-2a9ed25a91688098801debaac50d7b3f?source=copy_link
Planning agent design (see below)
only has write access to one file - a PLAN.MD - in the workspace
I wonder, is this possible under the current arch, maybe because it has only read-only tools in agent-sdk?
I wonder, is this possible under the current arch, maybe because it has only read-only tools in agent-sdk?
Yep, actually we (@simonrosenberg to be exact :D) already implement it: https://github.com/OpenHands/software-agent-sdk/blob/main/examples/01_standalone_sdk/24_planning_agent_workflow.py