Governance and audit SDK for AI agents
Project description
orka-sdk
Governance and audit SDK for AI agents. Add policy enforcement, immutable audit trails, and trust scoring to any agent with one decorator.
Install
pip install orka-sdk
Quickstart
import orka
# Initialize once at startup (get your API key at orka.ia.br)
orka.init(api_key="orka_your_key_here")
# Wrap any agent function
@orka.guard(agent_id="your-agent-uuid", task_type="summarize")
def summarize(text: str) -> str:
return openai_client.chat(text)
# Works with async too
@orka.guard(agent_id="your-agent-uuid", task_type="financial_transfer", risk="HIGH")
async def transfer_funds(amount: float, to_account: str) -> dict:
return await payment_api.transfer(amount, to_account)
That's it. Every call now:
- ✅ Checks your X-Shield policies before executing
- ✅ Logs to X-Ledger with immutable hash chain
- ✅ Updates the agent's trust score
- ✅ Blocks execution if policy denies it (raises
OrkaPolicyBlocked)
Handle policy blocks
from orka import OrkaPolicyBlocked
try:
result = transfer_funds(10000, "acc_123")
except OrkaPolicyBlocked as e:
print(f"Blocked: {e.reason}")
print(f"Policy: {e.policy_name}")
Works with LangChain, CrewAI, any framework
from langchain.agents import AgentExecutor
import orka
orka.init(api_key="orka_...")
@orka.guard(agent_id="langchain-agent-uuid", task_type="web_search")
def run_agent(query: str) -> str:
return agent_executor.invoke({"input": query})
Never breaks your production code
If Orka is unreachable, your agent continues running. Governance failures are silent — your users never see Orka errors.
Risk levels
@orka.guard(agent_id="...", task_type="...", risk="HIGH")
# EU AI Act risk classification: UNACCEPTABLE | HIGH | LIMITED | MINIMAL | NONE
Environment variables
ORKA_API_KEY=orka_your_key
ORKA_BASE_URL=https://orka-backend.onrender.com/api/v1 # optional
import os, orka
orka.init(api_key=os.environ["ORKA_API_KEY"])
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file orkaia-0.1.0.tar.gz.
File metadata
- Download URL: orkaia-0.1.0.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2193655d8b49191c66c334491b179ea4fb28e4fd0b483965ea3ece98aac838e
|
|
| MD5 |
35ad60d462327bc6fcb8ef0e2b64a82e
|
|
| BLAKE2b-256 |
52ea1b55116cd2e38e9168281e9408558271e128f1d66c7906c3d7ee3d20d4d8
|
File details
Details for the file orkaia-0.1.0-py3-none-any.whl.
File metadata
- Download URL: orkaia-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08a9fbe26f21f6ced8a8e10eb2dcc2ded2a5be102bcbfa945d9620042f21e303
|
|
| MD5 |
903b628e16706fabf02880c917d03318
|
|
| BLAKE2b-256 |
a6971ae432629a3a73c01d9a0f8b4e96c837e9fccd7c0c1696504fda002c5fa3
|