RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Diff/ssdeanx-langgraph-dm-clinerules-agents ↔ ssdeanx-langgraph-dm-clinerules-langgraphjs

Comparison

A · Cline rules · ssdeanx/langgraph-dmB · Cline rules · ssdeanx/langgraph-dm
What each file covers, counted
DimensionSharedOnly in AOnly in BOverlap
Sections0570%
Commands000—
Section tags0210%

What each file covers

Sections

0 shared · 5 only in A · 7 only in B
  • − Agents Guidelines
  • − Agent Responsibilities
  • − Agent Development Principles
  • − Agent Architectures
  • − Agent Type Definitions (`src/agent/state.ts`)
  • + LangGraph.js
  • + Overview
  • + Core Concepts
  • + Key Features
  • + Development Practices
  • + Deployment
  • + Relevant Files in this Project

Commands

neither file has any

Section tags

0 shared · 2 only in A · 1 only in B
  • − types
  • − agent-behaviour
  • + architecture

Line diff

+38 added−22 removed12 unchanged24.0% identical
ssdeanx/langgraph-dm · .clinerules/agents.md
@@ −1 @@
1---
2glob: "**/*.ts"
3description: "Langgraph Agents Guidelines"
4---
5# Agents Guidelines
6 
7## Agent Responsibilities
8 
9* **Supervisor:** Acts as the central orchestrator (`src/agent/supervisor.ts`), directing the flow between specialized agents based on the current state and user intent. It should be robust in decision-making and error recovery.
10* **Specialized Agents:** Each agent (e.g., `reactAgent`, `research_agent`, `documentation_agent`) should have a clearly defined purpose and set of tools. They should focus on their specific domain, update the `AgentState` with their results, and return control to the supervisor upon completion or if an unhandled error occurs.
11* **Chat Agent (`chatNode`):** Provides general conversational responses and acts as a fallback for queries not requiring specialized agent intervention.
12* **Tool-Calling Agent (ReAct):** Uses an LLM to decide the control flow, selecting and using various tools, retaining memory, and planning multi-step actions.
13 
14## Agent Development Principles
15 
16* **Modularity:** Each agent should be a self-contained unit, with its own logic and potentially its own set of tools. This facilitates reusability and easier debugging.
17* **State Management:** Agents must correctly interact with and update the `AgentState` to ensure continuity and accurate context passing throughout the graph. Use `Annotation` and reducers for precise state modifications.
18* **Tool Integration:** Agents should seamlessly integrate and utilize the available tools (`src/tools/*`) to perform their tasks. Ensure proper input validation and error handling when calling tools. Consider `ToolNode` for simplified tool execution.
19* **Error Handling:** Implement agent-specific error handling to gracefully manage failures and report back to the supervisor or user.
20* **Logging:** Use the `winston` logger (`src/config/logger.ts`) for tracing agent execution, decisions, and tool calls.
21* **Control Flow:** Agents can return `Command` objects to combine state updates and dynamic routing (e.g., handoffs between agents).
22* **Human-in-the-Loop:** Design agents to support human intervention for approvals, state editing, or input collection using LangGraph's `interrupt()` function.
 
 
23 
24## Agent Architectures
25 
26* **Router:** LLM selects a single path from options.
27* **Tool-Calling Agent (ReAct):** Combines tool usage, memory, and planning for multi-step decision-making.
28* **Multi-Agent Systems:** Break down complex problems into smaller, independent agents collaborating via networks, supervisors, or hierarchical structures. Handoffs are crucial for communication.
 
 
29 
30## Agent Type Definitions (`src/agent/state.ts`)
31 
32* The `AgentType` enum defines the various types of agents supported in the system, enabling clear categorization and routing within the `StateGraph`.
33* When adding new agent types, ensure they are properly defined in `AgentType` and integrated into the `StateGraph` in `src/agent/graph.ts`.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34 
ssdeanx/langgraph-dm · .clinerules/langgraphjs.md
@@ +1 @@
1---
2glob: "**/*.ts"
3description: "Langgraphjs Architecture"
4---
5# LangGraph.js
6 
7## Overview
8 
9LangGraph.js is a powerful library for building stateful, multi-actor AI applications with Large Language Models (LLMs). It allows you to model complex agent workflows as graphs, where nodes represent individual steps or agents and edges define the flow of information and control.
 
 
 
10 
11## Core Concepts
12 
13* **StateGraph:** The primary class for defining graph-based workflows. It manages the shared state that is passed between nodes.
14* **Nodes:** Functions or runnable components that perform specific tasks and update the graph's state.
15* **Edges:** Define transitions between nodes, which can be unconditional or conditional based on the current state.
16* **State:** A shared data structure (`AgentState`) that represents the current context of the application, updated by nodes and passed along edges.
17* **Checkpoints:** Snapshots of the graph's state saved at various points, enabling persistence, debugging, and human-in-the-loop interactions.
18* **Subgraphs:** The ability to embed one graph as a node within another, promoting modularity and hierarchical design.
19* **Command Primitive:** A mechanism for combining state updates and dynamic control flow within a single node.
20* **Streaming:** First-class support for streaming intermediate results and LLM tokens, enhancing user experience.
21* **Human-in-the-Loop (HIL):** Features like `interrupt()` and breakpoints allow human intervention for approvals, state editing, and dynamic input.
22 
23## Key Features
24 
25* **Controllability:** Fine-grained control over the application's flow through explicit node and edge definitions.
26* **Persistence:** Built-in mechanisms for saving and restoring graph state, supporting long-running conversations and fault tolerance.
27* **Modularity:** Encourages breaking down complex problems into smaller, reusable components (nodes and subgraphs).
28* **Tool Integration:** Seamlessly integrates with LangChain tools, allowing agents to interact with external systems.
29* **Observability:** Integrates with LangSmith for tracing, debugging, and monitoring of LLM applications.
30 
31## Development Practices
32 
33* **TypeScript:** Strongly typed development for improved code quality and maintainability.
34* **Testing:** Encourages comprehensive unit and integration testing of nodes, agents, and overall graph workflows.
35* **Error Handling:** Robust error handling for tool calls and model invocations.
36 
37## Deployment
38 
39LangGraph.js applications can be deployed in various ways, including self-hosted solutions or through the LangGraph Platform (Cloud, BYOC). The LangGraph CLI and SDK provide tools for building, running, and interacting with deployed applications.
40 
41## Relevant Files in this Project
42 
43* `src/agent/graph.ts`: Defines the main `StateGraph` and its nodes/edges, orchestrating the agent workflow.
44* `src/agent/state.ts`: Defines the `AgentState` interface and `AgentAnnotation` for managing the application's state.
45* `src/agent/supervisor.ts`: Implements the supervisor agent for routing between specialized agents.
46* `src/agent/react_agent.ts`: Implements the ReAct (Reasoning and Acting) agent.
47* `src/memory/`: Contains implementations for memory management, including MongoDB integration for checkpoints and vector stores.
48* `src/tools/`: Houses various tools used by the agents (e.g., `calculator`, `document_processing`, `exa`, `github`, `local_git`, `tavily`, `web_scraping`).
49* `package.json`: Lists LangGraph and LangChain related dependencies.
50 
@@ −1 +1 @@
11 ---
22 glob: "**/*.ts"
3−description: "Langgraph Agents Guidelines"
3+description: "Langgraphjs Architecture"
44 ---
5−# Agents Guidelines
5+# LangGraph.js
66  
7−## Agent Responsibilities
7+## Overview
88  
9−* **Supervisor:** Acts as the central orchestrator (`src/agent/supervisor.ts`), directing the flow between specialized agents based on the current state and user intent. It should be robust in decision-making and error recovery.
10−* **Specialized Agents:** Each agent (e.g., `reactAgent`, `research_agent`, `documentation_agent`) should have a clearly defined purpose and set of tools. They should focus on their specific domain, update the `AgentState` with their results, and return control to the supervisor upon completion or if an unhandled error occurs.
11−* **Chat Agent (`chatNode`):** Provides general conversational responses and acts as a fallback for queries not requiring specialized agent intervention.
12−* **Tool-Calling Agent (ReAct):** Uses an LLM to decide the control flow, selecting and using various tools, retaining memory, and planning multi-step actions.
9+LangGraph.js is a powerful library for building stateful, multi-actor AI applications with Large Language Models (LLMs). It allows you to model complex agent workflows as graphs, where nodes represent individual steps or agents and edges define the flow of information and control.
1310  
14−## Agent Development Principles
11+## Core Concepts
1512  
16−* **Modularity:** Each agent should be a self-contained unit, with its own logic and potentially its own set of tools. This facilitates reusability and easier debugging.
17−* **State Management:** Agents must correctly interact with and update the `AgentState` to ensure continuity and accurate context passing throughout the graph. Use `Annotation` and reducers for precise state modifications.
18−* **Tool Integration:** Agents should seamlessly integrate and utilize the available tools (`src/tools/*`) to perform their tasks. Ensure proper input validation and error handling when calling tools. Consider `ToolNode` for simplified tool execution.
19−* **Error Handling:** Implement agent-specific error handling to gracefully manage failures and report back to the supervisor or user.
20−* **Logging:** Use the `winston` logger (`src/config/logger.ts`) for tracing agent execution, decisions, and tool calls.
21−* **Control Flow:** Agents can return `Command` objects to combine state updates and dynamic routing (e.g., handoffs between agents).
22−* **Human-in-the-Loop:** Design agents to support human intervention for approvals, state editing, or input collection using LangGraph's `interrupt()` function.
13+* **StateGraph:** The primary class for defining graph-based workflows. It manages the shared state that is passed between nodes.
14+* **Nodes:** Functions or runnable components that perform specific tasks and update the graph's state.
15+* **Edges:** Define transitions between nodes, which can be unconditional or conditional based on the current state.
16+* **State:** A shared data structure (`AgentState`) that represents the current context of the application, updated by nodes and passed along edges.
17+* **Checkpoints:** Snapshots of the graph's state saved at various points, enabling persistence, debugging, and human-in-the-loop interactions.
18+* **Subgraphs:** The ability to embed one graph as a node within another, promoting modularity and hierarchical design.
19+* **Command Primitive:** A mechanism for combining state updates and dynamic control flow within a single node.
20+* **Streaming:** First-class support for streaming intermediate results and LLM tokens, enhancing user experience.
21+* **Human-in-the-Loop (HIL):** Features like `interrupt()` and breakpoints allow human intervention for approvals, state editing, and dynamic input.
2322  
24−## Agent Architectures
23+## Key Features
2524  
26−* **Router:** LLM selects a single path from options.
27−* **Tool-Calling Agent (ReAct):** Combines tool usage, memory, and planning for multi-step decision-making.
28−* **Multi-Agent Systems:** Break down complex problems into smaller, independent agents collaborating via networks, supervisors, or hierarchical structures. Handoffs are crucial for communication.
25+* **Controllability:** Fine-grained control over the application's flow through explicit node and edge definitions.
26+* **Persistence:** Built-in mechanisms for saving and restoring graph state, supporting long-running conversations and fault tolerance.
27+* **Modularity:** Encourages breaking down complex problems into smaller, reusable components (nodes and subgraphs).
28+* **Tool Integration:** Seamlessly integrates with LangChain tools, allowing agents to interact with external systems.
29+* **Observability:** Integrates with LangSmith for tracing, debugging, and monitoring of LLM applications.
2930  
30−## Agent Type Definitions (`src/agent/state.ts`)
31+## Development Practices
3132  
32−* The `AgentType` enum defines the various types of agents supported in the system, enabling clear categorization and routing within the `StateGraph`.
33−* When adding new agent types, ensure they are properly defined in `AgentType` and integrated into the `StateGraph` in `src/agent/graph.ts`.
33+* **TypeScript:** Strongly typed development for improved code quality and maintainability.
34+* **Testing:** Encourages comprehensive unit and integration testing of nodes, agents, and overall graph workflows.
35+* **Error Handling:** Robust error handling for tool calls and model invocations.
36+ 
37+## Deployment
38+ 
39+LangGraph.js applications can be deployed in various ways, including self-hosted solutions or through the LangGraph Platform (Cloud, BYOC). The LangGraph CLI and SDK provide tools for building, running, and interacting with deployed applications.
40+ 
41+## Relevant Files in this Project
42+ 
43+* `src/agent/graph.ts`: Defines the main `StateGraph` and its nodes/edges, orchestrating the agent workflow.
44+* `src/agent/state.ts`: Defines the `AgentState` interface and `AgentAnnotation` for managing the application's state.
45+* `src/agent/supervisor.ts`: Implements the supervisor agent for routing between specialized agents.
46+* `src/agent/react_agent.ts`: Implements the ReAct (Reasoning and Acting) agent.
47+* `src/memory/`: Contains implementations for memory management, including MongoDB integration for checkpoints and vector stores.
48+* `src/tools/`: Houses various tools used by the agents (e.g., `calculator`, `document_processing`, `exa`, `github`, `local_git`, `tavily`, `web_scraping`).
49+* `package.json`: Lists LangGraph and LangChain related dependencies.
3450  
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack