Skip to content
LangChain

Postgram for LangChain

io.github.ivo-toby/postgram

Self-hosted memory for AI agents with hybrid search, knowledge graphs, tasks, and document sync.

client:LangChain transport:stdio runtime:oci

Install Postgram in LangChain

pip install langchain-mcp-adapters

from langchain_mcp_adapters.client import MultiServerMCPClient

client = MultiServerMCPClient({
        "postgram": {
            "transport": "stdio",
            "command": "docker",
            "args": ["run", "-i", "--rm", "ghcr.io/ivo-toby/postgram@sha256:29b61fb302bd52862b8eba43305ee2aa4fc072d5f9188652f1fe6324f49d5391"],
        }
})

tools = await client.get_tools()

get_tools() returns the server's tools as LangChain tools, ready for an agent. LangChain docs

Postgram in other clients