Latency & SLA
Honest, per-endpoint latency guidance and the production pattern for keeping memory off your user's response path. Retrieval is fast; fact extraction is LLM-bound, so run it asynchronously.
/v1/memories/process in synchronous mode.01. Measured in production
These are measurements, not guarantees. Each row says when and how it was taken; all are from the production API on 18 October 2026, after that day's search latency release. Collection size, query type, network distance and concurrency all change the numbers, so measure your own workload with the response headers described below.
| What | Result | How and when it was measured |
|---|---|---|
POST /v1/search, one client | p50 0.24 s (short facts), 0.40 s (document-heavy) | Morning (UTC), right after the release: end-to-end client round trips over the public internet, on one account holding short conversation facts and one whose memories are mostly document chunks, without cache hits. Measured before quality mode began reading candidates with a relevance model (20 October 2026), so today these rows describe fast: true. A search that leaves fast unset runs in quality mode and takes longer (see per-endpoint guidance); a repeated identical search is served from the cache. |
| Mixed traffic, 4 concurrent clients | search p50 253 ms, p95 748 ms | Afternoon (UTC): 150 seconds of traffic over the public internet, 60% /v1/search, 25% /v1/chat/completions, 15% /v1/chat/ask, spread over 3 test accounts, with the API at its minimum of 3 tasks. No errors. Chat completions p50 2.7 s, p95 4.1 s. |
| Mixed traffic, 8 concurrent clients | search p50 320 ms, p95 1,075 ms | The same run at 8 concurrent clients. No errors. Chat completions p50 3.0 s, p95 4.8 s; ask p50 5.4 s, p95 14.1 s. |
POST /v1/search, scheduled canary | p95 176 ms (daily), 179 ms (weekly) | Canary runs at about 18:00 UTC, inside AWS in the API's region, across 8 isolated test tenants with 20 to 25 seeded memories each: daily for 10 minutes at 4 requests/s with 8 concurrent clients, weekly for 15 minutes at 5 requests/s with 32. Before the release the same canary measured 1.4 to 3.4 s. |
POST /v1/memories/raw with wait_for_index: true | p95 624 ms (daily), 625 ms (weekly) | The same canary runs; 5% of their traffic is these writes, which return once the memory is indexed. |
POST /v1/memories/process until searchable | 2.4 s, 3.6 s and 4.7 s | Three runs of our customer-report reproduction on production: time from the request until /v1/search, polled about once a second, returned the extracted fact. These were short inputs on the platform's models. A longer transcript, a busier queue or your own provider key's model can take several times as long, so wait on the job only in tests and save in the background on the hot path. |
02. What is fast, what is LLM-bound
- Fast (retrieval path). Search, raw writes, and reads combine retrieval, fusion, filters, and optional ranking stages. The fast-search release objective is p95 at or below 750ms; it is an engineering target, not a per-request or contractual guarantee.
- LLM-bound (write/reasoning path). Fact extraction, conflict resolution, and dialectic reasoning call a reasoning model. These are seconds, not milliseconds, and they are exactly the operations you should run in the background.
03. Per-endpoint guidance
Engineering objectives and endpoint behavior, not a universal observed latency distribution or contractual guarantee. Cold starts, dependency delays, geography and large batches can run higher.
| Endpoint | Objective / behavior | Class | Mode |
|---|---|---|---|
POST /v1/search (fast: true) | ≤750ms p95 objective | Retrieval | Inline (hot path) |
POST /v1/search (fast unset or false: quality mode) | Fast-mode retrieval plus one relevance model call on an uncached search, typically one to two seconds more, varying with the model's response time | Retrieval + relevance model | Inline when the turn can wait; fast: true when it cannot |
POST /v1/search/reason | 30s server reasoning budget, or deadline_ms when shorter | Retrieval + verification + LLM | 200 with reasoning_status partial or timed_out at the budget |
POST /v1/learning/decisions | ≤1000ms p95 engineering objective | Scoped evidence + selection | No LLM call; not a contractual SLA |
POST /v1/memories/raw (async index) | ≤750ms p50 objective | Durable write | Returns searchable + status_url |
POST /v1/memories/raw (wait_for_index) | Up to 5s default index wait, plus processing | Write + index | 201 if ready, otherwise 202 |
GET /v1/memories/{id} | sub-second | Read | Inline |
POST /v1/chat/completions (non-stream) | 30s generation / 45s total default deadlines | LLM + retrieval | Timeout fails with 504; not fabricated success |
POST /v1/chat/completions (stream) | <1500ms first-content p95 objective | LLM + retrieval | Stream tokens |
POST /v1/memories/process (sync) | ~7–22s | LLM extraction | Use async → |
POST /v1/memories/process (async default) | sub-second 202 target | Queued | Background |
POST /v1/profile/dialectic | ~10–14s | LLM reasoning | Background / await |
PATCH /v1/memories/{id} | ≤1.5s response objective | Durable update + re-index | 200 if ready, otherwise 202 + status_url |
No sub-50ms end-to-end search guarantee is made. An isolated lookup timing does not include hybrid retrieval, reranking, networking or generation. Measure against your own clients using Server-Timing, X-Process-Time, X-Hebbrix-TTFT-Target-Ms, and X-Hebbrix-Degraded-Stages response headers.
04. Timeouts, retries and fallbacks
Use the endpoint the request can wait for. POST /v1/search is a read with no answer generation: use it to fetch memory for your own model in an interactive turn, where the reply's latency stays under your control. POST /v1/search/reason reads, verifies and composes a cited answer, so it calls models and takes longer; a multi-part question costs more there, because each part is retrieved and verified. For an interactive turn, prefer /v1/search, or split the question.
Reason's response budget
Reason works within its own response budget: the server's reasoning budget (REASONING_TIMEOUT_SECONDS, 30 s by default), or your deadline_ms when it is shorter. Set deadline_ms from your own budget for the turn, not from a typical response time. Every model stage waits at most what is left of the budget and falls back when it runs out, so the response comes back on time, as a 200, with what it has:
reasoning_status: "completed": every stage finished within the budget.reasoning_status: "partial": the answer was composed, with a stage cut short (timings.budget_cut_stages).answer_statusstill applies.reasoning_status: "timed_out":answerisnull,abstain_reasonisreasoning_timed_out, andsourcesare ordinary search results, not verified evidence. Treat it as an abstention: fall back to/v1/search, or say you could not check in time.
Client timeouts
Give every request its own timeout, derived from the server's bound for that request, and one overall budget per chatbot turn or agent step that the retries spend. A client timeout alone returns nothing and leaves the server working on a reply no one reads; deadline_ms returns what it has.
| Request | Client timeout |
|---|---|
POST /v1/search | Your turn's budget. It is a read with no answer generation; collections of long records need a longer one. |
POST /v1/search/reason with deadline_ms | A little above deadline_ms, so the server's reply (partial or timed_out included) arrives before your client gives up. |
POST /v1/search/reason without deadline_ms | Above the server's 30 s reasoning budget: 35-40 s. Cancelling earlier wastes the work. |
A write with wait_for_index: true | Above its observation window (on /v1/memories/process, index_wait_seconds: 5 s by default, at most 20 s). index_wait_outcome says why the wait ended. |
GET of a receipt, a job or the collection's readiness | Short. Poll again after Retry-After rather than waiting longer on one request. |
Retries
/v1/search and /v1/search/reason are reads, so they are safe to retry. Retry a timeout, a 429 or a 5xx with capped exponential backoff and jitter, honouring Retry-After, inside one overall budget for the turn, and in one layer of your stack only: an HTTP client, a framework and your own code that each retry multiply the attempts. Decide from the status and the body, never from the wording of a message:
| Response | Retry? | How |
|---|---|---|
| No response (client timeout, connection reset) | Reads: yes. Writes: only with the same Idempotency-Key and body. | Capped exponential backoff with jitter. A write retried with its key replays the original receipt and writes nothing again. |
429 | Yes | After Retry-After. |
503 with error: "reasoning_failed" (retryable: true) | Yes, the same request | After Retry-After (also retry_after_seconds), backing off exponentially with jitter (2 s, 4 s, 8 s), at most three attempts. Not billed. Then fall back (below). |
Other 5xx | Yes | Backoff with jitter. |
409 IDEMPOTENCY_REQUEST_IN_PROGRESS | Yes, with the same key | After Retry-After. Never with a new key: the first request may still be writing. |
409 IDEMPOTENCY_KEY_REUSED, any other 4xx | No | The request itself must change. |
202 from a write (wait_for_index: true) | No: never send the content again | The write is durable. Poll its readiness_url or status_url. |
200 with answer_status: "indexing" | Later | Poll the batch receipt or the collection's readiness (honour Retry-After), then ask again. |
200 with reasoning_status: "timed_out" | Not with the same deadline | A longer deadline_ms, or /v1/search. |
200 with reasoning_status: "partial", or an abstention (no_relevant_memory, unverified, conflicting, superseded) | No | It is the response to that question; the same question returns the same one while the memories are unchanged. |
A 503 with reasoning_failed means a dependency of Reason (the evidence verifier or the model) did not answer, never a verdict on the memories. One transient verifier timeout is already retried inside the request, so a 503 means the dependency stayed unavailable for that request. Its body says how to retry:
{"error": {"type": "http_exception", "status_code": 503, "request_id": "...",
"message": {"error": "reasoning_failed", "retryable": true,
"retry_after_seconds": 2, "cause": "evidence_verifier_unavailable",
"error_id": "..."}}}Fallbacks
An interactive chatbot. A turn has one deadline the user feels:
- Ask
/v1/search/reasonwithdeadline_msset to what is left of the turn, or/v1/searchand your own model when the turn cannot afford composition. - On
timed_out, or a503still failing within the turn, search with the same scope and answer from the usable rows (see when to answer). Fast search (fast: true) is the quickest read when you cannot wait. - When no memory read succeeds in time, say you could not check right now. Never say that nothing is stored: a failure is not evidence of absence.
A multi-step agent. A step can usually wait longer than a chat turn, and its answer may drive an action:
- Use a longer
deadline_ms(up to the server's budget) for decisions that need composition and verification, and/v1/searchfor reads it reasons over itself. - Act only on
answer_finality: "final"when the step must cover the whole relevant scope or has side effects (money, health, permissions, sending, deleting). Otherwise wait on the batch receipt or the collection's readiness, honouringRetry-After, then ask again; when the step's own deadline passes first, hand the decision to a person instead of acting. - Send an
Idempotency-Keywith every write, resend a timed-out write with the same key and body, and keep eachoutbox_event_id,job_idand receipt URL in the agent's state, so a restarted step resumes polling instead of writing again. - When Reason stays unavailable (
503after its retries), retry the step later or fall back to/v1/search; report the step as not checked, not as unknown.
Measure large histories separately
For procurement, qualify your actual collection sizes and relevant decision density: record owner/collection/context scope, history size (including 10k/100k memory workloads), configured comparable window, top-k, filters, fast versus quality search, optional feature model, cache state, concurrency, client region and deployed build. Report client round-trip p50/p95/p99 separately from server processing, retrieval and generation. Include errors and throttled requests rather than dropping them.
The decision evidence window is bounded at 2,000 comparable records, not a guarantee of constant SQL latency over arbitrarily large histories. More feature categories add computation; dense concurrent writes and dependency delays can exceed objectives. No large-history latency distribution or historical uptime percentage is claimed by this page. Arrange a workload-specific capacity and latency review via contact@hebbrix.com; see current status and support.
05. Production pattern: async extraction
async_dispatch defaults to true on /v1/memories/process. You get a 202 with a job_id and poll_url; poll /v1/memory-jobs/{job_id} (the poll_url; /v1/memories/jobs/{job_id} is an alias) for completion. Your user already has their answer.
Raw ingestion has a separate durability/readiness contract. With wait_for_index: false (the default), the response acknowledges the atomic PostgreSQL and indexing-outbox commit; inspect searchable and poll status_url. With wait_for_index: true, the server-default wait for searchability is up to 5 seconds, plus request processing. It returns 201 if indexing completes or 202 with Retry-After, Location, and outbox_event_id when the durable write is still converging.
import os, time, requests
BASE = "https://api.hebbrix.com/v1"
H = {"Authorization": f"Bearer {os.environ['HEBBRIX_API_KEY']}"}
# 1) Inline: fetch context for THIS turn (fast, hot path)
ctx = requests.post(f"{BASE}/search",
headers=H, json={"query": user_message, "collection_id": "YOUR_COLLECTION_ID", "limit": 5}).json()
# 2) Respond to the user with YOUR LLM (using ctx) ... already done here ...
# 3) Off the hot path: learn from the turn ASYNCHRONOUSLY
job = requests.post(f"{BASE}/memories/process", headers=H, json={
"messages": [
{"role": "user", "content": user_message},
{"role": "assistant", "content": assistant_reply},
],
"collection_id": "YOUR_COLLECTION_ID",
"async_dispatch": True, # explicit; true is currently the default
}).json()
# 4) (Optional) poll for completion in a background worker
job_id = job["job_id"]
while True:
s = requests.get(f"{BASE}/memories/jobs/{job_id}", headers=H).json()
if s["status"] in ("completed", "failed"):
break
time.sleep(1)06. SLA & status
- What we publish.
GET /v1/slois the canonical public contract. It currently describes best-effort service with p95/p99 and availability engineering objectives, not a generic contractual SLA. Signed plan or enterprise terms control. - Observability. Every response carries
X-Process-Time(server ms) andX-Request-ID. Chat additionally reports stage timings and any degraded stages. Measure real latency from your own clients and include the request id and deployed build header when reporting a slow call.