Skip to content

Conversation

@dqbd
Copy link
Contributor

@dqbd dqbd commented Oct 30, 2025

Supersedes #32

christian-bromann and others added 30 commits September 22, 2025 21:41
BREAKING CHANGE: Major refactor from custom LangGraph implementation to new langchain createAgent API

**Architecture Migration:**
- Replace createReactAgent with createAgent API from langchain package
- Migrate from custom state management to middleware-based architecture
- Remove custom DeepAgentState and model configuration in favor of built-in patterns

**Package Updates:**
- Upgrade to @langchain/anthropic@alpha, @langchain/langgraph@next
- Add langchain package as main dependency with createAgent support
- Update @langchain/core to local development version

**Code Reorganization:**
- Move tools from src/tools.ts to modular middleware pattern (src/middleware/)
- Simplify type definitions in src/types.ts with Zod schema validation
- Refactor src/subAgent.ts to use createAgent with middleware integration
- Update src/graph.ts and src/index.ts for new API patterns

**Removed Files:**
- src/state.ts: Custom state management no longer needed
- src/model.ts: Default model configuration handled by createAgent
- src/interrupt.ts: Interrupt handling integrated into middleware

**New Middleware System:**
- src/middleware/fs.ts: File system operations middleware
- src/middleware/todo.ts: Todo management middleware
- src/middleware/index.ts: Middleware exports and configuration

**Configuration:**
- Fix tsconfig.json extends path for @tsconfig/recommended
- Update examples/research/research-agent.ts for new API
- Upgrade TypeScript ESLint and other dev dependencies

This migration provides a more maintainable architecture with better separation of concerns
and aligns with the latest LangChain patterns for agent development.
feat: Add a name property value to ToolMessage
This reverts commit 2292cd2.
Copy link
Member

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@nhuang-lc nhuang-lc marked this pull request as ready for review November 5, 2025 15:18
@nhuang-lc nhuang-lc merged commit 605e311 into main Nov 5, 2025
13 checks passed
@nhuang-lc nhuang-lc deleted the nh/v1 branch November 5, 2025 19:52
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.

6 participants