OpenGenerativeUI icon indicating copy to clipboard operation
OpenGenerativeUI copied to clipboard

Upgrade to LangChain deep agents

Open jerelvelarde opened this issue 8 months ago • 0 comments

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.py using langchain.agents.create_agent with ChatOpenAI
  • Uses CopilotKitMiddleware for frontend state sync
  • Tools: todo management, data queries, form generation, templates, visualization skills

Proposed Changes

  • [ ] Upgrade langchain / langgraph packages to versions supporting deep agents
  • [ ] Refactor apps/agent/main.py to 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.

jerelvelarde avatar Mar 25 '26 07:03 jerelvelarde