Book a meeting
Developers

The Atlas API.

A versioned projection of the same capability catalog that drives the Atlas app, its agents, and its MCP tools — one source generates all of them, so these docs cannot drift from what ships.

OpenAPI 3.0 spec

Auth

One key, every project you belong to.

An Atlas API key is account-level: it authenticates you, and each request names the project it targets. Your live access level on that project authorizes the call — a key never reaches past what you can do there, and there is no per-project key minting.

01

Create a key

POST /v1/api-keys with your signed-in Atlas session and an optional {"label": "..."} body mints a key of the form rlka_.... The plaintext is returned exactly once — store it; only a hash persists. GET /v1/api-keys lists your keys, DELETE /v1/api-keys/{keyId} revokes one.

02

Authenticate every request

Send the key as a bearer token: Authorization: Bearer rlka_.... A missing or invalid key answers 401.

03

Name the target project

Every request carries the target project's id in the X-Project-Id header (or the projectId query parameter). A project you are not a member of answers 404.

04

Rate limit

60 requests per minute per key. Beyond that the API answers 429.

Dispatch

One endpoint dispatches every action.

POST /v1/api/actions takes the action id and its input object; the response carries the action's result. The actions below are the full request vocabulary.

curl

Dispatch with curl

curl https://relay.runlogai.com/v1/api/actions \
  -H "Authorization: Bearer rlka_..." \
  -H "X-Project-Id: YOUR_PROJECT_ID" \
  -H "Content-Type: application/json" \
  -d '{"action": "memory_query", "input": {"kind": "cells"}}'
python

Dispatch with Python (standard library)

import json, urllib.request

req = urllib.request.Request(
    "https://relay.runlogai.com/v1/api/actions",
    data=json.dumps({"action": "memory_query", "input": {"kind": "cells"}}).encode(),
    headers={
        "Authorization": "Bearer rlka_...",
        "X-Project-Id": "YOUR_PROJECT_ID",
        "Content-Type": "application/json",
    },
)
print(json.load(urllib.request.urlopen(req)))
response

Response shape

{
  "action": "memory_query",
  "result": { "items": [ ... ], "nextCursor": "..." }
}

Errors: 400 missing project or action, 401 bad key, 403 action not available to an API key, 404 unknown action or project, 429 rate limited.

Actions

The action reference.

Grouped by endpoint family, each with its contracted version. Input schemas and contract rules are generated from the catalog itself. Contract rules are binding on every caller — payload semantics and sequencing constraints hold exactly as stated.

artifact v1.0.0

project-write

Update an artifact

artifact_updateGenerate or revise a structured artifact (report, memo, summary) built from the project's corpus.

FieldTypeRequiredDescription
artifactIdstringoptionalexisting artifact id to update; omit to generate a new one
purposestringrequiredwhat the artifact should produce

Contract Generation is detached: a dispatch returns the running task to poll, and a dispatch naming an artifactId is refused on the API surface today — omit it to generate a new artifact.

code v1.0.0

read

Pack code context

code_context_packReturn the slice of an ingested repository one coding task needs: the declarations ranked most relevant to the task, each as a signature citing its file and line, packed to a token budget. Complements an exact-string search rather than replacing it — it answers which code to read, not what it says.

FieldTypeRequiredDescription
taskstringrequiredthe coding task in prose — what is being changed, in the words the codebase itself uses
seedSymbolsstringoptionaldeclarations already in your context, comma- or newline-separated; they steer the ranking and are never returned back to you
seedFilesstringoptionalfile paths already open in your context, comma- or newline-separated; same effect as seed symbols
budgetnumberoptionalapproximate token ceiling the pack fills (default 4096)

Contract The response is signatures, never bodies: each declaration carries its header, file, and line span so you read the source yourself at the cited position.

Contract The pack is ranked for precision, not coverage — it returns the few declarations a task turns on and stops well short of the budget when nothing else scores. A short pack is an answer, not a truncation; re-dispatch with a sharper task rather than a larger budget.

Contract Seeds are subtracted from the answer: anything you name in seedSymbols or seedFiles steers the ranking and is never spent on your budget.

read

Find code units

code_referencesList the ingested code units whose symbol name matches a typed prefix, each as an addressable reference — a stable symbol id, the symbol name as its label, and its file path as its sublabel. This is the manual override for retrieval: what a mention picker loads so a user can point at code by name.

FieldTypeRequiredDescription
querystringoptionalthe prefix typed so far; empty lists the first page alphabetically

Contract References are a bounded page ordered prefix-matches-first, then substring matches, each alphabetical, so the list stays stable as the user keeps typing.

Contract The symbol id is stable across re-ingests — store that, never the label, when persisting what a user picked.

document v1.0.0

project-write

Ingest a document

document_ingestPull a document into the project's corpus so its factions, cells, and entities feed the memory graph.

FieldTypeRequiredDescription
sourcestringrequireddocument url or file reference to ingest

Contract Dispatch only starts the ingestion: the source ingests on a detached task the response names, so poll that task rather than treating the dispatch as a completed ingest.

memory v1.0.0

read

Query memory

memory_queryRead the project's Atlas memory. With a query, returns the cells, entities, and artifacts ranked relevant to it, each carrying its ids as provenance; without one, lists cells (units of knowledge) or entities as a windowed dump. Scoped to the project the connection is bound to.

FieldTypeRequiredDescription
kindstringoptionallist mode: what to read — 'cells' (default) or 'entities'
querystringoptionalnatural-language question or task; when present, results come ranked by relevance to it instead of as a paged dump
budgetnumberoptionalquery mode: approximate token ceiling the ranked response packs to (default 4096)
cursorstringoptionallist mode: the nextCursor from a prior dispatch, to continue the window

Contract List reads are windowed: a dispatch returns one bounded page of items plus a nextCursor; pass the returned cursor to continue and treat an empty nextCursor as the final page — a single dispatch is never the whole memory.

Contract Query reads are budgeted, not paged: the response packs the most relevant cells, entities, and artifacts into the requested token budget and stops — dispatch again with a refined query rather than a cursor.

Versioning

Versioned families, contractual retirement.

Endpoint families carry three-part versions. An endpoint or version retires only on a published notice of at least 30 days.

Current versions

  • artifact — v1.0.0
  • code — v1.0.0
  • document — v1.0.0
  • memory — v1.0.0

Scheduled retirements

None — every listed version is current under the 30-day-notice contract.