Skip to main content

Reminix agents for LangGraph - serve AI agents as REST APIs

Project description

reminix-langgraph

Reminix agents for LangGraph. Serve any LangGraph agent as a REST API.

Ready to go live? Deploy to Reminix Cloud for zero-config hosting, or self-host on your own infrastructure.

Installation

pip install reminix-langgraph

This will also install reminix-runtime as a dependency.

Quick Start

Thread Agent (chat-style)

from langgraph.prebuilt import create_react_agent
from langchain_openai import ChatOpenAI
from reminix_langgraph import LangGraphThreadAgent
from reminix_runtime import serve

llm = ChatOpenAI(model="gpt-4o")
graph = create_react_agent(llm, tools=[])
agent = LangGraphThreadAgent(graph, name="my-agent")
serve(agents=[agent])

Workflow Agent (multi-step with interrupt/resume)

from reminix_langgraph import LangGraphWorkflowAgent
from reminix_runtime import serve

graph = build_workflow_graph()  # your LangGraph compiled graph
agent = LangGraphWorkflowAgent(graph, name="my-workflow")
serve(agents=[agent])

Your agent is now available at:

  • POST /agents/{name}/invoke - Execute the agent

API Reference

LangGraphThreadAgent(graph, *, name, description, instructions, tags, metadata)

Create a LangGraph thread agent for chat-style interactions.

Parameter Type Default Description
graph CompiledGraph required A LangGraph compiled graph
name str "langgraph-agent" Name for the agent (used in URL path)
description str "langgraph thread agent" Description shown in agent metadata
instructions str None System instructions prepended to messages
tags list[str] None Tags for categorizing/filtering agents
metadata dict None Custom metadata merged into agent info

Returns: LangGraphThreadAgent - A Reminix thread agent instance

The thread agent:

  1. Converts incoming messages to LangChain message format
  2. Prepends a SystemMessage if instructions is set
  3. Invokes the graph with {"messages": [...]}
  4. Extracts the last AI message from the response
  5. Returns it in the Reminix response format

LangGraphWorkflowAgent(graph, *, name, description, instructions, tags, metadata)

Create a LangGraph workflow agent for multi-step execution with interrupt/resume support.

Parameter Type Default Description
graph CompiledGraph required A LangGraph compiled graph
name str "langgraph-workflow-agent" Name for the agent (used in URL path)
description str "langgraph workflow agent" Description shown in agent metadata
instructions str None Stored in metadata (not injected into graph execution)
tags list[str] None Tags for categorizing/filtering agents
metadata dict None Custom metadata merged into agent info

Returns: LangGraphWorkflowAgent - A Reminix workflow agent instance

The workflow agent:

  1. Streams the graph and collects per-node outputs as steps
  2. Maps GraphInterrupt to pendingAction with status "paused"
  3. Accepts resume input to continue interrupted graphs via Command
  4. Returns structured {status, steps, result?, pendingAction?} output

Endpoint Input/Output Formats

Thread Agent — POST /agents/{name}/invoke

Request:

{
  "input": {
    "messages": [
      {"role": "user", "content": "Hello!"}
    ]
  }
}

Response:

{
  "output": "Hello! How can I help you today?"
}

Workflow Agent — POST /agents/{name}/invoke

Request:

{
  "input": {"task": "process data"}
}

Response:

{
  "output": {
    "status": "completed",
    "steps": [
      {"name": "fetch_data", "status": "completed", "output": {"records": 10}},
      {"name": "process", "status": "completed", "output": {"summary": "done"}}
    ],
    "result": {"summary": "done"}
  }
}

Resume a paused workflow:

{
  "input": {
    "task": "process data",
    "resume": {"step": "approve", "input": {"approved": true}}
  }
}

Streaming

For streaming responses (thread agent only), set stream: true in the request:

{
  "input": {
    "messages": [{"role": "user", "content": "Hello!"}]
  },
  "stream": true
}

The response will be sent as Server-Sent Events (SSE).

Runtime Documentation

For information about the server, endpoints, request/response formats, and more, see the reminix-runtime package.

Deployment

Ready to go live?

Links

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reminix_langgraph-0.0.22.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

reminix_langgraph-0.0.22-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file reminix_langgraph-0.0.22.tar.gz.

File metadata

  • Download URL: reminix_langgraph-0.0.22.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for reminix_langgraph-0.0.22.tar.gz
Algorithm Hash digest
SHA256 692695bf5b14bfc105c6e686b574bb8a981397e41fb3c459eb004d2ade508e7b
MD5 da8745a8846a6ebf9ab214f050a55473
BLAKE2b-256 2697cd19eeccbde8eb14050a9461144f17ce70f5e8c2026b122855323ff32c04

See more details on using hashes here.

File details

Details for the file reminix_langgraph-0.0.22-py3-none-any.whl.

File metadata

  • Download URL: reminix_langgraph-0.0.22-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for reminix_langgraph-0.0.22-py3-none-any.whl
Algorithm Hash digest
SHA256 df688f2c10cc82b4830d5932cb52a518f19f7ecdccfe16d6e9e45c02e0818c98
MD5 10da5e1d8635d946ba85a264d59e7881
BLAKE2b-256 05683a82b4ed124e13b1e197e4be03ce82c708bb4bab230d6b06c979c8459734

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page