kyra docs

Quickstart

Integrate Kyra in under 10 minutes.

Quickstart

1. Create an account

Go to kyratech.io and sign up. You will be placed on the Free plan automatically.

2. Get your API key

In the dashboard, go to Settings → API Keys and create a new key.

3. Register your agent

Go to Agents → Register Agent. Give it a name and description. You receive an agent ID to use in SDK calls.

4. Install the SDK

TypeScript

npm install @kyra-sdk/typescript

Go

go get github.com/kyra-sdk/go

5. Initialize the client

Python

from kyra import KyraClient
kyra = KyraClient(api_key="YOUR_API_KEY")

TypeScript

import { KyraClient } from '@kyra-sdk/typescript'
const kyra = new KyraClient({ apiKey: 'YOUR_API_KEY' })

Go

import kyra "github.com/kyra-sdk/go"
client := kyra.NewClient(kyra.WithAPIKey("YOUR_API_KEY"))

6. Wrap a tool call

Before your agent executes a tool, ask Kyra whether it should proceed.

Python

decision = kyra.evaluate(
    agent_id="YOUR_AGENT_ID",
    tool_name="transfer_funds",
    parameters={"amount": 5000, "to_account": "EXT-4821"},
    user_id="usr_123"
)

if decision.outcome == "ALLOW":
    result = transfer_funds(amount=5000, to_account="EXT-4821")
elif decision.outcome == "BLOCK":
    raise PermissionError(decision.reason)
elif decision.outcome == "ESCALATE":
    notify_human(decision.escalation_id)

TypeScript

const decision = await kyra.evaluate({
  agentId: 'YOUR_AGENT_ID',
  toolName: 'transferFunds',
  parameters: { amount: 5000, toAccount: 'EXT-4821' },
  userId: 'usr_123'
})

if (decision.outcome === 'ALLOW') {
  await transferFunds({ amount: 5000, toAccount: 'EXT-4821' })
} else if (decision.outcome === 'BLOCK') {
  throw new Error(decision.reason)
} else if (decision.outcome === 'ESCALATE') {
  await notifyHuman(decision.escalationId)
}

Go

decision, err := client.Evaluate(ctx, kyra.EvaluateRequest{
    AgentID:    "YOUR_AGENT_ID",
    ToolName:   "TransferFunds",
    Parameters: map[string]any{"amount": 5000, "toAccount": "EXT-4821"},
    UserID:     "usr_123",
})

switch decision.Outcome {
case kyra.Allow:
    transferFunds(5000, "EXT-4821")
case kyra.Block:
    log.Println("Blocked:", decision.Reason)
case kyra.Escalate:
    notifyHuman(decision.EscalationID)
}

7. Add a policy

In the dashboard, go to Policies and add your first policy. For example:

Block any transfer over $10,000 without manager approval.

Kyra enforces this on every matching tool call — without changing your agent.

Next steps