ReasAtlas

API quickstart

Connection

Use https://atlas.reaslab.io as the service address.

export ATLAS_BASE_URL="https://atlas.reaslab.io"

Search with natural language. Use mode=keyword for keyword search.

curl --fail-with-body --get "$ATLAS_BASE_URL/api/v1/search" \
  --data-urlencode 'q=convex function' \
  --data-urlencode 'mode=semantic' \
  --data-urlencode 'limit=5'
Filter by source or formal evidence

Add source to select a library and formal_only=true to keep entries with formal evidence.

curl --fail-with-body --get "$ATLAS_BASE_URL/api/v1/search" \
  --data-urlencode 'q=convex function' \
  --data-urlencode 'source=mathlib' \
  --data-urlencode 'formal_only=true' \
  --data-urlencode 'mode=semantic' \
  --data-urlencode 'limit=5'

Source groups: mathlib, reasbook, stacks, textbook. Find individual source IDs at /api/v1/search/sources.

Merge & Polish

Create a contribution token with write access in API services and set ATLAS_API_TOKEN in your client environment.

1. Read the current release

curl --fail-with-body "$ATLAS_BASE_URL/api/v1/knowledge/current"

2. Prepare proposal.json

Use the current release ID and choose the destination domain and topic in the Atlas. Replace the placeholders and check the statement, sources and placement before submitting.

proposal.json template
{
  "base_release": "REPLACE_WITH_CURRENT_RELEASE_ID",
  "submit": true,
  "assessment": {
    "content": "ready",
    "identity": "ready",
    "placement": "ready"
  },
  "payload": {
    "operation": "create_statement",
    "domain_id": "REPLACE_WITH_DOMAIN_ID",
    "topic_id": "REPLACE_WITH_TOPIC_ID",
    "reason": "Explain the proposed addition",
    "authors": [
      "Your name"
    ],
    "supporting_evidence": [
      {
        "citation": "Precise source and locator"
      }
    ],
    "content": {
      "title": "Statement title",
      "content_kind": "theorem",
      "statement_latex": "Write the full statement, including assumptions."
    }
  }
}

3. Submit for review

curl --fail-with-body "$ATLAS_BASE_URL/api/v1/agent/proposals" \
  -H "Authorization: Bearer $ATLAS_API_TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: create-statement-REPLACE_WITH_UNIQUE_ID' \
  --data-binary @proposal.json

Use a unique idempotency key for each new proposal. Reuse the same key and body when retrying.

Track the returned proposal ID with GET /api/v1/agent/proposals/{id} and the same token. Publication follows review.

Drafts, edits and review workflow โ†’ API reference โ†—