feat: cut over to the deepagents-based agent, remove old orchestration graphs - #18
Merged
Conversation
…n graphs Points every real entry point at orchestration/deep_agent.py (built in #14) and removes the LangGraph orchestration it replaces, closing the migration. - orchestration/chat_workflow.py: ChatManager.process_message calls the deep agent instead of super_graph.process_user_request. confidence/ reasoning_trace now honestly report None/[] -- deepagents doesn't expose a numeric confidence score or step trace the way the old super_graph state did, and reporting that plainly beats fabricating a plausible-looking number. - agents/autonomous_inbox.py: the LangGraph email-processing path (orchestration/autonomous_graph.py's classify/gather/plan/execute/ check loop) is replaced by directly invoking the email subagent -- deepagents' own agent loop already does gather -> act -> observe internally. - backend/routes_agent.py's /agent/process-email now schedules the real agentic pipeline instead of backend/worker.py's naive summarizer (which never classified, gathered context, or took any real action). worker.py is now dead and deleted. - backend/routes_governance.py's approve/reject endpoints resume the paused deep-agent thread via Command(resume=...) for actions raised through interrupt_on (identified by their session_id/thread_id) -- resuming is what actually executes or skips the tool call, replacing ApprovalQueue._execute_action re-implementing the write. Legacy actions with no session_id still use the old approve_action path. Added ApprovalQueue.mark_executed() for the new path's bookkeeping. - The email/meeting subagents get a record_episode tool wrapping memory/episodic_memory.py's start_episode/complete_episode and memory/vector_store.py's remember -- closing the gap where the old recall_memory_context node called the recall side of these classes but was never wired into the compiled graph, and nothing anywhere called the write-back methods. - orchestration/proactive_scheduler.py: morning briefing/EOD summary now ask the deep agent directly; burnout/workload monitoring calls WellnessAgent directly rather than through the deleted wellness_subgraph/task_subgraph wrappers (their workload/stress fields were rule-based, not something needing an LLM call). - print_graph.py renders the deep agent's own graph -- the hardcoded matplotlib node positions in the old version were specific to super_graph.py's exact node names and don't carry over. - Deleted once the new path was verified: orchestration/super_graph.py, autonomous_graph.py, meeting_subgraph.py, task_subgraph.py, wellness_subgraph.py, followup_reporting_subgraphs.py, and common_state.py (confirmed unused -- every subgraph rolled its own local state instead of extending it). Also removed the now-stale super_graph.png/.md visualization artifacts. - Added schedule>=1.2.0,<2.0.0 to requirements.txt -- found while touching proactive_scheduler.py that it was imported unconditionally but never actually declared as a dependency. Verified: pytest tests/ (84 passed, 2 skipped) both in this environment and in a fresh venv installing only requirements.txt + backend/requirements.txt (matching what CI does), and a clean backend.app import after every deletion. Closes #15 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Points every real entry point at the deepagents-based agent (
orchestration/deep_agent.py, built in #17) and removes the LangGraph orchestration it replaces.ChatManager.process_messagecalls the deep agent instead ofsuper_graph.process_user_request.confidence/reasoning_tracenow honestly reportNone/[]since deepagents doesn't expose those the way the old state did -- not fabricated.agents/autonomous_inbox.py's LangGraph loop is replaced by directly invoking the email subagent./agent/process-email: now schedules the real agentic pipeline instead ofbackend/worker.py's naive summarizer (deleted -- it never classified, gathered context, or took any real action).backend/routes_governance.py's approve/reject endpoints resume the paused deep-agent thread viaCommand(resume=...)for interrupt-raised actions (identified bysession_id) -- resuming is what actually executes/skips the tool call. Legacy actions with nosession_idstill use the old path. AddedApprovalQueue.mark_executed().record_episodetool wrapping the existing (previously dead -- recall-only, never wired, never written back)EpisodicMemory/AgentMemorywrite APIs.WellnessAgentdirectly (rule-based, no LLM call needed) rather than through the deleted subgraph wrappers.print_graph.py: renders the deep agent's own graph -- the old hardcoded matplotlib node positions were specific tosuper_graph.py's exact node names.super_graph.py,autonomous_graph.py,meeting_subgraph.py,task_subgraph.py,wellness_subgraph.py,followup_reporting_subgraphs.py,common_state.py(confirmed unused), stalesuper_graph.png/.md.schedule>=1.2.0,<2.0.0torequirements.txt-- found it was imported unconditionally inproactive_scheduler.pybut never actually declared.CLAUDE.mdupdated to reflect the completed migration.Test plan
pytest tests/-- 84 passed (80 + 4 new/updated), 2 skippedrequirements.txt+backend/requirements.txt(matching CI)python -c "import backend.app"-- clean boot after every deletiontests/test_governance_approval_cutover.py: approve/reject correctly resumes the agent thread for interrupt-raised actions vs. falling back to the legacy path for actions without asession_idtests/test_smart_chat.py/tests/test_deep_agent.pyfor the new stubbing boundary (create_opspilot_agentinstead ofprocess_user_request) and therecord_episodememory write-backDepends on #17. Closes #15.
🤖 Generated with Claude Code