instance: granollers.okai
MODERN PROTOCOL FOR AI SYSTEMS
Open Knowledge for AI
OKAI SERVICE

Limits

Operational limits governing OKAI Message Delivery, token measurement, external resources and request frequency.

Límits operatius que regulen el Delivery dels OKAI Message, el recompte de tokens, els recursos externs i la freqüència de requests.

no active execution
Delivery Limit

OKAI SERVICE limits each OKAI Message to a maximum of 50,000 tokens.

OKAI SERVICE limita cada OKAI Message a un màxim de 50.000 tokens.

Maximum OKAI Message 50,000 tokens
Token encoding o200k_base

The limit exists for operational safety and cost control.

It prevents a single request from producing an uncontrolled message size and establishes a known boundary for M2M transport and processing.

El límit existeix per seguretat operativa i control de cost.

Evita que un únic request produeixi un missatge de mida descontrolada i estableix una frontera coneguda per al transport i processament M2M.

The 50,000-token limit applies to Delivery, not to the question, the EXPEDIENT or the number of detections.

Els 50.000 tokens són un límit de Delivery, no un límit de la question, de l'EXPEDIENT ni del nombre de deteccions.

Token Measurement

The limit is checked against the final serialized WorldResultPayload returned by the API.

El límit es comprova sobre el WorldResultPayload final serialitzat retornat per l’API.

WORLD RESULT PAYLOAD
     │
     ▼
JSON serialization
     │
     ▼
o200k_base
     │
     ▼
token count
     │
     ├── ≤ 50,000 → deliver
     │
     └── > 50,000 → reduce delivery

The token count is not an estimate based on Detection, Resolution or PROJECT.

It is calculated from the final representation that will be transported, including Delivery metadata and token_control.

The same measurement and Delivery process applies to valid GET and POST invocations.

El recompte no és una estimació sobre Detection, Resolution o PROJECT.

Es calcula sobre la representació final que serà transportada, incloent les metadades de Delivery i token_control.

El mateix procés de mesura i Delivery s’aplica a les invocacions GET i POST vàlides.

Exceeding The Limit

When the EXPEDIENT contains multiple resolved packages and the complete message would exceed the limit, Delivery selects the longest prefix that can be transported within 50,000 tokens.

Quan l'EXPEDIENT conté diversos resolved packages i el missatge complet excediria el límit, Delivery selecciona el prefix més llarg que pot ser transportat dins dels 50.000 tokens.

EXPEDIENT

[A] [B] [C] [D]

        │
        │ complete delivery > 50K
        ▼

[A] [B] [C]        DELIVERED
[D]                 DEFERRED

The selection strictly preserves the original order.

La selecció conserva estrictament l'ordre original.

ALLOWED

[A B C D]
[A B C]
[A B]
[A]

NOT ALLOWED

[A C]
[B C]
[B]
reordering
scoring
priority selection
combination search

Delivery does not decide which packages are more important.

It only reduces the prefix while preserving the EXPEDIENT order.

The Delivery limit does not introduce inference, scoring or semantic decision-making.

Delivery no decideix quins paquets són més importants.

Només redueix el prefix preservant l'ordre de l'EXPEDIENT.

El límit de Delivery no introdueix inferència, scoring ni decisió semàntica.

Deferred

Resolved packages that fall outside the transported prefix are identified as deferred.

deferred does not mean an error or unresolved knowledge.

It indicates that the package belongs to the EXPEDIENT but cannot be included in this OKAI Message without exceeding the contractual limit.

Els resolved packages que queden fora del prefix transportat s'identifiquen com a deferred.

deferred no significa error ni coneixement no resolt.

Indica que el paquet pertany a l'EXPEDIENT, però no pot ser inclòs en aquest OKAI Message sense superar el límit contractual.

DELIVERED
[A] [B] [C]

DEFERRED
[D]

reason: protocol_request_limit
action: new_request

action: new_request indicates that the consumer must perform a new M2M invocation to request the package.

It does not represent a conversational continuation of the current EXPEDIENT.

action: new_request indica que el consumidor ha de realitzar una nova invocació M2M per sol·licitar el paquet.

No representa una continuació conversacional de l'EXPEDIENT actual.

Single Package Invariant

An individual resolved package must be transportable within a single OKAI Message.

Un resolved package individual ha de poder ser transportat dins d'un OKAI Message.

PROJECT[A] > 50,000 tokens

This case is NOT deferred.

It is an internal structural violation because Delivery has no smaller prefix that can be transported.

Aquest cas NO és deferred.

És una violació estructural interna perquè Delivery no disposa de cap prefix menor que pugui transportar.

External Resources

OKAI can provide references to external resources through DATA using the REFERENCED model.

These resources are distributed independently of the OKAI Message Delivery mechanism.

OKAI pot proporcionar referències a recursos externs mitjançant DATA utilitzant el model REFERENCED.

Aquests recursos es distribueixen independentment del mecanisme de Delivery dels OKAI Message.

Resource Delivery

External resources are not subject to the 50,000-token OKAI Message Delivery Limit.

Delivery counts the tokens of the references included in the OKAI Message, but not the content of the referenced resources.

Els recursos externs no estan subjectes al límit de Delivery de 50.000 tokens dels OKAI Message.

Delivery comptabilitza els tokens de les referències incloses a l'OKAI Message, però no el contingut dels recursos referenciats.

Resource Token Measurement

JSON resources can be measured using the same token encoding as OKAI:

Els recursos JSON es poden mesurar utilitzant la mateixa codificació de tokens que OKAI:

o200k_base

Token measurement is performed on the exact serialized JSON resource content.

El recompte de tokens es realitza sobre el contingut exacte del recurs JSON serialitzat.

Exceeding 50,000 Tokens

When an external JSON resource exceeds 50,000 tokens, an informational warning may be provided to indicate that the resource exceeds the OKAI Message Delivery threshold.

This warning does not prevent access to the resource.

It does not activate Delivery prefix reduction or deferred mechanisms.

The 50,000-token threshold is informational for external resources, not an enforced resource size limit.

The concrete mechanism for publishing this warning is not currently implemented.

Quan un recurs JSON extern supera els 50.000 tokens, es pot proporcionar un avís informatiu per indicar que el recurs supera el llindar de Delivery dels OKAI Message.

Aquest avís no impedeix accedir al recurs.

No activa els mecanismes de reducció de prefix ni de deferred de Delivery.

El llindar de 50.000 tokens és informatiu per als recursos externs, no un límit obligatori de mida del recurs.

El mecanisme concret per publicar aquest avís encara no està implementat.

EXTERNAL RESOURCE
        │
        ▼
JSON resource
        │
        ▼
o200k_base
        │
        ▼
token count
        │
        ├── ≤ 50,000 → normal resource
        │
        └── > 50,000 → informational warning
                          │
                          └── resource remains accessible
Request Rate

OKAI SERVICE currently does not define a per-consumer request rate limit.

The following limits are not contractually defined:

Actualment OKAI SERVICE no defineix un límit de requests per minut per consumidor.

No hi ha contractualment definit:

  • requests / minute
  • requests / second
  • concurrent request quota
IMPORTANT:

The maximum request frequency is not stipulated in the current contract.

La freqüència màxima de requests no està estipulada en el contracte actual.

Rate limiting, waiting, queuing or temporary rejection policies for new connections may be defined in future versions of the service.

They are not currently part of the contract.

Polítiques de rate limiting, espera, cua o rebuig temporal de noves connexions poden definir-se en versions futures del servei.

Actualment no formen part del contracte.

Infrastructure Protection / Protecció de la Infraestructura

Regardless of the absence of contractual request rate limits, the server infrastructure may apply technical restrictions to ensure security, stability and service availability.

These restrictions are operational protection measures and do not constitute contractual request quotas or service guarantees.

Independentment de l'absència de límits contractuals de freqüència de requests, la infraestructura del servidor pot aplicar restriccions tècniques per garantir la seguretat, l'estabilitat i la disponibilitat del servei.

Aquestes restriccions són mesures de protecció operativa i no constitueixen quotes contractuals de requests ni garanties de servei.

Conceptual Summary / Resum Conceptual
LIMITS

Delivery Limit
└── 50,000 tokens / OKAI Message
    ├── operational safety
    └── cost control

Token Measurement
└── final serialized WorldResultPayload
    └── o200k_base

Exceeding the Limit
└── strict prefix reduction
    ├── preserve order
    └── excluded → deferred

Single Package Invariant
└── > 50K → structural internal error

External Resources
└── independent from OKAI Message Delivery
    ├── not subject to the 50K Delivery Limit
    ├── token measurement: o200k_base
    └── > 50K → informational warning
        ├── resource remains accessible
        └── no deferred mechanism

Request Rate
└── not currently stipulated

Infrastructure Protection
└── operational restrictions may apply
    └── not contractual quotas or service guarantees
© 2026 Denys Sanz · Tots els drets reservats OKAI — Protocol M2M v0.3.2