Skip to content

[REQ] New python client generator which exports the api funcs as langchain tools #22076

@abhishekmsingh

Description

@abhishekmsingh

Is your feature request related to a problem? Please describe.

I had this use case in my org where I need to provide an ai agentic chatbot over a basic crud server. Wanted to auto generate the langchain tools as they can be done using the openapi spec offered by the server easily. Think having a generator here would be useful in general as well.

I saw a thread regarding MCP server but this is specifically for tools

Describe the solution you'd like

  • Introduce a new generator named python-langchain-tools.
  • The PythonLangchainToolsClientCodegen class for this will extend the PythonClientCodegen and utilize it for client generation.
  • The new PythonLangchainToolsClientCodegen class would just create additional files which will import the clients and export them as lang chain tools

Describe alternatives you've considered

  • creating new type of generators apart from client and servers but tools are just a facade over clients so I think this would be good enougth to start with

Additional context

I have already implemented this in my local in a non platformized way using the approach mentioned above. If the community thinks this is plausible, can create a PR as well

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions