Skip to content

Refactor: Migrate legacy AgentExecutor-based LangChain agent to LangGraph #17

@azamiftikhar1000

Description

@azamiftikhar1000

📌 Background / Why

Legacy agents built with AgentExecutor work, but they 

  • limit fine‑grained control over decision flows,

  • make tool‑calling logic harder to debug, and

  • sit on an API path LangChain is actively de‑emphasizing.

LangGraph provides a graph‑structured runtime that delivers:

  • Deterministic control‑flow (explicit nodes + edges)

  • Easier state inspection & debugging

  • Better concurrency & performance hooks

  • Alignment with future LangChain releases (long‑term support)


🎯 Goals / Acceptance Criteria

  • Replace current initialization:

    agent = initialize_agent(
        all_tools,
        llm,
        agent=agent_type,
        verbose=verbose,
        agent_kwargs=default_agent_kwargs,
        **kwargs
    )
    

    …with an equivalent LangGraph graph (e.g., ReAct or custom Supervisor pattern).

  • Preserve existing functionality and tool set (all_tools).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions