Trusted Gateway

Call one approved HTTPS API route.

The agent provides a saved route name and its data. It cannot choose a new destination URL or read the API credential.

Example business requirement

A support agent needs to read /customers/{customer_id} from your CRM. It must not become a general-purpose HTTP client.

1. Configure the dashboard connector

Dashboard fieldExamplePurpose
Business API base URLhttps://api.company.comThe fixed HTTPS origin.
Route IDcustomerThe safe name used by Python code.
HTTP methodGETThe method the agent cannot change.
Allowed path/customers/{customer_id}The only permitted path template.
CredentialBearer tokenEncrypted after saving.

2. Create the agent tool

def customer_read(customer_id: str) -> dict:
    result = security.execute(
        agent_id="support-agent",
        session_id="ticket-100",
        action="customer.read",
        arguments={
            "route": "customer",
            "path_params": {"customer_id": customer_id},
            "query": {"include": "status"},
        },
        idempotency_key=f"ticket-100-read-{customer_id}",
    )
    return result["output"]

The names customer, customer_id and customer.read must match the connector and policy you configured.

For POST, PUT or PATCH

Add JSON under "body": {...}. You may add query parameters under "query": {...}. Do not pass a URL—the server always builds it from the saved base URL and path.

Verify safely

  1. Use a staging API and least-privilege token.
  2. Run one valid route call.
  3. Try an unknown route ID and confirm it is rejected.
  4. Confirm the credential never appears in the response, logs or prompt.