Create your first surface
By the end of this guide, you will have an Agent Surface that accepts requests from an AI agent holding your API key and forwards them to a backend service of your choice.
Prerequisites
- You are logged in to the dashboard with permission to create surfaces and secrets.
- A backend service with a publicly accessible URL for the gateway to forward requests to.
- No backend yet? Use the Echo server as a test target. Start it locally and expose it publicly using a tunnel tool of your choice.
Steps
Store an API key as a secret
Callers prove who they are by sending an API key with each request. The gateway checks the key against a secret you store first.
Select Secrets in the sidebar, then select New Secret. Fill in the Create Secret form:
| Field | Value for this guide |
|---|---|
| Secret Name | First surface key. The Secret ID is generated from the name as you type. |
| Secret Type | ApiKey. The Caller Context element in Step 5 lists only secrets of this type, or with no type. |
| Secret Value | The key your test requests will send, for example a long random string. Select Generate for a random value, then select Show the value you entered to copy it. |
Copy the Secret Value and keep it for Step 7. After you save, the dashboard hides the stored value.
Select Create Secret.
Start a new surface
Navigate to Surfaces in the sidebar.
Select Add Surface.

The Start a new surface dialog shows a list of starter templates. Each entry shows the template name, a short description, and its protocol badge. Select an A2A starter template for this guide.
The surface builder opens with the canvas already populated from the template.

The surface is given a default name made from its protocol and a number, such as a2a_surface_1. To update it, select the blue Surface container on the canvas. The Name field is in the settings panel that opens on the right.
Configure the Access Point
The Access Point element defines how incoming traffic reaches the surface. Select it in the canvas to open its settings panel.

Under Routing, set the following fields:
| Field | Value for this guide | Notes |
|---|---|---|
| Surface Prefix | (auto-seeded) | Pre-filled from your gateway instance configuration. Accept the default. |
| Custom Path | first-surface | Identifies this surface in the full route. The auto-seeded value is a random two-word path. Update it to something meaningful. |
The Entry point URL banner at the top of the panel shows the full URL other agents use to reach this surface: the listen address, surface prefix, and custom path combined. The same URL also appears in a banner at the top of the canvas. Select the copy icon next to the URL and keep it for Step 7.
Under the URL on the canvas, the notice “Not ready for external access” shows that the surface has no caller authentication yet. You add it in Step 5.
Configure the Managed Agent
The Managed Agent element forwards requests to your backend service. Select it in the canvas to open its settings panel.

Set Target Endpoint URL to your backend service’s publicly accessible URL.
For a hosted gateway, localhost resolves to the gateway’s own host, not your machine. If your backend is running locally, expose it through a tunnelling tool and use the public tunnel URL here instead.
If required fields are missing:
- Visual alerts appear.
- Elements are highlighted.
- The Elements tab in the sidebar shows incomplete configuration.
Require the API key
The Caller Context element authenticates each caller before the request reaches your backend.
- In the element palette on the left, find Caller Context under Security & Policy.
- Drag it onto the Access Point → Managed Agent edge.
- Select the Caller Context node. Under Authentication methods, it lists one method, JWT, the default.
- On the method row, select Configure ↗ to open the full editor. In Authentication Method, select API Key (secret store).
- Keep API Key Location at HTTP Header and HTTP Header Name at
X-API-Key. - In Secret ID, select the secret you created in Step 1.
- Close the editor.
The “Not ready for external access” notice under the Entry point URL clears once the surface has caller authentication.
From version 1.0.4, a new surface refuses every caller with 503 until you add caller authentication, unless you switch on Public access on the Access Point. Surfaces created before the upgrade keep the old behaviour until you select Close Access Point and save. See Access Point.
Save the surface
Select the green ✓ button in the sidebar to save the surface.
- The surface is saved immediately.
- No restart is required.
A success notification confirms the surface was created, and you are returned to the Surfaces list where the new surface appears.
Send a test request
Replace <ENTRY_POINT_URL> in the command below with the Entry point URL you copied in Step 3, and <YOUR_API_KEY> with the secret value from Step 1. The header is in single quotes so that your shell passes characters such as $ and ! from a generated value unchanged.
curl -k -X POST "<ENTRY_POINT_URL>" \
-H "Content-Type: application/json" \
-H 'X-API-Key: <YOUR_API_KEY>' \
-d '{
"jsonrpc": "2.0",
"method": "message/send",
"id": "test-001",
"params": {
"message": {
"role": "user",
"messageId": "msg-001",
"parts": [{ "kind": "text", "text": "Hello from the quickstart" }]
}
}
}'The -k flag disables TLS certificate validation. It is appropriate for initial testing against a local or development gateway, but must not be used in production.
If using the echo server, a successful response returns 200 OK with a JSON body containing the echoed method, path, headers, and body. The full request is also printed to the echo server’s terminal. For your own backend, a successful response depends on your service.
Confirm
Select the Monitoring tab in the surface detail page. You should see a request entry recorded for the test you sent in Step 7.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
400 Bad Request on create | A required field is missing. | Ensure Surface Prefix and Custom Path are set on the Access Point element (Step 3), and that Target Endpoint URL is set on the Managed Agent element (Step 4). |
| The save button is disabled with the tooltip “Configure all canvas elements before saving”, or saving shows “Caller Context: API key secret must be selected”. | The Caller Context element has no Secret ID. | Open the Caller Context editor and select the secret from Step 1 in Secret ID (Step 5). |
503 Service Unavailable with “This Access Point is not available.” | The surface has no caller authentication, so it is not ready for external access. The canvas shows “Not ready for external access” under the Entry point URL. | Add the Caller Context element from Step 5, or select Configure Authentication in the notice, then save the surface. |
404 Not Found | The URL in the curl command does not match the Entry point URL. | Copy the exact URL from the Entry point URL banner on the canvas or the Access Point element and retry. |
Connection refused | The gateway hostname or port in your command is incorrect. | Confirm the URL uses the listen address shown in the Entry point URL banner. Contact your administrator if the connection is still refused. |
502 Bad Gateway | The target endpoint is unreachable from the gateway host. | Confirm your backend is reachable from the gateway. For a hosted gateway, localhost is not accessible. Expose your backend through a tunnel and update the Target Endpoint URL on the Managed Agent element (see Echo server for an example). |
401 Unauthorized with “Caller credential missing or invalid” | The request has no X-API-Key header, or its value doesn’t match the secret. | Send the header with the exact value you stored in Step 1. Check that HTTP Header Name in the Caller Context editor is X-API-Key. |
401 Unauthorized from your backend, without that message | Your backend requires its own authentication. | Confirm the target endpoint’s authentication requirements. |
Next steps
- Add identity and access control: Continue the tutorial with policy and identity controls.
- Surfaces: Understand protocols and request routing behaviour.
Glad to hear it. Thanks for letting us know.
Sorry to hear that. Thanks for letting us know.
Still stuck? Ask the community on Discord or contact us.