Agent

Embed limits and errors

Look up embed limits, error statuses, failure stages and recovery actions.

This page covers embed tokens, Kit, iframe and Hosted. The source column distinguishes fixed validation, Dashboard policy and component behavior. Policy values come from the configuration saved for your agent.

Limits

ItemValue and unitSource
external_user_id1–128 characters; ASCII letters, digits or _ . : @ -Issuance validation
ttl_seconds60–3600 seconds, capped by policy ttl_max_seconds; omission uses policy defaultIssuance validation and policy
system_messageText across all text blocks ≤8192 UTF-8 bytesIssuance validation
metadata≤16 keys; keys 1–64 characters, string values ≤512 charactersIssuance validation
budget_cents0 through policy session maximum, in US cents; omission uses policy defaultIssuance validation and policy
Issuance allowed_originsSubset of policy entries, matched exactlyIssuance validation
Policy origins≤50 HTTPS origins; wildcards match one subdomain level without a portEmbed policy
allow_localhostfalse by default; allows HTTP localhost / 127.0.0.1, with optional port, when enabledEmbed policy
max_active_sessions_per_user1–100 active sessions per user; idle history is excludedEmbed policy
per_user_rate_per_min1–600 requests/minute/userEmbed policy
blocked_end_users≤1000 user IDsEmbed policy
monthly_cap_centsNonnegative integer US cents; null means uncapped; UTC calendar monthPolicy and monthly accounting
Page context≤32 items; complete JSON ≤4096 UTF-8 bytesAPI validation; Kit trims oldest entries
Session title / initial eventsTitle ≤500 characters; ≤50 initial plain-text user messagesEmbedded session validation
Attachment picker≤5 files/message; each ≤10 MiB (10,485,760 bytes); PNG, JPEG, GIF, WebP, PDF, TXT, MDKit input validation; the first message of a new session still accepts only plain text
startScreen.promptsFirst 4 displayedKit component
Hosted exchange credential60 seconds, usable onceHosted exchange validation

The monthly action stop_new_sessions rejects new sessions; alert_only does not block them. Dashboard monetary inputs use US dollars; API budget fields use cents. An exhausted session budget stops new work while retaining tool confirmation and interruption.

Server errors

These statuses apply to ordinary HTTP failures. Once a stream opens, errors arrive inside the stream and cannot change its HTTP status. Retryability refers to the original request, before changing configuration or credentials.

EMBED_TOKEN_EXPIRED

401 · Access · No direct retry. The token expired. Refreshable Kit access obtains another token and replays an expiry-failed request at most once. Hosted requires a new host-issued link.

EMBED_TOKEN_REVOKED

401 · Access/stream · Not retryable. Kit stops refreshing. End old access and have the host recheck eligibility. Do not automatically issue tokens to bypass revocation.

EMBED_ORIGIN_NOT_ALLOWED

403 · Origin check · Not retryable. Check scheme, host and port against the policy and any narrower issuance allowlist. After correction, issue again and verify.

EMBED_USER_BLOCKED

403 · Issuance/session creation · Not retryable. An administrator must review the user under Operations → End users. If access should resume, unblock and issue a new token.

EMBED_RATE_LIMITED

429 · Requests/session creation/anonymous issuance · Retry later. Request frequency, active sessions or daily anonymous sessions reached their limit. Wait for the rate window, running sessions or next UTC day respectively.

EMBED_BUDGET_EXHAUSTED

402 · Session work/anonymous issuance · Not retryable. Session budget or daily anonymous spending is exhausted. Review the budget; continue with a new token and session only when authorized, or wait for daily recovery. Do not loop issuance to bypass limits.

EMBED_MONTHLY_CAP_REACHED

402 · Session creation · Not retryable. The monthly cap requires stopping new sessions. An administrator decides whether to change the cap or action, or wait for the next UTC month.

EMBED_FIELD_NOT_ALLOWED

400 · Issuance/session creation · Not retryable. Remove unauthorized agent_override. Embedded session creation accepts only title, time_zone and initial_events. Initial events are plain-text user.message events with optional page context.

Other refusals

CodeHTTP / stageRecoveryRetryable
INVALID_PARAMS400 / validationCorrect the reported type, range or sizeNo
UNAUTHENTICATED401 / authenticationCheck missing/invalid credentials or a disabled publishable keyNo
NOT_FOUND404 / resource or Hosted exchangeVerify organization, public ID and policy; obtain a fresh Hosted link if expired or consumedNo
UPSTREAM_UNAVAILABLE502 / upstream callRetry later; check management writes for partial completion firstYes

For session permissions, archiving and event-content errors, see Agent limits and errors.

Kit errors and retries

praxis.error detail can be a KitError with code, status, retryable and message, or only { message }. Status 0 means no HTTP response.

CodeStatus / stageRecovery and retryability
network_error, stream_disconnected0 / network or streamRetry after restoring connectivity
http_errorResponse status / HTTPInspect response; without explicit retryable, 429 and 5xx permit retry
invalid_token0 / token retrievalgetToken returned an empty value; correct it, retryable
invalid_responseResponse status / JSON or historyCheck format and pagination progress; no automatic retry
invalid_streamResponse status / streamCheck SSE content and JSON; no automatic retry
event_cursor_not_found200 / history recoveryReload history to locate the session; no automatic retry
callback_error0 / callbackFix the host exception; not retryable
aborted, disposed0 / lifecycleCancelled request or destroyed component; do not retry the old instance

Non-Hosted token retrieval retries retryable failures up to 3 times at 1, 2 and 4 seconds. Revocation or budget refusal stops that retry loop. Transport-owned stream recovery reconnects at most 5 times; the interface may own recovery instead. Do not add an unlimited retry loop.

Diagnose failures

Retain time, environment, public agent_… ID, HTTP status, error code and X-Request-Id without credentials. Check token status under Operations → Issuance records, then replay the session. Repeat embed tests after recovery. See the Agent API for field definitions.

Export

On this page