0.0.20 • Published 8 months ago

@langchain/langgraph-sdk v0.0.20

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

LangGraph JS/TS SDK

This repository contains the JS/TS SDK for interacting with the LangGraph REST API.

Quick Start

To get started with the JS/TS SDK, install the package

yarn add @langchain/langgraph-sdk

You will need a running LangGraph API server. If you're running a server locally using langgraph-cli, SDK will automatically point at http://localhost:8123, otherwise you would need to specify the server URL when creating a client.

import { Client } from "@langchain/langgraph-sdk";

const client = new Client();

// List all assistants
const assistants = await client.assistants.search({
  metadata: null,
  offset: 0,
  limit: 10,
});

// We auto-create an assistant for each graph you register in config.
const agent = assistants[0];

// Start a new thread
const thread = await client.threads.create();

// Start a streaming run
const messages = [{ role: "human", content: "what's the weather in la" }];

const streamResponse = client.runs.stream(
  thread["thread_id"],
  agent["assistant_id"],
  {
    input: { messages },
  }
);

for await (const chunk of streamResponse) {
  console.log(chunk);
}

Documentation

To generate documentation, run the following commands:

  1. Generate docs.

    yarn typedoc
  2. Consolidate doc files into one markdown file.

    npx concat-md --decrease-title-levels --ignore=js_ts_sdk_ref.md --start-title-level-at 2 docs > docs/js_ts_sdk_ref.md
  3. Copy js_ts_sdk_ref.md to MkDocs directory.

    cp docs/js_ts_sdk_ref.md ../../docs/docs/cloud/reference/sdk/js_ts_sdk_ref.md
0.0.20

8 months ago

0.0.18

8 months ago

0.0.19

8 months ago

0.0.17

9 months ago

0.0.14-rc.0

9 months ago

0.0.15

9 months ago

0.0.16

9 months ago

0.0.13

9 months ago

0.0.14

9 months ago

0.0.11

9 months ago

0.0.10-rc.0

10 months ago

0.0.10

10 months ago

0.0.9

10 months ago

0.0.8

10 months ago

0.0.7

10 months ago

0.0.6

11 months ago

0.0.5

11 months ago

0.0.4

11 months ago

0.0.4-rc.0

11 months ago

0.0.3

11 months ago

0.0.2

12 months ago

0.0.1

1 year ago

0.0.1-rc.14

1 year ago

0.0.1-rc.13

1 year ago

0.0.1-rc.12

1 year ago

0.0.1-rc.11

1 year ago

0.0.1-rc.10

1 year ago

0.0.1-rc.9

1 year ago

0.0.1-rc.8

1 year ago

0.0.1-rc.7

1 year ago

0.0.1-rc.6

1 year ago

0.0.1-rc.5

1 year ago

0.0.1-rc.4

1 year ago

0.0.1-rc.3

1 year ago

0.0.1-rc.2

1 year ago

0.0.1-rc.1

1 year ago

0.0.1-rc.0

1 year ago