Ideas · Builder Notes

Kognita 0.3 build day: the AI gateway, the MCP proxy and replay

One long day of Kognita alpha 0.3 work: run budgets and real approval holds, classifier envelopes, an OpenAI-compatible gateway, an MCP proxy, pinned evidence and a reconstruction report.

Context

The roadmap from the week before promised two things 0.2 could not do: put free-text model traffic under policy, and let a supervisor reconstruct one interaction from evidence. On 4 October I worked through the 0.3 list in thirteen pull requests, in the order the later pieces depended on.

Decisions, in order

  • Approval is two gates. A HUMAN_APPROVAL hold now returns nothing and retrieves nothing; a resume through continue_run executes only when the grant is live. Runs carry call, token, cost, time and classification budgets, and a breach is a DENY that cites the budget.
  • The classifier fills in labels and nothing else. It records model id, calibration version, label, confidence and an input hash, and it never reads identity, purpose or subject from text, because a purpose token in prose could turn a denial into an allow.
  • The AI gateway decides before it forwards. Agents change base_url to kognita serve; there is no TLS interception. On allow the egress guard redacts, the response is classified on the way back, and if the evidence store cannot record the call, the call does not happen.
  • The MCP proxy contacts a backend only after a release. Deny, escalate and an ungranted approval all look the same to the backend: silence.
  • Evidence is pinned. Each check records the hash of the policy row as evaluated, in-place edits of a policy that has decided anything are refused, and supersede_policy writes a new effective-dated row. Retrieval records content hashes and the embedding model.
  • kognita evidence reconstruct answers the ten questions for one interaction and prints 'not recorded' where the data does not exist yet.

Smaller calls that mattered

A use case can opt into a degraded mode while the store is down, limited to a local model with no client data. There is still no mode that forwards a call without a decision. A missing or empty purpose list now denies everything; before, the emptiest configuration was the most permissive one. Late in the evening I closed four Tier 0 defects: the vector index kept in step on the embedding write path, foreign keys on evidence payload references, and tests proving that two older defect notes (entitlements failing open, engages missing from the protocol) had already been fixed in code. I also shipped a governed-agent demo that runs allow, deny, tamper detection and redaction on a laptop, using the same code path as the library.

Open

Calibration of the pattern classifier is basic. The free-text purpose list was a stop-gap, and the 0.4 register replaced it within two weeks. Token caps waited until the gateway could report real usage. Reconstruction still printed 'not recorded' for origination, RM review and client communication.

If I did the day again I'd skip the purpose list and build the register straight away. Everything else held up.

All ideasEmail Ahmed