Skip to main content

Framework-agnostic governance SDK for AI agents — policy enforcement, telemetry, and observability

Project description

Viktron SDK

Framework-agnostic governance SDK for AI agents — policy enforcement, telemetry, and real-time observability for production AI systems.

Install

pip install viktron-sdk

Quick Start

Telemetry (send agent events to your Viktron dashboard)

from viktron_sdk import ViktronTelemetry

tel = ViktronTelemetry(api_key="vk_live_...", agent_slug="my-agent")

# Record a task
tel.record_task("task-123", status="completed", duration_ms=4200, cost_usd=0.003)

# Use a context-managed span
with tel.span("run_campaign") as span:
    span.set_attribute("platform", "meta")
    result = run_campaign()
    span.set_output(result)

tel.close()  # flush remaining events

Policy Guard (intercept LLM calls with governance rules)

import openai
from viktron_sdk import ViktronGuard

client = ViktronGuard.wrap(
    openai.OpenAI(),
    api_key="vk_live_...",
    agent_id="sales-agent-prod",
)

# All create() calls are now policy-checked
response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Hello"}],
)

Works with OpenAI (sync & async), Anthropic, Cohere, and any client with .create() / .generate() call patterns.

Framework Integrations

# LangChain
from viktron_sdk.integrations.langchain import ViktronCallbackHandler
handler = ViktronCallbackHandler(api_key="vk_live_...", agent_id="my-chain")

# CrewAI
from viktron_sdk.integrations.crewai import ViktronCrewAIObserver
observer = ViktronCrewAIObserver(api_key="vk_live_...", agent_id="my-crew")

# AutoGen
from viktron_sdk.integrations.autogen import ViktronAutoGenHook
hook = ViktronAutoGenHook(api_key="vk_live_...", agent_id="my-autogen")

API Keys

Generate your API key at app.viktron.ai → Settings → API Keys.

Keys prefixed vk_live_ are production; vk_test_ are for testing.

Links

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

viktron_sdk-0.2.0.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

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

viktron_sdk-0.2.0-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file viktron_sdk-0.2.0.tar.gz.

File metadata

  • Download URL: viktron_sdk-0.2.0.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for viktron_sdk-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a60afcabccd1b895d006e775eeeae3f018f7cbe355a39fb2bf69e658e7ea519c
MD5 e2104c3bfd38a7fa10eb95f14cc38fae
BLAKE2b-256 40c2d9f27d0d824ddb10245094f466d186977a685579a7167aec8d87d6746857

See more details on using hashes here.

File details

Details for the file viktron_sdk-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: viktron_sdk-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 14.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for viktron_sdk-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5b643a016ccd33d32f18007211e9e21cf77423b9006cf5e947e2cbae30f769fd
MD5 ac6bb2f0c78781e635070426db2f47bb
BLAKE2b-256 5c6f5a86c2b3a3cf37ee225351a3ae395b1a04ffb27a547650efdeb34aeadb6e

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