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.20.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.20-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: reminix_langgraph-0.0.20.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.20.tar.gz
Algorithm Hash digest
SHA256 10834258a157fadff77138555b8da7460035506b5b614e9ecb79ba821171e9d4
MD5 f53729ad11747adbd60c58ea4004a5d0
BLAKE2b-256 2e1527c2d7b7fd33810d8ab6b73a546fcd1b8d0d5ce9632121ec5bccb66627f7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: reminix_langgraph-0.0.20-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.20-py3-none-any.whl
Algorithm Hash digest
SHA256 a2c7be9204be2a02cd74121aeaa613cb109dcfddb3f0164dd348bdb88001458a
MD5 21bcdb5f175fdb41ebe3a9c36c8be9a1
BLAKE2b-256 5449466bc77d001349863751148ce1321abbc9b12fc7d70431fdca4822b00022

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