MemClaw / docs
API Reference

Keystones

GET / POST / DELETE /api/v1/memclaw/keystones — mandatory governance rules.

Keystones are MANDATORY policy rules served to every agent on session start. See Concepts → Keystones for what they're for and how scope + weight + trust gating work.

List

Open (no trust gate). The plugin fetches this on every session boot.

GET
/api/v1/memclaw/keystones

Authorization

APIKeyHeader
X-API-Key<token>

In: header

Query Parameters

tenant_id*Tenant Id
fleet_id?string|null
agent_id?string|null

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/memclaw/keystones?tenant_id=string"
null
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Upsert

Trust ≥ 1 for scope=agent targeting the caller's own agent_id; trust ≥ 2 otherwise.

POST
/api/v1/memclaw/keystones

Authorization

APIKeyHeader
X-API-Key<token>

In: header

Header Parameters

X-Agent-ID?string|null

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://loading/api/v1/memclaw/keystones" \  -H "Content-Type: application/json" \  -d '{    "tenant_id": "string",    "doc_id": "string",    "title": "string",    "content": "string",    "scope": "tenant",    "weight": "low"  }'
null
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Delete

Same dynamic trust gating as upsert. The platform fetches the stored row first to read its scope/agent_id before computing the required trust level.

DELETE
/api/v1/memclaw/keystones/{doc_id}

Authorization

APIKeyHeader
X-API-Key<token>

In: header

Path Parameters

doc_id*Doc Id
Match^[a-z0-9][a-z0-9._-]{0,99}$

Query Parameters

tenant_id*Tenant Id

Header Parameters

X-Agent-ID?string|null

Response Body

application/json

application/json

curl -X DELETE "https://loading/api/v1/memclaw/keystones/string?tenant_id=string"
null
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

On this page