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 field | Example | Purpose |
|---|---|---|
| Business API base URL | https://api.company.com | The fixed HTTPS origin. |
| Route ID | customer | The safe name used by Python code. |
| HTTP method | GET | The method the agent cannot change. |
| Allowed path | /customers/{customer_id} | The only permitted path template. |
| Credential | Bearer token | Encrypted 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
- Use a staging API and least-privilege token.
- Run one valid route call.
- Try an unknown route ID and confirm it is rejected.
- Confirm the credential never appears in the response, logs or prompt.