Deploy Honcho

Honcho memory server for AI agents: peers, sessions and reasoning recall

Deploy Honcho

Just deployed

/var/lib/postgresql/data

Just deployed

Just deployed

Deploy and Host Honcho on Railway

Deploy on Railway

Honcho is Plastic Labs' memory server for AI agents. Your app sends it the messages of each conversation; Honcho's background worker reasons over them and builds a lasting picture of every user and agent (facts, preferences, conclusions, summaries), and your agent asks it questions in plain language ("what does this user care about?") or pulls ready-made context for its next prompt. It is the memory layer behind the Hermes Agent Honcho plugin and works with any agent through the Python and TypeScript SDKs, the REST API or MCP. It is licensed AGPL-3.0. This template runs Honcho 3.6.2 on Railway: the API, the deriver worker and Postgres with pgvector, with API keys required from the first boot.

This is a community template, not made or supported by Plastic Labs.

About Hosting Honcho

Before deploying, paste an LLM key into LLM_OPENAI_API_KEY. An OpenAI key works as is. For OpenRouter, paste an OpenRouter key there and set LLM_OPENAI_BASE_URL=https://openrouter.ai/api/v1; the models then default to openai/gpt-5.4-mini and openai/text-embedding-3-small on OpenRouter. LLM_MODEL sets one model for every memory feature (it must support tool calling).

Deploy and wait for the green check (the first boot creates the database tables). Then open the Honcho service's deploy logs: they print the admin key. Use it with your Railway domain:

HONCHO_BASE_URL=https://‹your-honcho-domain›
HONCHO_API_KEY=‹admin key from the deploy logs›
from honcho import Honcho
honcho = Honcho(base_url="https://‹your-honcho-domain›", api_key="‹admin key›", workspace_id="my-app")

The admin key reaches every workspace. For an app or a teammate, mint a narrower key with POST /v3/keys?workspace_id=my-app (or &peer_id=..., &expires_at=...) using the admin key. Interactive API docs are at /docs.

Why keys are required: upstream Honcho starts with authentication off, so anyone who found the address could read every stored memory. This template turns it on with a generated AUTH_JWT_SECRET; requests without a valid key get 401. Changing the secret invalidates every key, the admin key included (a new one is printed on the next boot).

LLM costs: Honcho calls your provider in the background for every batch of messages (the deriver), for summaries, for periodic "dreams" that consolidate memory, and for each chat query. The defaults use small, cheap models; watch your provider's usage page in the first days.

Your data: everything is in the Postgres service on its volume. Redeploys keep it, and new Honcho versions migrate it on start.

Other providers: Honcho also speaks Anthropic and Gemini natively. Set LLM_ANTHROPIC_API_KEY or LLM_GEMINI_API_KEY plus the per-feature *_MODEL_CONFIG__TRANSPORT and *_MODEL_CONFIG__MODEL variables from upstream's .env.template on both the Honcho and Deriver services. Embeddings need OpenAI, Gemini or an OpenAI-compatible endpoint.

Common Use Cases

  • Long-term memory for Hermes Agent, OpenClaw or your own agent, kept on your own infrastructure
  • Personalising a chatbot or assistant from what each user has said across sessions
  • Multi-agent setups where agents keep separate views of each other and of users
  • Asking natural-language questions about a user ("how technical are they?") from your backend
  • Building prompts from session summaries and recalled facts instead of whole transcripts

Dependencies for Honcho Hosting

  • Postgres with pgvector (included)
  • An API key for OpenAI, OpenRouter or another OpenAI-compatible provider whose models support tool calling

Deployment Dependencies

Implementation Details

  • Services: Honcho (the FastAPI server, on the Railway domain), Deriver (the background worker that builds memory; no public address) and Postgres 17 with pgvector on Railway's private network. Upstream's Redis cache is optional and left out.
  • One image, two roles: both services build this repo, upstream's ghcr.io/plastic-labs/honcho:v3.6.2 pinned and unmodified plus a small entrypoint; HONCHO_ROLE picks the API or the worker. Upstream's :latest has shipped broken migrations, so updates come as tested version bumps.
  • Database: both services run Honcho's migrations on start under its own lock, so a new version upgrades the schema before either serves.
  • Settings for the worker: the Deriver takes the key, base URL and model from the Honcho service. Any other upstream setting (for example DERIVER_WORKERS or DREAM_ENABLED) goes on the service that uses it.
  • Never crash-looping on a variable: with no LLM key, a key the provider rejects, a too-short AUTH_JWT_SECRET or a database that never answers, the API serves a page saying what to fix and the worker waits, instead of restarting over and over. The deploy logs say the same.
  • Memory: measured on Railway with light use: the API about 330–360 MB, the Deriver about 260 MB and Postgres about 60–70 MB (Railway's figure, which includes file cache). Each fits a 0.5 GB service, with little headroom on the API; 1 GB each is comfortable.

Why Deploy Honcho on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Honcho on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


Template Content

More templates in this category

View Template
Chat Chat
Chat Chat, your own unified chat and search to AI platform.

okisdev
118
View Template
Weaviate
Vector database with hybrid search and an API key-protected API

GitHub Locker
1
View Template
Möbius Personal AI OS
Self-hosted AI agent that builds and runs apps for you, with memory.

Tracklayer
5