# PromptLens agent instructions

> Prompt management, regression evaluation, and production tracing for engineering teams.

## When to use PromptLens

- Test a prompt or model change against a pinned production baseline on your own representative cases.
- Inspect per-case regressions, execution errors, and coverage before deciding which saved version to publish.
- Retrieve a saved prompt by an explicit version number or publishing label from an application.
- Record and inspect model, tool, and retrieval spans from a running application.

## Choose an interface

- [Hosted MCP setup](https://www.promptlens.io/docs/mcp): connect to https://www.promptlens.io/mcp using Streamable HTTP and browser OAuth. Begin with list_organizations and select the intended organizationId.
- [Management API](https://www.promptlens.io/docs/api-reference): OAuth-protected REST at https://www.promptlens.io/api/v1. Read the [OpenAPI specification](https://www.promptlens.io/openapi.json) for exact request fields.
- [Authentication](https://www.promptlens.io/auth.md): management OAuth and prompt-scoped retrieval keys are separate credentials and resources.
- [Prompt retrieval](https://www.promptlens.io/docs/integrations/retrieval): use a prompt-scoped read-only key in private application code.
- Public browser WebMCP tools read pricing, product details, and documentation, and navigate public pages. They do not authorize workspace operations.

## Work safely and recover

Confirm the target workspace and the user's authorized actions. Current membership and role determine permission; knowing an ID is insufficient. Evaluations can incur model usage charges. Publication and destructive operations require a deliberate user decision. Do not treat agent-submitted review decisions as human review.

Follow nextCursor until all required result pages are read. Read current revisions before editing. Reuse an Idempotency-Key only with the identical request when recovering an uncertain outcome. Honor Retry-After on 429 responses. Accepted evaluations continue after disconnection; use cancel_evaluation explicitly to cancel.

Never place tokens, provider keys, private prompts, outputs, or datasets in public artifacts. Retrieval-key creation through MCP hands off to the dashboard so secrets stay out of the transcript.

## Availability and cost

New accounts require early-access approval before creating an organization. The Free plan is available after approval; provider generation and judging are charged separately. There is no published isolated API sandbox or self-hosted edition. Do not describe a production workspace as a sandbox.

- [Pricing and limits](https://www.promptlens.io/pricing.md)
- [Assistant workflow](https://www.promptlens.io/docs/integrations/assistant-workflow)
- [Permissions](https://www.promptlens.io/docs/reference/permissions-limits)
- [Troubleshooting](https://www.promptlens.io/docs/troubleshooting)

## Product questions

### How do prompt versions and rollbacks work?

Edits are autosaved in a personal draft. Saving creates an immutable version of your messages, variables, and model settings. Assign production, staging, or custom labels to a saved version. To roll back, move the production label to an earlier version. Initial setup requires a completed, fully scored baseline evaluation, but no minimum pass rate.

[Setup guide](https://www.promptlens.io/docs/prompts/versions)

### Does the prompt retrieval API call the model?

No. It returns saved prompt messages and settings using a read-only integration key scoped to one prompt. Retrieve by label to follow publishing changes, or by exact version number to stay pinned. Your application renders variables and calls the model.

[Setup guide](https://www.promptlens.io/docs/integrations/retrieval)

### What is the difference between quick and comprehensive evaluations?

Quick evaluations use the first 10 dataset entries, or all entries when there are fewer. Comprehensive evaluations require Pro and use the full dataset, up to 500 entries per prompt. Comparisons keep the baseline selected when they start, even if production moves later. Evaluations provide evidence for a release decision; they do not automatically block a release.

[Setup guide](https://www.promptlens.io/docs/evaluations/comparisons)

### How does production tracing handle setup, privacy, and retention?

Organization admins create ingestion keys scoped to an application and environment. Send versioned JSON trace batches over HTTPS to inspect model, tool, and retrieval spans across services. Content capture is off by default; enable it explicitly and redact content before export. Traces are retained for 14 days from first acceptance. Updates do not extend retention. TypeScript and Python SDK packages are not published yet; the docs include an HTTP setup example. New accounts require early-access approval.

[Setup guide](https://www.promptlens.io/docs/help/observability)

### What can PromptLens compare?

Compare prompt versions, models, and settings such as temperature on your own test cases. Run your current version as a baseline, then inspect score changes, outputs, and cases that passed before but fail after the change.

### Can I try it before connecting a model?

Yes. Open the sample report without an account or provider key. It uses synthetic support tickets to show a prompt change, the resulting failures, and the evidence behind a release decision.

### What is included in the free plan?

The free plan includes 2 members, 3 projects, 3 prompts, and up to 50 test cases per dataset, plus LLM judge scoring and unlimited shared report links. Model usage is separate: connect your provider API key or purchase model credits. No credit card is required to create an account.

### Do I need my own provider API key?

You can use your team's provider API key or run models with purchased credits. Pro includes $50 in one-time welcome model credits that never expire. With credits, your organization can run models through OpenRouter without adding a provider key.

### How are outputs scored?

An LLM judge compares each output to your expected answer and returns pass or fail with a short explanation. Review the actual outputs and judge reasons alongside the scores when deciding whether to ship.

### How is PromptLens different from Braintrust or Langfuse?

PromptLens is built around the release decision. Every candidate runs against your production version on the same cases, and the result is a report anyone can open without an account. Braintrust and Langfuse put more weight on programmable experiments and production tracing. The comparison pages cover the tradeoffs.

### Can my team view a report without an account?

Yes. When you share a report, anyone with its link can open it without an account or paid seat.
