An open API service indexing awesome lists of open source software.

https://github.com/langchain-ai/langgraph-gen-py

CLI to generate LangGraph stubs from a specification
https://github.com/langchain-ai/langgraph-gen-py

Last synced: 7 months ago
JSON representation

CLI to generate LangGraph stubs from a specification

Awesome Lists containing this project

README

          

# langgraph-gen

langgraph-gen is a CLI tool that allows you to auto-generate a LangGraph stub from a
specification file.

## Usage

```shell
pip install langgraph-gen
```
## Stubs for Python

```shell
langgraph-gen --input --output --language python
```

## Stubs for TypeScript

```shell
langgraph-gen --input --output --language typescript
```

## Example Spec

```YAML
# A simple 2-step Retrieval-Augmented Generation workflow
name: RagWorkflow
entrypoint: retrieve
nodes:
- name: retrieve
- name: generate
edges:
- from: retrieve
to: generate
- from: generate
to: __end__
```

## Examples

You can find examples of the LangGraph specification together with the generated LangGraph stubs in the [examples](./examples) directory.