diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index c8ccdc80d..000000000 --- a/Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -FROM python:3.9 - -# Set the working directory to /app -WORKDIR /app - -# Copy the current directory contents into the container at /app -COPY . . - -# Install any needed packages specified in requirements.txt -RUN pip install poetry && poetry config virtualenvs.create false && poetry install --with test - -RUN poetry run pytest diff --git a/libs/sdk-js/README.md b/libs/sdk-js/README.md new file mode 100644 index 000000000..bf93d16f9 --- /dev/null +++ b/libs/sdk-js/README.md @@ -0,0 +1,48 @@ +# 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](https://www.npmjs.com/package/@langchain/langgraph-sdk) + +```bash +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. + +```js +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: "whats 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); +} +``` \ No newline at end of file diff --git a/libs/sdk-py/README.md b/libs/sdk-py/README.md index 66351bf01..597644fd7 100644 --- a/libs/sdk-py/README.md +++ b/libs/sdk-py/README.md @@ -1 +1,35 @@ -# langgraph +# LangGraph Python SDK + +This repository contains the Python SDK for interacting with the LangGraph REST API. + +## Quick Start + +To get started with the Python SDK, [install the package](https://pypi.org/project/langgraph-sdk/) + +```bash +pip install -U 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. + +```python +from langgraph_sdk import get_client + +# If you're using a remote server, initialize the client with `get_client(url=REMOTE_URL)` +client = get_client() + +# List all assistants +assistants = await client.assistants.search() + +# We auto-create an assistant for each graph you register in config. +agent = assistants[0] + +# Start a new thread +thread = await client.threads.create() + +# Start a streaming run +input = {"messages": [{"role": "human", "content": "whats the weather in la"}]} +async for chunk in client.runs.stream(thread['thread_id'], agent['assistant_id'], input=input): + print(chunk) +``` \ No newline at end of file