Skip to content

Conversation

@webup
Copy link
Owner

@webup webup commented Oct 23, 2025

Overview

This PR migrates the codebase to LangChain v1 ecosystem and introduces enhanced Human-in-the-Loop (HITL) functionality with improved context management.

Key Changes

🔄 LangChain v1 Migration

  • Migrated to LangChain v1 middleware pattern
  • Replaced modify_model_request with wrap_model_call/awrap_model_call
  • Updated provider registration to "openai-compatible"
  • Updated dependencies: langchain>=1.0.0, langchain-anthropic>=1.0.0

✨ Enhanced HITL Functionality

  • Added interrupt support in deep agent workflow
  • Introduced interrupt_on and subagent_interrupts parameters in make_graph
  • Added HITL context configuration
  • Structured prompts for tool rejections
  • Added HITL integration tests and README instructions

♻️ Context Management Refactor

  • Introduced BaseAgentContext as foundation
  • Updated SupervisorContext and DeepAgentContext to extend base
  • Added BaseMiddleware for logging and debugging
  • Removed deprecated middleware implementations

🔧 Infrastructure Updates

  • Updated sample-deep-agent to use correct create_deep_agent signature
  • Switched default model to DeepSeek-V3.2-Exp via SiliconFlow
  • Updated test fixtures and examples
  • Package version updates and dependency alignment

Breaking Changes

⚠️ This includes breaking changes due to LangChain v1 migration. See commit messages for migration notes.

webup added 2 commits October 23, 2025 23:41
- Refactor context schemas for agents, introducing `BaseAgentContext` and specialized contexts for data analysis and search capabilities.
- Update `SupervisorContext` and `DeepAgentContext` to extend from the new base context, improving configuration management.
- Implement `BaseMiddleware` for structured logging and debug capabilities, enhancing middleware components.
- Remove deprecated middleware and streamline imports to align with the latest LangChain v1 structure.
- Update tests to reflect new context and middleware structures, ensuring comprehensive coverage and functionality.

This commit significantly improves the organization and maintainability of the LangGraph agent system, enhancing both context management and middleware capabilities.
- Update README to include detailed instructions for unit and integration testing, emphasizing the new human-in-the-loop (HITL) testing capabilities.
- Implement comprehensive HITL integration tests to verify interrupt functionality with real LLM calls, ensuring robust decision-making processes.
- Refactor `make_graph` to accept `interrupt_on` and `subagent_interrupts` configurations, allowing for more granular control over interrupt behavior.
- Add a new context configuration for HITL, ensuring that interrupt settings are clearly defined and managed.
- Introduce a structured prompt for handling tool rejections, guiding the agent's response strategy after user feedback.

This commit significantly enhances the sample deep agent's HITL capabilities, improving its responsiveness and adaptability to user interactions.
@webup webup changed the title webup/kathmandu feat: Migrate to LangChain v1 with enhanced HITL and context management Oct 23, 2025
@webup webup changed the title feat: Migrate to LangChain v1 with enhanced HITL and context management feat: migrate to LangChain v1 with enhanced HITL and context management Oct 23, 2025
@webup webup changed the title feat: migrate to LangChain v1 with enhanced HITL and context management feat: migrate to LangChain v1 packages with enhanced HITL and context management Oct 23, 2025
@webup webup merged commit 5ae461b into main Oct 24, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants