Loading...
Loading...
Get Started
Authorize one exact GitHub issue, then execute it through the consuming connector gate.
Before you grab a key — try it free
No signup needed to see what OmegaEngine does: red-team a sample agent in your browser, score your own tool schema on the Agent Security Leaderboard, or run the CLI locally:
$ npx @omegaengine/agent-scan --sample support-vulnerable$ npx -y @omegaengine/verify@latest sample --api=https://omegaengine.aiThe verifier command checks a public signed proof with no account. Execution below requires a Developer+ organization-bound live key; manage keys at omegaengine.ai/keys.
Try /api/authorize right now — no key, no signup
This runs the same decision engine as production /api/authorize, against a fixed demo wallet (escalate over $500, deny over $2,000, destructive actions blocked). Demo mode persists nothing and bills nothing — responses are marked demo: true.
Request
curl -X POST https://omegaengine.ai/api/demo/authorize \
-H "Content-Type: application/json" \
-d '{
"agent_id": "support-agent",
"action": "send weekly status email to the team",
"tool_name": "email.send",
"tool_args": {
"to": "team@example.com",
"template": "weekly-status"
},
"vendor": "resend"
}'Response
Press “Run it” to fire a live request from your browser.
First configure your organization's GitHub connector with a least-privilege token and explicit owner-managed githubRestrictionsgranting create_issue only for your-org/sandbox, a disposable repository you control. This setup contract is unreleased source, not deployed parity. Execution creates a real issue. Keep API keys and connector credentials on your server, never in browser code.
The built-in executor requires connector/github/create_issue and unchanged JSON arguments. github:create_issue is not an alias. Custom executor names remain valid only with their own reviewed, capability-consuming implementation. Test keys and shadow results cannot execute. Use the same persisted live execution-authorized API key for authorize, claim and execute; another key in the same organization, an admin key or a browser session cannot substitute. The unreleased server binds built-in authorization and human review to the connector ID, configuration/credential generation and executor audience, rechecked at claim and consumption. Configure first; setup writes, rotation or resealing require fresh authorization/review. Legacy unbound records remain retained but blocked; never submit credentials or a binding to execute.
Escalation is blocked until a signed-in organization reviewer approves and the agent claims that authorization through /api/authorize/approval/claim. Never auto-approve as the agent. Start with /api/authorize. Financial tools remain unavailable; /api/v2/judge is analysis, not execution permission.
These examples describe repository source. Published SDKs and the hosted deployment may differ; verify release parity before use. Production deployment and package publication remain held. A timeout is uncertain, not permission to create another authorization or claim exactly-once delivery.
Save the original authorization ID before execution, then use the read-only recovery step below after a disconnect. An execution-only key can recover its own authorizations; logs:read or verified organization membership permits broader tenant reads. Recovery adds no action charge and remains available after downgrade with valid read access. Missing, started or unknown evidence never permits another execution.
npm install @omegaengine/sdkimport { OmegaClient } from "@omegaengine/sdk";
const omega = new OmegaClient({
baseUrl: "https://omegaengine.ai",
apiKey: process.env.OMEGA_API_KEY!,
});const intent = {
"agent_id": "repo-agent",
"action": "create_issue",
"tool_name": "connector/github/create_issue",
"tool_args": {
"owner": "your-org",
"repo": "sandbox",
"title": "Governed follow-up",
"body": "Exact issue content reviewed before dispatch"
},
"amount": 0,
"vendor": "GitHub",
"risk_level": "high"
} as const;
// This function is also used after a genuine human approval is claimed.
async function executeApprovedIssue(executionCapability: string) {
const response = await fetch("https://omegaengine.ai/api/connectors/execute", {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-api-key": process.env.OMEGA_API_KEY!,
},
body: JSON.stringify({
connector: "github",
action: "create_issue",
payload: intent.tool_args, // Do not change after authorization.
capabilityToken: executionCapability,
}),
});
const execution = await response.json();
if (!response.ok || execution.ok !== true || execution.result?.success !== true) {
throw new Error("Execution blocked, failed, or uncertain; inspect org evidence before retrying");
}
return execution.result; // Keep IDs and the validated outcome; never log tokens.
}
const authz = await omega.authorize(intent, {
idempotencyKey: "repo-run-42-issue-1", // Stable for retries of this intent only.
});
// If escalated, stop here. Give authz.human_action_url to a signed-in
// organization reviewer, then use the separate claim step after genuine review.
if (authz.decision !== "approved" || authz.mode !== "live" ||
!authz.execution_capability) {
throw new Error("Blocked: denied, escalated, test/shadow, or missing capability");
}
await executeApprovedIssue(authz.execution_capability);// Resume the SAME intent and executeApprovedIssue function from above.
// Only after the linked human has approved in their own organization session:
const claimed = await omega.claimAuthorization({
authorization_id: authz.authorization_id!,
agent_id: intent.agent_id,
});
// The claim response has no mode field. Its endpoint requires a live,
// execution-scoped key and returns authority only after fresh server checks.
if (claimed.ok !== true || claimed.decision !== "approved" || !claimed.execution_capability) {
throw new Error("Blocked: no claimed exact-action capability");
}
await executeApprovedIssue(claimed.execution_capability);
// Pending/rejected/expired or changed policy stays blocked. Do not cast a vote
// with the agent key, borrow a human cookie, or edit/reissue an old capability.// Save authz.authorization_id securely BEFORE calling executeApprovedIssue.
// After a disconnect/timeout, look up that ORIGINAL ID; never authorize again
// merely to recover a result. This method is unreleased repository source.
if (!authz.authorization_id) throw new Error("Missing original authorization ID");
const recovered = await omega.connectorOutcome({ authorizationId: authz.authorization_id });
const recorded = recovered.result;
if (recorded.outcome.status === "COMPLETED") {
// recorded.issueUrl is derived from the acknowledged, durably stored reference.
// Keep this receipt in your application; it is not a new execution permission.
} else {
// STARTED/UNKNOWN may have executed; NO_EFFECT still consumes the capability.
// Reconcile separately. retryAllowed is false for EVERY outcome.
}
// 404 or read outage is not proof of no effect. Propagate it; do not re-execute.
// Python: omega.connector_outcome(authorization_id=authz["authorization_id"])# Server-side only; first configure the org's GitHub connector (see Integrations).
# Requires curl, jq, a Developer+ org-bound live key, and a disposable repo you control.
INTENT='{"agent_id":"repo-agent","action":"create_issue","tool_name":"connector/github/create_issue","tool_args":{"owner":"your-org","repo":"sandbox","title":"Governed follow-up","body":"Exact issue content reviewed before dispatch"},"amount":0,"vendor":"GitHub","risk_level":"high"}'
AUTHORIZATION=$(curl --fail-with-body -sS https://omegaengine.ai/api/authorize \
-H "Content-Type: application/json" \
-H "x-api-key: $OMEGA_API_KEY" \
-H "Idempotency-Key: repo-run-42-issue-1" \
-d "$INTENT") || exit 1
# Escalated is BLOCKED: stop for genuine human review, then claim authorization.
# Never print the response: it may contain a bearer capability.
EXECUTION=$(printf '%s' "$AUTHORIZATION" | jq -ec --argjson intent "$INTENT" '
select(.decision == "approved" and .mode == "live") |
select(.execution_capability | type == "string" and length > 0) | {
connector: "github", action: "create_issue",
payload: $intent.tool_args, capabilityToken: .execution_capability
}') || exit 1
RESULT=$(printf '%s' "$EXECUTION" | curl --fail-with-body -sS https://omegaengine.ai/api/connectors/execute \
-H "Content-Type: application/json" \
-H "x-api-key: $OMEGA_API_KEY" --data-binary @-) || exit 1
printf '%s' "$RESULT" | jq -e '.ok == true and .result.success == true' >/dev/null || exit 1
# Preserve the result securely. A timeout is uncertain, not permission to issue again.import json
import os
from urllib.request import Request, urlopen
from omegaengine import OmegaClient
omega = OmegaClient.create(
api_key=os.environ["OMEGA_API_KEY"],
base_url="https://omegaengine.ai",
)
intent = {
"agent_id": "repo-agent",
"action": "create_issue",
"tool_name": "connector/github/create_issue",
"tool_args": {
"owner": "your-org",
"repo": "sandbox",
"title": "Governed follow-up",
"body": "Exact issue content reviewed before dispatch"
},
"amount": 0,
"vendor": "GitHub",
"risk_level": "high"
}
def execute_approved_issue(capability):
request = Request("https://omegaengine.ai/api/connectors/execute",
headers={"Content-Type": "application/json", "x-api-key": os.environ["OMEGA_API_KEY"]},
data=json.dumps({"connector": "github", "action": "create_issue",
"payload": intent["tool_args"], "capabilityToken": capability}).encode(), method="POST")
with urlopen(request, timeout=30) as response:
execution = json.load(response)
if execution.get("ok") is not True or execution.get("result", {}).get("success") is not True:
raise RuntimeError("Execution failed or uncertain; inspect org evidence before retrying")
return execution["result"]
authz = omega.authorize(**intent, idempotency_key="repo-run-42-issue-1")
if (authz.get("decision") != "approved" or authz.get("mode") != "live"
or not authz.get("execution_capability")):
raise RuntimeError("Blocked: stop for genuine human review if escalated")
execution = execute_approved_issue(authz["execution_capability"])
# To resume an escalated action AFTER genuine human review, use the SAME intent:
# claimed = omega.claim_authorization(
# authorization_id=authz["authorization_id"], agent_id=intent["agent_id"])
# if claimed.get("ok") is not True or claimed.get("decision") != "approved" or not claimed.get("execution_capability"):
# raise RuntimeError("Blocked: no claimed capability")
# execution = execute_approved_issue(claimed["execution_capability"])
# Claim responses have no mode field; the endpoint checks live execution scope.
# HTTP/network errors propagate. Keep execution evidence securely; never log tokens.