Skip to main content
DocumentationMemory · api.us.ccsio.ai

Memory policy

The organization's memory policy and usage.

Documentation menu

The descriptions of the operations and fields are the contract’s own, in English.

GET/memory/v1/policy

Read the organization's memory policy

Credential
API key
Permission
memory.read

Answers the organization's policy; an organization that never saved one reads the defaults.

curl
curl "https://api.us.ccsio.ai/memory/v1/policy" \
  -H "Authorization: Bearer $CCSIO_API_KEY"

Parameters

NameInDescription
X-Request-ID
optional
headerstring

Optional request ULID. A valid ULID (upper or lowercase) is honored; when the header is absent or invalid, the runtime mints the id. The response X-Request-ID header carries the canonical uppercase form.

Responses

  • 200

    The policy.

    Schema
    MemoryPolicy
    • enabledbooleanrequired

      False turns the member-facing memory off: creating, editing, accepting and recalling answer 403 memory-disabled; reading, exporting and erasing keep working.

      default true

    • capturestringrequired

      Automatic capture of memories from conversations. Off until an admin turns it on; nothing is captured while zero content retention is on.

      Allowed values: "off""on"

      default "off"

    • review_requiredarray of stringrequired

      The owner kinds whose new memories start as proposals and are served only after a reviewer accepts them.

      Allowed values: "team""org"

      default ["team","org"]

    • retention_daysobjectrequired

      How long a memory of each owner kind is kept when it has no ttl_days of its own.

      • userintegerrequired

        1 to 3650 · default 365

      • agentintegerrequired

        1 to 3650 · default 365

      • teamintegerrequired

        1 to 3650 · default 730

      • orgintegerrequired

        1 to 3650 · default 730

    • session_ttl_hoursintegerrequired

      1 to 720 · default 24

    • profile_budget_tokensintegerrequired

      The budget of the profile, per scope.

      100 to 8000 · default 1000

    • agents_may_write_user_scopebooleanrequired

      Whether agents may write active memories to a member's own scope. Default true. Switching it off applies to every member, whatever their own agents_may_write: what an agent writes to a member's scope is then stored as `proposed`, and the member accepts or rejects it. Each member can also switch their own agents off with agents_may_write in their settings.

      default true

  • 401

    The request carries no credential, more than one, or one the platform does not accept, and is refused before the operation runs; `error.code` says why. Supply exactly one credential. Codes: invalid-request (no credential, or both Authorization:

    Read more

    Bearer and x-api-key), api-key-invalid (a value that is not a platform API key, or a key of a kind the platform does not accept), api-key-unknown, api-key-revoked, api-key-expired, bootstrap-disabled (the one-shot installation credential, once a key exists), token-malformed (a bearer token that is not a JWT), token-algorithm-unsupported, token-signature-invalid, token-claim-invalid, token-issuer-mismatch, token-audience-mismatch, token-expired, token-not-yet-valid, issuer-untrusted, issuer-residency-mismatch (the issuer belongs to another plane), issuer-resolution-unknown, jwks-unavailable, jwks-key-not-found, staff-token-inactive (a platform operator's token), staff-not-operator, staff-directory-unavailable, identity-not-provisioned (a verified identity with no account on this plane), organization-not-found (a verified identity or key whose organization this plane does not know), internal-error (a fault while the credential is checked is refused too, fail closed), context-cancelled

  • 402

    The organization has to pay first: its standing is payment_required.

    Read more

    The request boundary applies this payment gate to every route except an organization's billing routes, the caller's own context, organization list, onboarding, session report and personal keys, the public routes, and the routes of platform operators, who administer an organization that has to pay. The operations the gate covers declare this response. On /v1 the refusal is rendered in the OpenAI error format. Code: payment-required

  • 403

    No role of the caller holds `memory.read` in the organization. Codes: policy-denied

  • 404

    The plane has no memory database configured (MEMORY_DATABASE_URL), so the Memory M1 routes are off. Codes: memory-not-enabled

  • 405

    The path is claimed but the request method is not allowed. Go ServeMux returns its standard plain-text response and lists permitted methods in Allow.

  • 500

    Platform failure. Codes: internal-error

PUT/memory/v1/policy

Replace the organization's memory policy

Credential
API key
Permission
memory.manage
Request body
Body up to 1 MiB

Replaces the organization's policy and answers it. Every member is required. Lowering a retention applies to memories as they expire; nothing is erased at once. The body is capped at 1048576 bytes.

curl
curl -X PUT "https://api.us.ccsio.ai/memory/v1/policy" \
  -H "Authorization: Bearer $CCSIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "enabled": false,
  "capture": "off",
  "review_required": [
    "team"
  ],
  "retention_days": {
    "user": 0,
    "agent": 0,
    "team": 0,
    "org": 0
  },
  "session_ttl_hours": 0,
  "profile_budget_tokens": 0,
  "agents_may_write_user_scope": false
}'
Built from the schema’s required members: replace the values.

Parameters

NameInDescription
X-Request-ID
optional
headerstring

Optional request ULID. A valid ULID (upper or lowercase) is honored; when the header is absent or invalid, the runtime mints the id. The response X-Request-ID header carries the canonical uppercase form.

Request body application/json

MemoryPolicy
  • enabledbooleanrequired

    False turns the member-facing memory off: creating, editing, accepting and recalling answer 403 memory-disabled; reading, exporting and erasing keep working.

    default true

  • capturestringrequired

    Automatic capture of memories from conversations. Off until an admin turns it on; nothing is captured while zero content retention is on.

    Allowed values: "off""on"

    default "off"

  • review_requiredarray of stringrequired

    The owner kinds whose new memories start as proposals and are served only after a reviewer accepts them.

    Allowed values: "team""org"

    default ["team","org"]

  • retention_daysobjectrequired

    How long a memory of each owner kind is kept when it has no ttl_days of its own.

    • userintegerrequired

      1 to 3650 · default 365

    • agentintegerrequired

      1 to 3650 · default 365

    • teamintegerrequired

      1 to 3650 · default 730

    • orgintegerrequired

      1 to 3650 · default 730

  • session_ttl_hoursintegerrequired

    1 to 720 · default 24

  • profile_budget_tokensintegerrequired

    The budget of the profile, per scope.

    100 to 8000 · default 1000

  • agents_may_write_user_scopebooleanrequired

    Whether agents may write active memories to a member's own scope. Default true. Switching it off applies to every member, whatever their own agents_may_write: what an agent writes to a member's scope is then stored as `proposed`, and the member accepts or rejects it. Each member can also switch their own agents off with agents_may_write in their settings.

    default true

Responses

  • 200

    The policy.

    Schema
    MemoryPolicy
    • enabledbooleanrequired

      False turns the member-facing memory off: creating, editing, accepting and recalling answer 403 memory-disabled; reading, exporting and erasing keep working.

      default true

    • capturestringrequired

      Automatic capture of memories from conversations. Off until an admin turns it on; nothing is captured while zero content retention is on.

      Allowed values: "off""on"

      default "off"

    • review_requiredarray of stringrequired

      The owner kinds whose new memories start as proposals and are served only after a reviewer accepts them.

      Allowed values: "team""org"

      default ["team","org"]

    • retention_daysobjectrequired

      How long a memory of each owner kind is kept when it has no ttl_days of its own.

      • userintegerrequired

        1 to 3650 · default 365

      • agentintegerrequired

        1 to 3650 · default 365

      • teamintegerrequired

        1 to 3650 · default 730

      • orgintegerrequired

        1 to 3650 · default 730

    • session_ttl_hoursintegerrequired

      1 to 720 · default 24

    • profile_budget_tokensintegerrequired

      The budget of the profile, per scope.

      100 to 8000 · default 1000

    • agents_may_write_user_scopebooleanrequired

      Whether agents may write active memories to a member's own scope. Default true. Switching it off applies to every member, whatever their own agents_may_write: what an agent writes to a member's scope is then stored as `proposed`, and the member accepts or rejects it. Each member can also switch their own agents off with agents_may_write in their settings.

      default true

  • 400

    A body that is not strict JSON, a member missing or outside its range. Codes: invalid-request

  • 401

    The request carries no credential, more than one, or one the platform does not accept, and is refused before the operation runs; `error.code` says why. Supply exactly one credential. Codes: invalid-request (no credential, or both Authorization:

    Read more

    Bearer and x-api-key), api-key-invalid (a value that is not a platform API key, or a key of a kind the platform does not accept), api-key-unknown, api-key-revoked, api-key-expired, bootstrap-disabled (the one-shot installation credential, once a key exists), token-malformed (a bearer token that is not a JWT), token-algorithm-unsupported, token-signature-invalid, token-claim-invalid, token-issuer-mismatch, token-audience-mismatch, token-expired, token-not-yet-valid, issuer-untrusted, issuer-residency-mismatch (the issuer belongs to another plane), issuer-resolution-unknown, jwks-unavailable, jwks-key-not-found, staff-token-inactive (a platform operator's token), staff-not-operator, staff-directory-unavailable, identity-not-provisioned (a verified identity with no account on this plane), organization-not-found (a verified identity or key whose organization this plane does not know), internal-error (a fault while the credential is checked is refused too, fail closed), context-cancelled

  • 402

    The organization has to pay first: its standing is payment_required.

    Read more

    The request boundary applies this payment gate to every route except an organization's billing routes, the caller's own context, organization list, onboarding, session report and personal keys, the public routes, and the routes of platform operators, who administer an organization that has to pay. The operations the gate covers declare this response. On /v1 the refusal is rendered in the OpenAI error format. Code: payment-required

  • 403

    No role of the caller holds `memory.manage` in the organization. Codes: policy-denied

  • 404

    The plane has no memory database configured (MEMORY_DATABASE_URL), so the Memory M1 routes are off. Codes: memory-not-enabled

  • 405

    The path is claimed but the request method is not allowed. Go ServeMux returns its standard plain-text response and lists permitted methods in Allow.

  • 500

    Platform failure. Codes: internal-error

GET/memory/v1/usage

Read the organization's memory usage

Credential
API key
Permission
memory.read

Answers what the organization's memory holds against its plan. It never reads any memory.

curl
curl "https://api.us.ccsio.ai/memory/v1/usage" \
  -H "Authorization: Bearer $CCSIO_API_KEY"

Parameters

NameInDescription
X-Request-ID
optional
headerstring

Optional request ULID. A valid ULID (upper or lowercase) is honored; when the header is absent or invalid, the runtime mints the id. The response X-Request-ID header carries the canonical uppercase form.

Responses

  • 200

    The usage.

    Schema
    MemoryUsage
    • used_bytesintegerrequired

      at least 0

    • limit_bytesinteger or nullrequired

      The plan's limit; null means unlimited (still measured).

      at least 0

    • percentnumber or nullrequired

      used_bytes over limit_bytes, as a percentage; null when limit_bytes is null. At 100 new writes are refused with 409 memory-capacity-exceeded; recall and erasure keep working and nothing is deleted.

      at least 0

    • memory_countintegerrequired

      Active memories.

      at least 0

  • 401

    The request carries no credential, more than one, or one the platform does not accept, and is refused before the operation runs; `error.code` says why. Supply exactly one credential. Codes: invalid-request (no credential, or both Authorization:

    Read more

    Bearer and x-api-key), api-key-invalid (a value that is not a platform API key, or a key of a kind the platform does not accept), api-key-unknown, api-key-revoked, api-key-expired, bootstrap-disabled (the one-shot installation credential, once a key exists), token-malformed (a bearer token that is not a JWT), token-algorithm-unsupported, token-signature-invalid, token-claim-invalid, token-issuer-mismatch, token-audience-mismatch, token-expired, token-not-yet-valid, issuer-untrusted, issuer-residency-mismatch (the issuer belongs to another plane), issuer-resolution-unknown, jwks-unavailable, jwks-key-not-found, staff-token-inactive (a platform operator's token), staff-not-operator, staff-directory-unavailable, identity-not-provisioned (a verified identity with no account on this plane), organization-not-found (a verified identity or key whose organization this plane does not know), internal-error (a fault while the credential is checked is refused too, fail closed), context-cancelled

  • 402

    The organization has to pay first: its standing is payment_required.

    Read more

    The request boundary applies this payment gate to every route except an organization's billing routes, the caller's own context, organization list, onboarding, session report and personal keys, the public routes, and the routes of platform operators, who administer an organization that has to pay. The operations the gate covers declare this response. On /v1 the refusal is rendered in the OpenAI error format. Code: payment-required

  • 403

    No role of the caller holds `memory.read` in the organization. Codes: policy-denied

  • 404

    The plane has no memory database configured (MEMORY_DATABASE_URL), so the Memory M1 routes are off. Codes: memory-not-enabled

  • 405

    The path is claimed but the request method is not allowed. Go ServeMux returns its standard plain-text response and lists permitted methods in Allow.

  • 500

    Platform failure. Codes: internal-error

Generated from the platform contracts at commit 5954fbc1.

Explore the platform

Get your first API key

Registration is open. Four steps to your first call: create your account, create your organization, create your API key, and start using it.

  1. 01Create your account
  2. 02Create your organization
  3. 03Create your API key
  4. 04Start using it