TypeScript SDK — Runtime Execution
Execute governed HTTP and MCP operations.
typescript
const result = await korclaw.runtime.execute({
input: {
action: "api_call",
resource: "https://api.example.com/data",
agent: "ops-bot",
},
execution: {
mode: "http_proxy",
method: "GET",
url: "https://api.example.com/data",
},
agentKey: process.env.KORCLAW_AGENT_KEY,
approval_id: "optional-uuid",
});
console.log(result.execution?.status, result.execution?.body);The SDK does not expose dedicated MCP discover/call/session methods. Use runtime.execute with mode: mcp_proxy, or call the REST endpoints directly.