BrowserStack AI Evals
Agents

Create an Agent

Register your endpoint, add grounding, map the response, and test the request before using the agent in evals.

Create an Agent

Open Agents from the left sidebar and click Add agent to open the agent composer. Give the agent a name (click the title to rename it), configure the sections below, then click Create agent.

Agent Description (grounding)

The Agent Description tab is required — it tells the platform what your agent does so the scenario generator and simulator can produce realistic, on-topic conversations. Choose one of:

  • Write description — a short text description. For example: A customer support copilot for an e-commerce store. Handles refunds, order tracking, and policy questions. Refuses anything outside the policy doc. (up to 10,000 characters).
  • Upload document — a source file the platform reads for grounding: .txt, .md, .docx, or .pdf, up to 10 MB.

An agent uses a description or a document, not both — switching to one clears the other.

Request

Build the request the platform will send to your endpoint, using the composer tabs:

  • Method — one of GET, POST, PUT, PATCH, DELETE, HEAD, or OPTIONS.
  • URL — the endpoint to call, for example https://api.acme.com/v1/chat.
  • Params — query parameters as key–value pairs.
  • Headers — request headers as key–value pairs.
  • Authorization — no auth, a Bearer Token, Basic Auth (username + password), or an API Key header. The composer adds the corresponding header for you.
  • Body — a JSON request body for methods that send a payload.

Use the composer's Send action to fire a test request and confirm the endpoint responds before relying on it. Requests run server-side, so browser CORS limits don't apply.

Data Extraction

On the Data Extraction tab, map fields from your endpoint's JSON response so evals knows what to score:

  • LLM Output (required for text agents) — where the model's answer is in the response, for example data.llmResponse.
  • Retrieved Contexts (optional) — any retrieved or supporting context your endpoint returns, for retrieval-augmented flows.

These mappings are saved with the agent and let an experiment pull the output (and contexts) from each response automatically.

Private endpoints

If your endpoint isn't publicly reachable, bind the agent to an environment that routes through a BrowserStack Local tunnel so the platform can reach it.