OpenGenerativeUI
OpenGenerativeUI copied to clipboard
Upgrade to LangChain deep agents
Summary
Upgrade the LangGraph agent backend from the current create_agent pattern to LangChain deep agents, which provide enhanced reasoning, multi-step planning, and tool-use capabilities.
Current State
- Agent is defined in
apps/agent/main.pyusinglangchain.agents.create_agentwithChatOpenAI - Uses
CopilotKitMiddlewarefor frontend state sync - Tools: todo management, data queries, form generation, templates, visualization skills
Proposed Changes
- [ ] Upgrade
langchain/langgraphpackages to versions supporting deep agents - [ ] Refactor
apps/agent/main.pyto use the deep agent API - [ ] Verify CopilotKit middleware compatibility with the new agent architecture
- [ ] Update agent state schema if needed for deep agent state management
- [ ] Test bidirectional state sync (todos, templates, generative UI) still works correctly
- [ ] Update environment/dependency files (
pyproject.toml, lock files)
Motivation
Deep agents offer improved reasoning and multi-step planning which would make the demo more compelling — especially for complex todo organization, multi-tool workflows, and richer generative UI responses.