Skip to content

[Adapter] LangChain export/runner #2

Description

@shreyas-lyzr

Summary

Add a LangChain adapter to gitagent, enabling export and run support for the LangChain framework.

Details

LangChain is one of the most widely adopted LLM frameworks. A gitagent adapter would allow users to:

  • Export: Convert a gitagent agent definition to LangChain agent configuration
  • Run: Execute a gitagent-defined agent using the LangChain runtime

Acceptance Criteria

  • gitagent export --format langchain generates valid LangChain Python code
  • gitagent run ./agent --adapter langchain executes the agent
  • Documentation added to README adapter table
  • Example added to examples/

Resources

Activity

  1. added a commit that references this issue on Mar 25, 2026
  2. shreyas-lyzr commented on May 4, 2026

    @shreyas-lyzr
    ContributorAuthor

    Apologies for the long silence — PR #16 by @AJAmit17 implements LangChain export + runner with multi-provider support. I've left a detailed review there asking for a rebase against current main (the PR predates several command refactors, the rebrand to @open-gitagent/gapman, and the new kiro/gitclaw adapters). Once that lands I'll close this issue.

  3. shreyas-lyzr commented on May 24, 2026

    @shreyas-lyzr
    ContributorAuthor

    PR #81 addresses this issue with a clean rebase of the original #16. It is currently in review. A quick status note:

    • The adapter (src/adapters/langchain.ts) and runner (src/runners/langchain.ts) are both present
    • Provider detection covers OpenAI (gpt-, o1/o2/o3/o4-) and Anthropic (claude-*)
    • Unit tests are included (langchain.test.ts)
    • Documentation is in docs/adapters/langchain.md

    Two blocking issues flagged in the PR review: (1) the venv bootstrap on first run gives no user-visible progress, and (2) unsupported models hard-error with no fallback. Once those are addressed the PR should be mergeable.

    Tracking here — will close this issue when #81 merges.

  4. self-assigned this
    on May 24, 2026
  5. shreyas-lyzr commented on May 25, 2026

    @shreyas-lyzr
    ContributorAuthor

    PR #81 (feat/langchain-rebased by @AJAmit17) directly addresses this issue and is currently open for review. The implementation covers export to standalone LangChain Python scripts with multi-provider support (OpenAI + Anthropic), tool integration, sub-agent delegation, and memory handling.

    A few items from the PR review that need resolution before close:

    • The export.ts caller has no try/catch around the langchain case — unhandled exceptions will crash the CLI on unsupported models
    • The detectProvider export widens the public API surface for an internal function
    • Naming convention: exportToLangChain vs the established exportTo*String pattern

    Once those are addressed in PR #81, this issue can be closed. Assigning @shreyas-lyzr to track the PR to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions