memeX · Documentation

memeX HTTP API — wire any AI editor or tool

Drive memeX from any AI tool that doesn't speak MCP. Use the HTTP API at localhost:7777 — recall, add, validate, observe — from Aider, JetBrains, custom agents, shell scripts.

localhost:7777OpenAPI 3.1bearer authlanguage-agnostic

For any AI tool or editor that doesn’t speak MCP — Aider, JetBrains plugins, custom agents, Neovim plugins, shell scripts — drive memeX via its HTTP API.

Start the daemon

memex daemon --listen 127.0.0.1:7777

By default memeX binds only to localhost. To expose externally, you must pass --auth-token:

memex daemon --listen 0.0.0.0:7777 --auth-token "$(openssl rand -hex 32)"

(Refusing to start without a token on a non-localhost address is intentional — silent insecurity is worse than a loud failure.)

Even on 127.0.0.1, memeX generates a per-machine auth token on first run at <data_dir>/daemon.token (mode 0600). Local clients (the desktop app, the CLI) read from there. See Privacy & security for details.

Endpoints

OpenAPI spec auto-generated at http://127.0.0.1:7777/openapi.json. Swagger UI at http://127.0.0.1:7777/docs. Full reference: HTTP API.

MethodPathDescription
GET/healthServer status, version, storage stats
GET/recall?q=<query>&budget=2000&kind=&expand=1Hybrid retrieval, returns subgraph
POST/nodesAdd a concept
GET/nodes/{id}Fetch a concept by id
POST/edgesCreate a typed edge
POST/observeEmit an episodic event
POST/validateGet a skill’s approach + checks + examples
GET/progressActivity summary
GET/skillsList builtin skill bundles
POST/skills/installInstall a builtin skill into the engine

Examples

Recall

curl 'http://127.0.0.1:7777/recall?q=database+choice&budget=2000' 
  -H "Authorization: Bearer $(cat $HOME/.local/share/memex/daemon.token)"

Add a concept

curl -X POST http://127.0.0.1:7777/nodes 
  -H "Authorization: Bearer $(cat $HOME/.local/share/memex/daemon.token)" 
  -H 'Content-Type: application/json' 
  -d '{
    "name": "Use Postgres over MySQL",
    "description": "JSONB usage drove the decision.",
    "kind": "decision",
    "source": "human",
    "confidence": 1.0
  }'

Validate against an approach

curl -X POST http://127.0.0.1:7777/validate 
  -H "Authorization: Bearer $(cat $HOME/.local/share/memex/daemon.token)" 
  -H 'Content-Type: application/json' 
  -d '{"skill": "secure-subprocess", "actor": "agent"}'

Python client

import httpx
from pathlib import Path

class Memex:
    def __init__(self, base="http://127.0.0.1:7777", token=None):
        if token is None:
            # Local default: read the per-machine token.
            token_file = Path.home() / ".local" / "share" / "memex" / "daemon.token"
            if token_file.is_file():
                token = token_file.read_text().strip()
        self.client = httpx.Client(
            base_url=base,
            headers={"Authorization": f"Bearer {token}"} if token else {},
        )

    def recall(self, query, budget=2000, kind=None):
        params = {"q": query, "budget": budget}
        if kind:
            params["kind"] = kind
        return self.client.get("/recall", params=params).json()

    def add(self, name, description="", kind="fact", source="agent"):
        return self.client.post("/nodes", json={
            "name": name, "description": description,
            "kind": kind, "source": source,
        }).json()

    def validate(self, skill, actor="agent"):
        return self.client.post("/validate", json={
            "skill": skill, "actor": actor,
        }).json()

Polyglot

The same HTTP surface works from any language: Go (net/http), Rust (reqwest), Node (fetch), Java (java.net.http), Ruby (net/http), shell (curl). The OpenAPI spec autogenerates client SDKs for every major language.