Skip to main content

Cisora SDK — flight recorder and circuit breaker for AI agents.

Project description

cisora

The flight recorder and circuit breaker for your AI agents — Python SDK.

pip install cisora
import os
from cisora import Cisora

cisora = Cisora(
    api_key=os.environ["CISORA_API_KEY"],
    agent_name="customer-support-bot",
)

# Wrap a model call
with cisora.model_call("claude-sonnet-4-5") as call:
    reply = anthropic.messages.create(...)
    call.outputs = reply

# Wrap a tool call
with cisora.tool("send_email", metadata={"recipient": email}) as call:
    result = resend.emails.send(...)
    call.outputs = result

# Synchronous policy check
decision = cisora.check(
    action_type="tool_call",
    tool_name="database_write",
    metadata={"table": "users", "field": "email"},
)
if decision["decision"] != "allow":
    raise RuntimeError(f"Blocked by Cisora: {decision}")

Async support

import asyncio
from cisora import AsyncCisora

cisora = AsyncCisora(api_key="cisora_live_...", agent_name="my-agent")

async def main():
    async with cisora.tool("send_email") as call:
        result = await send_email_async(...)
        call.outputs = result

    await cisora.flush()

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cisora-0.1.0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cisora-0.1.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file cisora-0.1.0.tar.gz.

File metadata

  • Download URL: cisora-0.1.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for cisora-0.1.0.tar.gz
Algorithm Hash digest
SHA256 73fc306a71823edeb15a49cdd7e9816ee4e4d80adc3265bd918a67215d6cae02
MD5 7f8d8a00db6a1ec6363a0092f7a6a392
BLAKE2b-256 79728925bd937e176f458da3dd4356571874b23ebf1055007e46f602a85d1405

See more details on using hashes here.

File details

Details for the file cisora-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cisora-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for cisora-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fa7390c23a86d23d941acd2a5d71ae0c01ce143b58f343f2a52ce80538127547
MD5 73366fd9a8a4998f795d1045b3caf1d3
BLAKE2b-256 b1943e219c831d470f8f381f2b1bd8b6f1093fbcf4a652f21c5aef53d0e3e3d5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page