faq
Frequently asked questions
Short, practical answers about how AgentSentri works.
What is a project, and what do I get out of it?
A project is the box everything else lives in — it owns its own API keys, traces, scores, datasets, experiments, prompts, and alert rules, and it's the isolation boundary: data from one project never bleeds into another, and a project's API key only writes to that project. Projects belong to an organization, which is where your teammates and their roles live.
In practice, one project maps to one LLM application or service — your support-answer bot, your RAG endpoint, your agent. Teams also split by environment (a staging and a prod project) so test traffic doesn't muddy real usage.
What you get out of it:
- See inside any single run — the exact prompt, retrieved context, model output, and where the time went, instead of guessing from logs.
- Cost & performance, automatically — token usage and USD cost per run, rolled up on the dashboard with latency (avg/p50/p95) and error rate.
- Quality as a number — attach scores (human, heuristic, or LLM-as-judge) and watch the average move.
- Catch regressions — run a fixed dataset as an experiment and compare; add an alert rule so a regression flags itself.
- Versioned prompts and team access by role, all scoped to the project.
Does AgentSentri call my LLM or need my provider API keys?
Not for observability. You run your models and frameworks however you like and send traces, scores, and results in — which is why it works with any stack in any language, and why the prompt playground renders {{variables}} locally. The one opt-in exception is LLM-as-judge evals: connect a provider key (stored encrypted, never returned by any API) and AgentSentri uses it for exactly the judge calls you configure — and nothing else. No connection, no outbound calls.
What's the difference between a trace and an observation?
A trace is one end-to-end run of your app. It contains observations — the steps inside that run: spans (retrieval, tool calls, arbitrary work) and generations (model calls, which carry model name, token usage, and cost). The viewer shows them as a nested tree.
How is cost calculated?
For known models, USD cost is computed automatically from the token usage you report, using a built-in pricing table. If you know the exact figure — or use a model not in the table — pass it explicitly (set_cost(...) in the SDK, or costUsd on ingest) and that value wins. Prices change often, so treat the built-in table as a convenience, not billing truth.
Scores, datasets, experiments — when do I use which?
- Scores attach a judgment (numeric or categorical) to a trace or observation. Use them to track quality on live traffic. Scores guide.
- Notes attach free-text rationale to a trace or observation — qualitative, many per target. Notes guide.
- Annotation queues organize human review with claim/complete on items pointing at a trace or observation. Queues guide.
- Datasets are fixed collections of eval cases. Use them when you want a stable benchmark.
- Experiments record what your app produced for each dataset item so you can compare runs. They're client-driven: you run the model, AgentSentri stores the results. Use them to test a change before shipping.
Do I have to use the Python SDK?
No — there are four first-class paths. Python and TypeScript SDKs (both zero-dependency, with the same tracing handles and resource APIs — see the TypeScript SDK guide); plain HTTP in any language; and an OpenTelemetry OTLP/HTTP endpoint that accepts the default protobuf encoding, so a stock exporter needs just two environment variables — see the instrumentation recipes. Spans carrying gen_ai.* attributes map to generations with model, tokens, and cost.
Can I batch-judge a queue or filter asynchronously?
Yes — POST /api/public/eval-runs/batch enqueues an async judge run over a filter or annotation-queue slice via pg-boss (Story D). On-demand runs still execute inside the HTTP request (capped); schedules continue to judge new traffic on a cadence. Runs persist versioned model+prompt metadata; human override stays on the scores API. Details in the evals guide. Opt-in online-on-ingest judging (per-evaluator runOnIngest, default OFF) enqueues async pg-boss jobs after ingest.
How do I keep scheduled evals from running up my LLM bill?
Scheduled evals are bounded by design: each execution judges at most max_items_per_run traces (hourly × 25 is at most 600 judge calls/day per schedule); turning a schedule on never backfills history; and every judge call is metered through key usage monitoring — a runaway judge trips your own cost-spike alerts. Details in the evals guide.
How do I verify a webhook really came from AgentSentri?
Every alert webhook is signed: the X-AgentSentri-Signature header carries a hex HMAC-SHA256 of the raw request body, computed with the secret you set on the rule. Recompute it over the raw body and compare with a constant-time equality check (guarding length first) — the alert delivery guide has full Express and Next.js receivers plus the delivery semantics.
What happens to scheduled evals if my LLM connection breaks?
The schedule pauses visibly — status paused — no LLM connection on the Evals page and in the API — and the watermark stops advancing, so no traffic is silently skipped while judging is impossible. Reconnect (or re-enable the connection) and it resumes on the next tick.
Where does my data live? Is it private?
AgentSentri is self-hosted and Apache-2.0 licensed. Your prompts, outputs, and traces stay in your Postgres, on infrastructure you control — it doesn't phone home, and there's no vendor in the data path. See the production hardening guide for the data-capture and retention controls.
How do organizations, projects, and roles work?
An organization owns projects and holds your teammates. Membership has four fixed roles: owner (manage the org), admin (manage projects, API keys, members), member (read/write project data), and viewer (read-only). Invite teammates with a role-scoped, single-use, expiring link, which is also emailed to the invitee when the deployment has email and its public URL configured; otherwise you share the link yourself. The first account on a fresh deployment becomes the owner of a default organization.
Can I compare two frameworks, models, or agent designs?
Yes — a core workflow. Run both through the same dataset, tag each run by framework, score them the same way, and read the cost/latency/quality deltas off one dashboard. See the full runbook in the comparing-two-frameworks guide.
What does it cost? What's the license?
AgentSentri is open source under Apache 2.0 — free to self-host, with no usage-based pricing. You run it on your own infrastructure (Postgres + Next.js); your only costs are the compute you host it on and the LLM providers you call yourself.