# Target

> Field reference for the Target configuration: the upstream destination configuration of an Agent Surface.
The target section defines the single upstream destination the gateway forwards traffic to: the actual managed agent backend. Every surface has exactly one target.

## Fields

The target is shown in the canvas as the Managed Agent node.

| Field | Type | Required | Default | Description |
| Target Endpoint URL | string | Yes | — | Upstream destination URL. Accepts https://, fabric://{gateway_id}/{surface_id} for gateway-to-gateway routing, or proxy://{id} for MCP proxy targets. |
| Endpoint auth | TargetAuthConfig | No | None | Service-level credentials injected by the gateway into requests forwarded to the target (gateway → target authentication). |
| Policy Definition (request) | [Policy definition](/products/affinidi-trust-fabric/agent-gateway/reference/surfaces/surface-reference.md#policy-definition) | No | None | Request-side OPA policy. Evaluated after the access point pipeline. Answers: “is this caller allowed this operation?” |
| Policy Definition (response) | [Policy definition](/products/affinidi-trust-fabric/agent-gateway/reference/surfaces/surface-reference.md#policy-definition) | No | None | Response-side OPA policy. Evaluated on the response from the target before returning to the caller. Answers: “is this response allowed for this caller?” |
| Payment | PaymentPolicy | No | None | Payment requirements. Tagged union: x402 (HTTP 402 protocol) or mpp (Machine Payments Protocol). |
| MCP Tools | McpToolPolicyEntry[] | No | [] | Per-tool RBAC entries (MCP only). Enforced as an allowlist whenever mcp_tool_policies is non-empty: a tools/call for a tool with no matching entry is denied. |
| Networking | [Networking](#networking) | No | None | Timeout, retry, circuit breaker, and traffic mirroring configuration. |
| Agent Identity | [Identity injection](#identity-injection) | No | {} | Controls whether and how a signed Verifiable Presentation is injected into outbound requests. |
| Trust Registry | TrustRegistryInjection | No | None | Injects a trust registry extension into outbound requests forwarded to the target. |
| Trust Registry (inbound) | TrustRegistryInjection | No | None | Validates trust registry extension on inbound responses from the target. |
| Extension Validation | ExtensionRules | No | None | Response extension schema validation (response from target). |
| Custom Metadata | CustomMetadata | No | None | Custom metadata injected into request bodies forwarded to the target. |
| Custom Metadata (response) | CustomMetadata | No | None | Custom metadata injected into response bodies returned to the caller. |
| Trust Check | [Trust Check elements](/products/affinidi-trust-fabric/agent-gateway/reference/surfaces/trust-check-element.md) | No | [] | Per-element TRQP verification on the target leg (Managed Agent → Target). Results appear as input.trust_check_results.target in OPA evaluation. |
| via MCP Proxy | string | No | None | MCP proxy backend ID. Required when endpoint uses the proxy://{id} scheme. |
| Display name | string | No | None | Display name shown in the dashboard for fabric:// endpoints. Used when the remote gateway is offline. |
| MPP Auto-Pay | bool | No | false | Automatically pays MPP challenges for fabric:// targets without caller involvement. |
| Max amount per request | string | No | None | Safety cap on the amount per auto-pay request. Expressed as a decimal string (for example "0.01"). |

## Endpoint schemes

| Scheme | Format | Use case |
| HTTPS | https://<host>:<port>/<path> | Standard HTTP/S upstream target. |
| Fabric | fabric://{gateway_id}/{surface_id} | Gateway-to-gateway routing through the fabric. |
| Proxy | proxy://{mcp_proxy_id} | Routes through a configured MCP proxy backend. Requires mcp_proxy_id. |

## Networking

Controls resilience behaviour for requests forwarded to this target.

| Field | Type | Required | Description |
| Timeouts | TimeoutConfig | No | Connect and read timeout settings in milliseconds. |
| Retry | RetryConfig | No | Retry policy: max attempts, backoff strategy, and retryable status codes. |
| Circuit Breaker | CircuitBreakerConfig | No | Circuit breaker thresholds: failure rate, open duration, and half-open probe count. |
| Traffic Mirroring | MirrorConfig | No | Traffic mirroring: duplicate requests to a secondary endpoint for testing or analysis. |

## MCP tool policies

Per-tool OPA policy binding. Evaluated whenever mcp_tool_policies is non-empty, which enables allowlist enforcement automatically.
Note

The mcp_tool_policies list acts as an allowlist when non-empty. A tools/call for a tool with no matching entry is denied. No additional toggle is required to activate enforcement.

| Field | Type | Required | Default | Description |
| Tool name | string | Yes | — | Name of the MCP tool this policy applies to. Must match the tool name exactly. |
| Policy Definition | string | Yes | — | ID of the OPA policy definition in the policy store. |
| Description | string | No | "" | Human-readable note shown in the dashboard. |

## Identity injection

Controls signed Verifiable Presentation injection into outbound requests.

| Field | Type | Required | Default | Description |
| Send signed identity VP to target | bool | No | false | When enabled, the gateway signs and injects a VP into each outbound request to the target. |
| Identity extraction strategy | string | No | None | How the agent DID is extracted. Options: From Payload, From API Key, From mTLS certificate, Static DID, From JWT Claims. |
| API Key | string | No | None | API key identifier. Required when strategy is From API Key. |
| Certificate | string | No | None | Certificate identifier. Required when strategy is From mTLS certificate. |
| DID | string | No | None | Pre-known DID. Required when strategy is Static DID. |
| JWT claim | string | No | oid | JWT claim to derive the DID from. Used when strategy is From JWT Claims. |
| Namespace claims | string[] | No | [] | Additional claims used to namespace the derived DID (for example iss, tid). Used when strategy is from_jwt_claim. |
| Payload field | string | No | None | Top-level payload field the identity payload is read from. |
| Dot-notation paths | string[] | No | [] | Dot-notation paths concatenated and hashed to derive the agent DID. Used when strategy is from_payload. |
| JSON Schema | map | No | None | JSON Schema describing the expected identity payload on the wire. |

## Related

- [Access Point reference](/products/affinidi-trust-fabric/agent-gateway/reference/surfaces/access-point.md): Inbound configuration and caller authentication.

- [Transit Points reference](/products/affinidi-trust-fabric/agent-gateway/reference/surfaces/transit-points.md): Agent-initiated outbound routes.

- [Trust Check element reference](/products/affinidi-trust-fabric/agent-gateway/reference/surfaces/trust-check-element.md): Full field reference for TrustCheckElement, query parameters, and TrustCheckResult wire shape.

- [OPA policies concepts](/products/affinidi-trust-fabric/agent-gateway/concepts/opa-policies.md): How gateway and surface-level OPA policies are evaluated.
