Endpoint Rules
Restrict the host credential proxy to specific HTTP method + path combinations.
Endpoint rules narrow what the host credential proxy is willing to
forward. The base feature (Credential Injection)
lets the agent talk to a named service through the proxy. Endpoint
rules add method + path controls on top, so the agent's OPENAI_API_KEY
can only call POST /v1/chat/completions, not DELETE /v1/admin/*.
The TypeScript SDK currently exposes the simple credentials: { svc: key } form. The structured shape below is supported by the server and the REST API today; first-class TS SDK helpers ship in a future release. Use the REST API or hand-roll the request until then.
Wire shape (credentials_v2)
{
"image": "python:3.12-slim",
"credentials_v2": {
"openai": {
"key": "sk-real-openai-key",
"endpoints": [
{ "methods": ["POST"], "paths": ["/v1/chat/completions"] },
{ "methods": ["GET"], "paths": ["/v1/models"] }
]
}
}
}A request through the credential proxy is forwarded only if its
(method, path) matches one of the entries. Anything else is rejected
at the proxy with a 4xx.
Rule fields
| Field | Required | Description |
|---|---|---|
methods | Yes | One or more HTTP methods. Empty array means "any method." |
paths | Yes | Path prefixes or globs (e.g. /repos/myorg/*). |
Common policies
Read-only GitHub access
{
"credentials_v2": {
"github": {
"key": "ghp_...",
"endpoints": [
{ "methods": ["GET"], "paths": ["/repos/*"] },
{ "methods": ["GET"], "paths": ["/user"] }
]
}
}
}LLM inference only
{
"credentials_v2": {
"openai": {
"key": "sk-...",
"endpoints": [
{ "methods": ["POST"], "paths": ["/v1/chat/completions"] },
{ "methods": ["POST"], "paths": ["/v1/embeddings"] },
{ "methods": ["GET"], "paths": ["/v1/models"] }
]
}
}
}Combination model
A request must pass both filters:
- The sandbox's network policy (allow-list / deny-list / named profile) has to permit the destination host.
- Each
(method, path)has to match an endpoint rule for the credential that authenticates it.
Use this alongside Network Profiles for reusable policy baselines.
Next steps
- Credential injection, the base proxy these rules narrow.
- Network profiles, reusable host-level egress baselines.
- Audit trail, proxied requests are logged without the credential.