Glossary

Every term used across TrailAI, defined once. Alphabetical.


Agent run — A trace rooted in a span whose role classifies as agent. The unit counted by Agent Runs in Agent Analytics.

API key pair — The two credentials an SDK uses: a public key (pk-trail-…, sent as X-Public-Key) identifying the project, and a secret key (sk-trail-…, sent as X-Secret-Key) authenticating the caller. See API Keys.

Application name — The label an instrumented process attaches to all its telemetry (application_name in trail.init()). Maps to OpenTelemetry service.name.

Auto-instrumentation — The SDK patching a supported library at trail.init() time so its calls emit spans without you writing tracing code. See Auto-Instrumentation.

Classification — The sub-category a guardrail assigns to a firing verdict (impersonation, obfuscation, invalid_topic, …).

Compiled prompt — A prompt version with its variables substituted, as returned by trail.get_prompt().

Completion tokens — Tokens the model generated in its response. Billed at the completion rate.

Detection type — How a guardrail evaluates text: LLM Based Detection (a judge model) or Regex Based Detection (pattern rules).

Environment — The deployment label on telemetry (environment in trail.init()); maps to OpenTelemetry deployment.environment. Typically production, staging, development.

Exception — A recorded error captured on a span, surfaced in Observations → Exceptions.

Guard prompt — One logged guardrail check: the text examined, the verdict, the score, and the explanation.

Guard type — What a guardrail looks for: Prompt Injection, Sensitive Topics, Topic Restriction, or All.

Guardrail — A saved configuration that decides whether a piece of text is allowed. See Guardrails.

Instrumentor — The SDK component that wraps one specific library (e.g. OpenAIInstrumentor). Disable individually with disabled_instrumentors=[...].

Label (prompt) — A moving pointer to a prompt version (production, staging) that lets you promote a new version without changing code.

Member — A person invited into an organization, holding a role and per-project access grants.

OpenGround — The playground that sends one prompt to several providers at once and compares the responses. See OpenGround.

Organization — The top-level tenant. Owns projects, members, billing, and subscription.

OTLP — OpenTelemetry Protocol. TrailAI ingests OTLP/HTTP with protobuf encoding at /api/sdk/v1/traces and /api/sdk/v1/metrics.

Project — A workspace inside an organization, usually one per application. All telemetry and configuration is project-scoped.

Prompt — A named, versioned message template stored in TrailAI and fetched at runtime.

Prompt injection — An attack where user input tries to override the system instructions. One of the guard types.

Prompt tokens — Tokens sent to the model as input. Billed at the prompt rate.

Role (member) — A member's permission level: Admin or Member. Distinct from a span role.

Role (span) — TrailAI's classification of a span: agent, agent step, tool, llm, memory, api, or unset (function). Set via @trace(role=...).

Score — A guardrail's numeric confidence, 0.0–1.0. Compared against the guardrail's threshold.

Secret (vault) — A credential stored encrypted in TrailAI's vault and retrieved at runtime with trail.get_secrets().

Sensitive topics — A guard type detecting content in categories you would rather your application not discuss.

Span — One unit of work inside a trace: an LLM call, a tool invocation, a function. Spans nest.

Span kind — TrailAI's normalized classification derived from a span's role: llm, agent, tool, memory, external, or function.

Threshold — The score above which a guardrail verdict becomes a block.

Time to first token (TTFT) — Latency between request start and the first streamed token.

Time between tokens (TBT) — Average inter-token latency while streaming.

Topic restriction — A guard type that permits only an allow-list of topics and blocks the rest.

Trace — One end-to-end operation, made of nested spans. Viewed in Observations → Tracing.

Verdict — A guardrail's decision. "yes" means the guard fired — content matched what it looks for and should be blocked. "no" means it passed.

Vault — TrailAI's encrypted secret store, scoped per project. See Vault.