Integration
Long-term memory for aichat
aichat is sigoden's all-in-one Rust LLM CLI, but its tool layer doesn't read MCP servers from its own YAML — tools (including MCP) are loaded through the companion repo `sigoden/llm-functions`, which ships an `mcp-bridge` that aichat queries over HTTP. The bridge speaks stdio MCP only, so Engram's hosted SSE endpoint is wired in via `mcp-remote`. After `argc mcp start && argc build`, six `engram_`-prefixed tools are available to every aichat session.
Install
Three steps: sign up for an Engram API key, paste a BYOK LLM-provider key on /models, then drop the snippet below into aichat.
Three steps to memory in your agent
- Sign up. Free, no card. You'll land on a Getting Started page that walks the next two steps.
- Add your LLM key. Engram is BYOK. Paste an OpenAI / Anthropic / Groq / Together / Fireworks key and we'll route every extraction and query call through your provider. You pay your provider directly. We never see your inference.
- Paste the snippet below into your agent and restart it. Use
Authorization: Bearer <api-key>with the API key from your portal.
sigoden's Rust LLM CLI via the llm-functions bridge
aichat doesn't read MCP directly — tools route through the companion sigoden/llm-functions repo's stdio mcp-bridge. Engram's hosted SSE endpoint is wired in via mcp-remote, exposing six engram_-prefixed tools to every aichat session.
- Clone the bridge repo and symlink it into aichat:
- Add Engram to
~/llm-functions/mcp.json: - Start the bridge and regenerate tool definitions:
- Use Engram from any aichat session:
aichat --role %functions% "engram_store_memory: ...". Drop theengram_prefix by setting"prefix": falseon the server entry inmcp.json.
git clone https://github.com/sigoden/llm-functions ~/llm-functions
cd ~/llm-functions
argc link-to-aichat{
"mcpServers": {
"engram": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://mcp.lumetra.io/mcp/sse",
"--transport",
"sse-only",
"--header",
"Authorization:Bearer <api-key>"
]
}
}
}argc mcp start && argc buildWhat you can do once memory's wired in
- `aichat --role %functions% "engram_store_memory: remember I prefer pytest over unittest"`: one-shot store from any shell
- Chat with `aichat -r %functions%` and let the model decide when to call `engram_query_memory` mid-conversation
- Pipe shell output straight into memory: `cat decisions.md | aichat --role %functions% "engram_store_memory: $(cat)"`
- Cross-check memories landed via the REST API at `api.lumetra.io` (the MCP bridge hits a different host than the REST endpoint)
FAQ
Why the two-repo setup (aichat + llm-functions)?
aichat itself doesn't read MCP servers. Tools, including MCP, are routed through the sibling `sigoden/llm-functions` repo, which ships an `mcp-bridge` that aichat queries on `localhost:8808`. `argc link-to-aichat` symlinks `llm-functions` into aichat's `functions_dir`; `argc mcp start` launches the bridge; `argc build` regenerates `functions.json`.
Why is the tool prefix `engram_` and can I drop it?
The `mcp-bridge` prefixes tool names by server name unless you set `"prefix": false` on the server entry. We keep the prefix by default so Engram tools don't collide with other MCP servers you may have wired into the same bridge. To drop it, add `"prefix": false` to the `engram` entry in `mcp.json`.
Anything special for Anthropic users?
Yes. aichat 0.30.0 doesn't ship a `claude-sonnet-4-5` model entry and Anthropic requires explicit `max_tokens`. Both need to be declared in `~/.config/aichat/config.yaml` (see `config.example.yaml` in the recipe). Without it, the very first call errors with `max_tokens: Field required`.
Related integrations
Ship durable memory in aichat today
Free tier: 10K memories and 50K retrievals per month. No credit card. Same Engram backend powers all 41 integrations, so memories you write from one client are immediately queryable from the rest.