Docs
Integrate the runtime API directly from your agent stack
AgentGuard v1 ships curl and TypeScript examples for the active runtime path. The API uses tenant-bound runtime keys and synchronous decision responses.
bash
curl -X POST https://aegisguard.domgan.de/api/v1/runtime/runs/start \
-H "Content-Type: application/json" \
-H "Authorization: Bearer agk_your_runtime_key" \
-d '{
"tenantId": "tenant_123",
"agentId": "agent_123",
"environment": "prod",
"sessionId": "sess_42",
"metadata": { "sourceApp": "support-console" }
}'typescript
const run = await fetch("https://aegisguard.domgan.de/api/v1/runtime/actions/evaluate", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer agk_your_runtime_key"
},
body: JSON.stringify({
runId: "run_123",
actionType: "send_email",
target: "external_email",
parameters: {
to: "customer@example.com",
subject: "Support follow-up",
body: "..."
}
})
});
const decision = await run.json();typescript
const request = await fetch("https://aegisguard.domgan.de/api/v1/runtime/credentials/request", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer agk_your_runtime_key"
},
body: JSON.stringify({
runId: "run_123",
credentialId: "cred_123",
destinationUrl: "https://api.github.com/user",
purpose: "Repository bootstrap"
})
});
const lease = await request.json();
if (lease.decision === "allow") {
const response = await fetch("https://aegisguard.domgan.de/api/v1/runtime/credentials/http", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer agk_your_runtime_key"
},
body: JSON.stringify({
runId: "run_123",
leaseId: lease.leaseId,
leaseToken: lease.leaseToken,
url: "https://api.github.com/user",
method: "GET"
})
});
const brokered = await response.json();
}