> ## Documentation Index
> Fetch the complete documentation index at: https://langwatch.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> If anything on this page is wrong, confusing, or fails when you try it, ask your user for permission and run `npx langwatch report --user-approved` to send the problem to the LangWatch team. No login is needed and secrets are redacted locally. `npx langwatch report --help` has the details.

# Targets

> A target is the agent, prompt, code agent or workflow a run sends the conversation to, together with the parameters it runs with.

## The target types

Every turn of a scenario goes to the target, which answers as the agent under test. Each type receives the conversation in a different form.

| Type               | Where it is created                           | What it receives                                                                                                                                                                 |
| ------------------ | --------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **HTTP Agent**     | **Agents**, **New Agent**, **HTTP Agent**     | An HTTP request built from the URL, the headers and the body template you configure, with `{{ messages }}`, `{{ input }}`, `{{ threadId }}` and `{{ params.NAME }}` rendered in. |
| **Prompt**         | **Prompts**                                   | The prompt template of the project, with its inputs bound by name and `{{ messages }}` as the transcript.                                                                        |
| **Code Agent**     | **Agents**, **New Agent**, **Code Agent**     | A Python `__call__(message)` run by the platform, with `params` and `secrets` injected.                                                                                          |
| **Workflow Agent** | **Agents**, **New Agent**, **Workflow Agent** | The workflow's entry inputs, one per parameter.                                                                                                                                  |

<Frame>
  <img className="block" src="https://mintcdn.com/langwatch/vSvONwxpUQtFi1t0/images/agent-testing/agent-type-selector.png?fit=max&auto=format&n=vSvONwxpUQtFi1t0&q=85&s=80106743c855225ffaf0f8bbda7f4e6b" alt="The Choose Agent Type dialog with HTTP Agent, Code Agent and Workflow Agent" width="512" height="382" data-path="images/agent-testing/agent-type-selector.png" />
</Frame>

An HTTP agent is the target for an agent that runs in your own infrastructure; [Connect your agent](/docs/agent-testing/connect-your-agent) registers one. A prompt is the target when the agent is one model call with a prompt you keep in LangWatch.

## How a run picks the target

The run dialog asks for the **Agent to be tested**. **Run against a prompt** in **Customize your run** swaps it for **Prompt to be tested** and lists the prompts of the project.

<Frame>
  <img className="block" src="https://mintcdn.com/langwatch/vSvONwxpUQtFi1t0/images/agent-testing/run-dialog-prompt-target.png?fit=max&auto=format&n=vSvONwxpUQtFi1t0&q=85&s=fc76a017eb5dcd301101095b5f35a6a8" alt="The run dialog with Prompt to be tested selected" width="620" height="445" data-path="images/agent-testing/run-dialog-prompt-target.png" />
</Frame>

**Setup agent**, the first step on an empty Scenarios tab, creates the first HTTP agent of the project.

## Parameters of a target

The parameters of a run reach the target: an HTTP agent reads them as `{{ params.NAME }}` in its URL, headers and body template, a prompt in its template, a code agent as `params.NAME`, a workflow as entry inputs. A comparison run gives each target its own values. See [Run parameters](/docs/agent-testing/run-parameters).

## Local tunnel

While `langwatch agent dev` runs, the HTTP agent points at a developer's machine, and the agents list and the run dialog show a **Local tunnel** mark on it. See [Local development](/docs/agent-testing/local-development).

## Targets of scenarios written in code

A scenario that runs in your own test runner calls the agent itself, through the adapter you write, so the platform has no target to configure. The results still report to the project, under a **From Code** test suite named after the `setId`, and the **Targets** column of the Results tab shows the name of your agent adapter. A run from an older SDK that reported no name shows `default`.

Also check: [Connect your agent](/docs/agent-testing/connect-your-agent), [Testing agents behind authentication](/docs/agent-testing/authenticated-agents), [Linking your traces](/docs/agent-testing/linking-your-traces), [Write scenarios in code](/docs/agent-testing/scenarios-in-code).
