Miriel Docs

Get started

Miriel turns every kind of data into one memory that people and AI agents can ask questions of, with sources cited. Two calls carry the whole platform: learn() puts anything in, query() gets an answer out. This page takes you from an API key to a first cited answer in about five minutes, then points you at the surface that fits what you are building.

Ways to build on Miriel

Everything below talks to the same account and the same memory, so you can mix them: learn from a script, query from Claude, and watch it all in the workspace.

Prefer not to write code at all? The Miriel workspace is the same platform as an app: chat with cited answers, connected sources, and apps built by describing them.

Quickstart

Five steps, each with curl, Python and JavaScript. Pick a language once and every example on the site follows.

1. Get your API key

In the workspace, open Settings → Developers. Your key is a UUID; Reveal or Copy it from the API keys card. Export it, along with the API origin, so the examples below run as written:

bash
export MIRIEL_API_KEY="00000000-0000-0000-0000-000000000000"   # yours, from Settings → Developers
export MIRIEL_API="https://api.miriel.ai"
Keep it secret
The account key has full read/write access to your data, queries and integrations. Keep it on servers and in secret stores — never ship it in browser or mobile code. If a key leaks, rotate it right away (Developers → Rotate) or contact support@miriel.ai.

2. Install a client (optional)

The REST API needs nothing but an HTTP client. If you would rather call functions, install one of the official libraries:

# nothing to install — every example has a curl tab
curl -s "$MIRIEL_API/api/v2/health"   # no auth needed

3. Learn something

learn takes inline text, URLs (pages are crawled to recursion_depth, git repos and RTSP streams are recognized) and files. Every item lands in one or more projects — default if you do not say.

curl -s -X POST "$MIRIEL_API/api/v2/learn" \
  -H "x-access-token: $MIRIEL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "project": ["default"],
    "input": [
      {"value": "Our pricing decision: usage-based, with a free tier up to 1,000 queries a month."},
      {"value": "https://miriel.ai/docs"}
    ]
  }'

The response carries job_ids. Ingestion is asynchronous: short text is searchable within seconds, a long video or a large crawl takes longer.

4. Wait for ingestion

In an interactive app you rarely need to wait. In a script that learns and immediately queries, poll the jobs you just created:

curl -s -X POST "$MIRIEL_API/api/v2/get_job_status" \
  -H "x-access-token: $MIRIEL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"job_ids": ["<job-id>"]}'
# → {"jobs": {"<job-id>": "completed"}}

5. Ask a question

curl -s -X POST "$MIRIEL_API/api/v2/query/" \
  -H "x-access-token: $MIRIEL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "What did we decide about pricing?",
    "project": ["default"],
    "num_results": 5
  }'

You get back an LLM answer synthesized from your data (results.llm_result) and the ranked passages it was built from (results.vector_db_results), each with its source. Leave project out to search every project; pass a list, or "*", to be explicit.

response (abridged)
{
  "results": {
    "query_id": "…",            // stored — fetch it again with GET /api/v2/query/<query_id>
    "status": "complete",
    "llm_result": "We chose usage-based pricing with a free tier of 1,000 queries a month.",
    "vector_db_results": [ /* ranked passages with source and metadata */ ],
    "timings": { /* per-stage timings */ }
    // …graph results, token counts, conversation_history when conversation_mode is on
  }
}

Core concepts

ConceptWhat it is
ResourceOne thing Miriel has learned — a document, page, message, recording, file. It is chunked, embedded, and its entities are extracted into the knowledge graph.
ProjectA namespace for resources, and the scope of a query. The workspace calls these tags. "*" means all of them.
JobThe asynchronous work behind a learn call. Poll it, cancel it, or read its stage-by-stage timeline.
QueryA question plus retrieval (vector + graph) plus an optional LLM answer. Every query is stored and can be fetched, re-formatted or published later.
MetadataYour own key/values on a resource — filter on them at query time with metadata_query.
Knowledge graphEntities and relationships extracted during ingest. It contributes to answers and can be walked directly.
SourceA connected provider (Google Drive, Slack, GitHub, …) that backfills history and keeps syncing, so you never re-learn by hand.
MCP serverA hosted endpoint that exposes your memory as tools to AI assistants.

What happens to your data

  • Everything travels over TLS; vectors and their metadata are encrypted before they enter the index, and search runs against the encrypted index.
  • Access is managed per credential — the API key, per-resource grants (grant_ids) and project scoping decide what a caller can read.
  • Removing a resource (/api/v2/remove_resource) removes it from retrieval; the workspace's Danger zone can forget everything.

Building with an AI assistant

If an assistant is writing your integration, give it the reference instead of letting it guess:

  • llms-miriel.md — the whole API condensed into one file. Drop it into CLAUDE.md, a Cursor rule, or project knowledge. It is also served, unauthenticated, at GET https://api.miriel.ai/api/v2/developer/docs/llms-miriel.
  • Connect the assistant over MCP: its miriel_capabilities tool answers "how do I…?" questions from Miriel's own documentation, with no LLM in the loop.
  • The full developer docs are listed, as raw Markdown, at GET https://api.miriel.ai/api/v2/developer/docs — no key required.
Get started — Miriel Docs