Surface routing model

How Access Point, Target, Transit Point, and Listener work together as the routing model for one Agent Surface.

The Surface routing model explains how one Agent Surface handles inbound and outbound traffic for one managed agent. It defines the responsibilities of Access Point, Target, Transit Point, and Listener, and clarifies why these are separate concepts.

ConceptDirectionRole
Access PointInboundEntry point for callers; owns authentication, rate limiting, and caller context.
TargetInboundThe managed agent endpoint the gateway forwards inbound calls to.
Transit PointOutboundRoute for the managed agent to call external services under gateway control.
ListenerBothGateway-level network binding (address and port). Access Points and Transit Points register route paths on a Listener. They do not own it.

Access Point

The Access Point is the inbound face of a surface. It defines the network address, route path, and protocol that external callers use to reach the managed agent through the gateway. Together, the address and route path form the surface’s Entry point URL. It is the front door for one surface.

An Access Point owns inbound caller controls:

  • Caller authentication, set by a Caller Context element. It can hold several methods, such as a JWT for internal users and an API key for partner agents, and the gateway verifies each request with the method whose credential it carries. See Caller Context element.
  • Inbound rate limiting.
  • Caller context mode (required identity, optional identity, or anonymous requests).

From version 1.0.4, a new Access Point is closed: it refuses every caller until you add caller authentication, and a caller whose credential is missing or invalid gets 401 before policy runs. Switching on Public access lets any caller reach the surface without credentials. See Access Point.

Target (External Target)

The Target (or External Target) is the destination side of a surface. After inbound requests pass gateway-level and surface-level controls, the gateway forwards traffic to the Target endpoint.

Each surface has exactly one Target.

In the surface model, the managed agent represents the external endpoint within the surface configuration. The external endpoint itself remains outside gateway control, while policy and routing behaviour stay inside the surface representation.

Transit Point

A Transit Point is a named, gateway-managed egress route that your managed agent uses to make outbound calls. It registers one outbound channel on the gateway’s outbound listener and exposes a URL that the managed agent calls instead of the external destination directly.

Where Access Point and Target model the inbound flow (caller → managed agent), Transit Point models the reverse (managed agent → external endpoint). Without a Transit Point, outbound calls from the managed agent bypass the gateway entirely: they carry no policy gate, no authentication controls, and no visibility into what the agent called, regardless of what is configured on the inbound surface.

A surface can have zero or more Transit Points.

Each Transit Point carries:

  • Name: a free-text label shown in the dashboard. The routing alias is derived from it.
  • Surface Prefix and Custom Path: together they form the actual Transit Point URL the managed agent calls (for example https://gateway.example.com/payments/frozen/model), the same prefix/custom-path pattern an Access Point uses. See How listener URLs are formed.
  • Routing alias: a short identifier derived from the Name (for example partner-api from “Partner API”), shown read-only under the Custom Path field. The transit token lists the aliases it is valid for, and the alias also forms the default path the gateway serves every Transit Point at, /outbound/<surface-route>/<alias>.

Each Transit Point is an independent processing pipeline. You can attach Policy, Rate Limit, Networking, Payment, and Trust Check controls to an individual Transit Point without affecting other outbound routes on the same surface.

A Transit Point can target two destination types:

  • External URL: a standard HTTPS or agent endpoint the gateway calls on behalf of the managed agent.
  • Gateway-to-gateway: a Gateway Connection target (fabric://) that routes the call through another Agent Gateway instance.
Transit Point configuration panel showing the Name field, the Listener URL banner, the Surface Prefix and Custom Path fields, the auto-generated routing alias, and the Target Endpoint

Inbound and outbound flows

The inbound and outbound flows do not chain together. They are two separate pipelines on two separate listeners.

InboundCaller → Access Point → Managed Agent
OutboundManaged Agent → Transit Point → External Destination

The managed agent is an external service you run. It receives calls from the gateway on the inbound side, and it initiates calls through the Transit Point on the outbound side.

The transit token

The gateway binds the two flows together through a short-lived JWT called the transit token. It is generated during the inbound pipeline, before the gateway forwards to the managed agent, and injected as the X-Transit-Token request header.

When the managed agent calls the Transit Point URL, it includes this same token as X-Transit-Token. The gateway validates the token on the outbound side before forwarding.

ClaimCarries
Surface identityThe surface ID the token was issued for.
Caller identityThe caller’s DID and identity source, if resolved.
Expiry5 minutes from issue by default. The managed agent must make the outbound call within the same request lifecycle.
Routing scopeThe Transit Point aliases the token is valid for.
Caller contextFields from Caller Context elements on the surface, used for Workload Binding.
Identity referenceA user identity reference for Credential Delegation lookups.
Supporting fieldsA token ID, end-to-end trace correlation, and issuing gateway attribution.

The managed agent can read the token’s payload. The token is signed, so the managed agent sends it back unchanged: it reads the header from the inbound request and attaches it to the outbound call.

On every Transit Point request that requires the token, the gateway checks that the token was issued for that Transit Point’s surface, that its issue time is not in the future, and that its lifetime is no longer than the lifetime the gateway issues for that surface, 5 minutes by default. It allows 5 seconds of clock difference, so a token is refused 5 seconds after it expires. Within that window the managed agent can use the token for any number of calls. A refusal says only that the token is missing or invalid.

A managed agent turn that outlives its token, about 5 minutes by default, therefore has its later Transit Point calls refused. Its next inbound request brings a new token.

From version 1.0.5, a managed agent serving a request that a paired gateway sent over Fabric also receives a transit token for every Transit Point of the surface. Which remote gateways can reach the surface, and so its Transit Points, is set on the Publishing tab of each remote gateway record. See Gateways.

A caller that can’t carry the transit token, such as an agent hosted by a cloud provider, can call a Transit Point that has the token turned off and authenticates its callers with an API key or a JWT of their own. See Authenticate callers on a Transit Point.

When to use Transit Points

Use a Transit Point when your managed agent needs to call an external service and you want the gateway to govern that outbound call. The gateway can:

  • Apply policy checks to outbound calls before they leave the gateway.
  • Apply policy checks to responses before they reach your agent.
  • Verify the external destination against a trust registry.
  • Inject API keys or tokens into outbound requests without passing them through the managed agent.
  • Rate-limit outbound traffic per destination, independently of inbound calls.
  • Record outbound calls in metrics and traces alongside inbound activity.

You can add multiple Transit Points to a single surface, one per outbound destination. Each runs as a separate pipeline so different destinations can carry different policies, credentials, and rate limits.

If your managed agent processes requests entirely on its own, or calls external services directly without needing gateway governance, Transit Points are not required.

For a step-by-step walkthrough, see Apply policy to outbound calls.

Listener

A Listener is a gateway-level network binding: a specific address and port the gateway opens at startup to accept connections. Listeners are configured once on the gateway, not per surface. Multiple surfaces can share the same Listener.

Access Points and Transit Points do not own a Listener. They register a route path on one. When a request arrives on a Listener address, the gateway matches the request path to the correct Access Point or Transit Point across all surfaces.

Inbound Listener
↓ route match ↓
Access Point
surface-a
Access Point
surface-b
Outbound Listener
↓ route match ↓
Transit Point
github-api
Transit Point
partner-api
ConceptScopeRole
ListenerGateway-wideA bound address and port, opened once at startup and shared across surfaces.
Access PointPer surfaceRegisters an inbound route path on a Listener. Owns authentication and rate limiting for that route.
Transit PointPer surfaceRegisters an outbound route path on a Listener. Owns controls for that egress destination.

Listener bindings are startup-only configuration. Changing a Listener address or port requires a process restart, not a hot reload.

Routing model recap

Inbound
Caller
→
Access Point
→
Managed Agent
Outbound
Managed Agent
→
Transit Point
→
External Service
Access Point and Transit Point (blue) run inside Agent Gateway. The Managed Agent links the two flows by passing the transit token on its outbound call.

For each managed agent surface:

  • Inbound flow: caller → Access Point → Target.
  • Outbound flow: managed agent → Transit Point → external endpoint.

Understanding these relationships is the foundation for surface design, policy enforcement, and runtime governance in Agent Gateway.

  • Surfaces: High-level overview of Agent Surface structure and runtime behaviour.
  • Apply policy to outbound calls: Add Transit Points to a surface and apply OPA policy and trust checks to your managed agent’s outbound calls.
  • OPA policies: Policy enforcement used across inbound and outbound paths.
  • Gateways: Multi-hop routing and Gateway Connection across gateway boundaries.