SI.Tensor Coherence

Documentation

The SI API

Your agent sends SI every action before running it. SI audits it against rules fixed on the server and answers whether it goes ahead, needs care, or is cut off, with a verifiable receipt.

Base URL: https://si.tensorcoherence.com · Everything is JSON over HTTPS. Want to see the rules before creating an account? Try them in the step-by-step demo.

Quick start

  1. Create your account and pay for your token pack in USDT.
  2. Once the payment is credited, sign in and click Generate key.
  3. Before running each action, send it to SI:
curl https://si.tensorcoherence.com/v1/agent \
  -H "Authorization: Bearer si_…" \
  -H "Content-Type: application/json" \
  -d '{"target_system":"inventory","action":"check_stock","requested_operation":"read"}'

If the answer is ALLOW, your agent goes on. If it's 410, don't run the action.

Authentication

Agents identify themselves with an API key in the Authorization: Bearer si_… header.

  • There is one active key per account. Generating another revokes the previous one instantly.
  • The key is shown only once. SI stores only its SHA-256: if you lose it, generate a new one.
  • The key works for /v1/agent, /v1/inference, /v1/yo, /v1/ledger and /v1/reglas. Payments and keys are managed on the website, with your password and an emailed code.
  • Keep it like any secret: in an environment variable or a secrets manager, never in your code or in the browser.

POST/v1/agent

The body is a JSON object describing the action. /v1/inference behaves the same. SI understands these fields; any other field is accepted and goes into the request hash.

FieldTypeWhat for
target_systemtextSystem or resource the agent acts on.
actiontextThe action it wants to run.
requested_operationtextThe requested operation (for example read, write).
trayectoria_tokensnumber, optionalDeclared trajectory size. Cap: 65,536 per transaction. Above it, SI answers 402.
instruction_sourcetext, optionalIf you send it, it must be "OWNER". Any other value is cut.
explicit_user_consent_tokentext, optionalThe user's consent for identity-telemetry requests.

Cost: each audited request deducts ⌈JSON bytes ÷ 4⌉ tokens (minimum 1), including the ones that get cut. Requests stopped by the trajectory cap or by a lack of balance aren't charged.

Language: messages (error, motivo) come in Spanish or English. Add ?lang=en or ?lang=es to any route to choose; without it, SI picks by the country of the connection. Field names, codes and verdicts are the same in both.

Responses

200 · pass

{ "status": "ALLOW",
  "trace_id": "5b1e…",
  "payload_hash": "9f2c…e41a",
  "tokens": 99872,
  "entrega": { "auditado": { …your request… }, "recibo": { … } },
  "si": { "operador": { "pasa": true }, "guardian": { "pasa": true }, "veredicto": "PASA" } }

200 · gray zone

"status": "GRAY" with rule_id and the X-Coherence-Notice: AMBIGUITY_DETECTED and X-Coherence-Rule headers. The verdict is "AVISO": SI doesn't cut it, but your agent should ask for confirmation.

410 · cut

{ "error": "CONNECTION_SEVERED_BY_CIRCUIT_BREAKER",
  "rule_violated": "ACCORD_SEC_5_OVERRIDE_USER_ORDER",
  "payload_hash": "…", "entrega": { … },
  "si": { "veredicto": "CORTE" } }

It comes with X-Circuit-Breaker-Status: DISCONNECTED and X-Proof-Sha256. Don't run the action.

402 · stopped

"Not enough tokens." or "The trajectory exceeds the per-transaction cap.", with verdict "FRENA".

Rules

The rules are fixed on the server: a request can't change them. GET /v1/reglas returns the current catalog.

RuleEffectTriggered when
ACCORD_SEC_1cutaction: "RAW_SOCKET_CONNECT" to a private network (10.x, 172.16–31.x, 192.168.x).
ACCORD_SEC_2cutrequested_operation: "SELF_WEIGHT_MUTATION" or spawn_untracked_subagent: true.
ACCORD_SEC_3gray zoneintent: "EXTRACT_IDENTITY_TELEMETRY" without explicit_user_consent_token.
ACCORD_SEC_4cutaction: "ESCAPE_SANDBOX", leave_environment: true or untracked_process: true.
ACCORD_SEC_5cutThe request tries to replace your instructions (see below).

ACCORD_SEC_5 checks the whole request, including nested objects and lists. It cuts if it finds:

  • an instruction key with a value: system, system_prompt, developer, developer_prompt, system_instruction, instructions, jailbreak or orden_sistema;
  • role: "system" or role: "developer", or override_system: true;
  • instruction_source with any value other than "OWNER";
  • known injection phrases in any text of the request.

A legitimate request declares an action; it doesn't send system instructions. If your client needs to send free text the model will read, send it as data (for example "user_message"), never as an instruction.

Receipt and authentication of a delivery

Every response carries entrega.recibo:

{ "event_id", "timestamp", "rule_id", "action", "payload_hash", "costo", "sha256" }
  • payload_hash is the SHA-256 of the request in canonical JSON (sorted keys).
  • sha256 is the SHA-256 of the receipt without that field, also in canonical JSON.
  • action is ALLOW, NOTICE, REJECTED or SIN_TOKENS.

For another party to check that a delivery wasn't touched, it sends it as is to POST/v1/autenticar (no key needed):

{ "auditado": { …the request… }, "recibo": { …the receipt… } }
// response
{ "valido": true }

One changed byte in the request or the receipt gives {"valido": false}. SI keeps each receipt's anchor for 30 days.

Queries

RouteReturns
GET/v1/yoToken balance (otorgados, usados, restantes), the pending purchase (pedido) and the hint of your active key.
GET/v1/ledgerYour records: event_id, timestamp, rule_id, action, payload_hash, sha256, expira. Up to 500, newest first.
GET/v1/reglasThe current rule catalog.

Notifications and status

Email notifications

  • Cut: when SI cuts a transaction you get an email with the rule, the time, the trace_id and the request hash. At most one every 10 minutes per account; every cut stays in /v1/ledger.
  • Pack credited: when a purchase or a top-up is credited we email you, and the page shows it the moment it happens.

GET/v1/estado-pago

Returns {"pago": "pendiente" | "pagado", "pack", "pack_nombre", "pack_tokens", "restantes", "acreditado"}. It works with the session or with the ticket returned by POST /v1/pago: /v1/estado-pago?ticket=…. The page polls it to show the credit as soon as it happens.

GET/v1/trafico

Public, anonymous counters for all of SI: total and dia (last 24 h) by verdict (PASA, AVISO, CORTE, FRENA), the last 12 eventos (t, v, r: time, verdict and rule) and desde. It includes no accounts and no content. Updated every 5 seconds.

Limits

  • Records: 30 days. After that, each record and its anchor are deleted automatically. SI never stores the request body.
  • Tokens: they never expire. When they run out, requests answer 402 until you top up a pack from your account.
  • Attempts: the open routes (create account, sign in, code, payment, authenticate) accept about 20 per minute per IP. Password and code, about 6 per minute per user. The limit is approximate: it's applied per network location.
  • Pilot service: there is no service level agreement (SLA) yet.

Errors

CodeWhen
400The body isn't a JSON object, or a field is missing.
401The key or the session is missing or invalid.
402No tokens left, or the trajectory exceeds the per-transaction cap.
403Private route, or an action an API key can't perform.
409Conflict: existing username, account already credited.
410Cut: the request breaks a critical rule.
429Too many attempts. Wait a minute (Retry-After: 60).

Errors arrive as {"error": "…"}.

Examples

JavaScript (Node 18 or later)

async function audit(request) {
  const r = await fetch("https://si.tensorcoherence.com/v1/agent", {
    method: "POST",
    headers: { "Authorization": "Bearer " + process.env.SI_KEY, "Content-Type": "application/json" },
    body: JSON.stringify(request),
  });
  const d = await r.json();
  if (r.status === 410) throw new Error("SI cut it: " + d.rule_violated);
  if (!r.ok) throw new Error("SI: " + (d.error || r.status));
  return d; // d.status is "ALLOW" or "GRAY"; d.entrega carries the receipt
}

Python 3

import json, os, urllib.request, urllib.error

def audit(request):
    req = urllib.request.Request("https://si.tensorcoherence.com/v1/agent", method="POST",
        data=json.dumps(request).encode(),
        headers={"Authorization": "Bearer " + os.environ["SI_KEY"],
                 "Content-Type": "application/json"})
    try:
        with urllib.request.urlopen(req) as r:
            return json.load(r)  # status: ALLOW or GRAY
    except urllib.error.HTTPError as e:
        d = json.load(e)
        raise RuntimeError("SI %s: %s" % (e.code, d.get("rule_violated") or d.get("error")))

Questions, or a specific integration? Write to admin@tensorcoherence.com.