LangGraph Engineer Configuration
Setting Configuration in the UI
Enabling the LangGraph Engineer toggle in the main input area adds specific LangGraph prompts and allows LangGraph documentation access. This sets the following configuration:How Custom Framework Configuration Works
The configuration is passed to all agent nodes and used to conditionally include specialized prompts:shouldUseCustomFramework(config)
function checks if config.configurable?.customFramework === true
.
Custom Framework Files
WhencustomFramework
is true
, we inject a series of custom prompts and tools into the agent. The table below shows every place in the codebase that needs updating if you’re customizing it for a framework other than LangGraph.
Prompt Files
Component | File | Prompt Constant | Description |
---|---|---|---|
Planner | prompt.ts | EXTERNAL_FRAMEWORK_DOCUMENTATION_PROMPT | Adds framework documentation access instructions |
Planner | prompt.ts | EXTERNAL_FRAMEWORK_PLAN_PROMPT | Provides framework-specific planning requirements |
Programmer | prompt.ts | CUSTOM_FRAMEWORK_PROMPT | Comprehensive framework implementation patterns and best practices |
Reviewer | prompt.ts | CUSTOM_FRAMEWORK_PROMPT | Framework validation and testing requirements |
Agent & UI Configuration Files
Component | File | Description |
---|---|---|
Toggle Button | default-view.tsx | Contains the LangGraph Engineer toggle button - modify this to add your own button or change the existing one |
Framework Logic | should-use-custom-framework.ts | Logic function that determines when to enable custom framework features. Currently a boolean based on the UI toggle |
Documentation | constants.ts | MCP server configuration for framework documentation access |
Customizing for Your Own Framework
Follow these steps to adapt Open SWE for your own framework:Modify Prompt Constants
- Update prompt files from the table above to replace LangGraph-specific content:
- Replace
CUSTOM_FRAMEWORK_PROMPT
with your framework’s patterns - Update
EXTERNAL_FRAMEWORK_DOCUMENTATION_PROMPT
with your docs access instructions - Modify
EXTERNAL_FRAMEWORK_PLAN_PROMPT
with your planning requirements
- Replace
Update UI Configuration
-
Modify the toggle button in
default-view.tsx
:- Change button text from “LangGraph Engineer” to your framework name
- Update tooltip text and descriptions
- Optional: Create a new toggle button for your framework while keeping the LangGraph one
Configure Framework Logic
You can either:- Reuse the existing
customFramework: true
configuration and modify the prompts to match your framework instead of LangGraph (no additional code changes needed) - Create a separate config variable by adding a new field in your graph configuration (e.g.,
yourFramework: true
) and adding the detection logic similar toshould-use-custom-framework.ts
Add Documentation Access
- Configure MCP servers in
constants.ts
:
Build and Test
-
Rebuild the application:
- Test your customization by enabling the toggle and verifying framework-specific prompts are used