Skip to main content

Obol

Trust infrastructure for AI agents.

Obol monitors your AI agents: records what they do, scores trustworthiness, and detects anomalous behavior -- all on-device. Only categorical shapes (never paths, commands, or content) are sent to the cloud for cross-org threat intelligence.

Python 3.10+. Zero required dependencies.

Website: obol.grayowlresearch.com

Installation

pip install obol-sdk

For encrypted local audit logs (optional):

pip install obol-sdk[crypto]

Quick Start

1. Sign up

Go to obol.grayowlresearch.com and click Sign Up. Verify your email, then log in. Open the Dashboard and copy your API key.

2. Run setup

obol setup <your_api_key>

This single command saves your API key, scans for AI agents on your machine, registers them with Obol, and installs monitoring hooks automatically.

3. Verify installation

obol diagnose

You should see all checks passing:

  OBOL DIAGNOSTICS
  Verifying installation and coverage

  [1/6] Configuration
        ~/.obol/config.json exists
        API key: ob_live_xxx...xxxx
        Enforcement mode: audit

  [2/6] API Connection
        Connected to https://obol.grayowlresearch.com/v1
        1 agent(s) registered
  ...
  All checks passed. Obol is properly configured.

4. Use your agent

That's it. Use your AI agent normally -- Obol monitors in the background. View activity:

obol tail --agent 1    # Live event stream
obol events            # Recent events
obol status            # Overview dashboard

Supported Agents

Agent Support Setup
Claude Code Native hooks Automatic via obol setup
Cursor Native hooks Automatic via obol setup
Windsurf Native hooks Automatic via obol setup
Aider Wrap mode obol wrap -- aider
Open Interpreter Wrap mode obol wrap -- interpreter
Any command Wrap mode obol wrap -- <command>

Claude Agent SDK Integration

For agents built on the Claude Agent SDK, use ObolAgent to add PreToolUse and PostToolUse monitoring hooks directly:

from obol.agent_sdk import ObolAgent

agent = ObolAgent(api_key="ob_live_...")

# Use as hooks in your Agent SDK pipeline
# PreToolUse: enforcement gate (blocks in enforce mode if lockdown active)
# PostToolUse: monitoring, anomaly detection, event logging

ObolAgent uses the same detection engine and ML classifier as the CLI hooks. It plugs into the Agent SDK's hook system without requiring external processes.

Framework Interceptors

Obol provides interceptors for popular agent frameworks. Each interceptor runs the full on-device detection engine before every tool call, and can block dangerous operations in enforce mode.

Install with the framework extra you need:

pip install obol-sdk[langchain]       # LangChain
pip install obol-sdk[crewai]          # CrewAI
pip install obol-sdk[openai-agents]   # OpenAI Agents SDK
pip install obol-sdk[openai]          # OpenAI Chat Completions
pip install obol-sdk[autogen]         # AutoGen

LangChain

from obol.interceptors import langchain
langchain.install()

# All BaseTool.invoke() and ainvoke() calls are now monitored.
# In enforce mode, ObolSecurityBlock is raised for dangerous calls.

OpenAI Agents SDK

from obol.interceptors.openai_agents import ObolRunHooks
from agents import Runner

hooks = ObolRunHooks()  # reads enforcement_mode from ~/.obol/config.json
result = await Runner.run(agent, input="...", hooks=hooks)

# Or override enforcement mode:
hooks = ObolRunHooks(enforcement_mode="enforce")

CrewAI

from obol.interceptors import crewai
crewai.install()

# Patches Agent.execute_task() and Crew.kickoff().

Auto-Instrument All Frameworks

import obol
obol.auto_instrument()  # Detects and patches all installed frameworks

Or set OBOL_AUTO_INSTRUMENT=1 in your environment to instrument on import.

Enforcement Modes

Obol starts in audit mode by default. You control the level:

Mode Behavior
audit Log all actions, detect anomalies. Never block. Default.
alert Audit + desktop notifications on threats.
enforce Alert + auto-lockdown on critical events.

Change mode:

obol config set enforcement_mode alert

CLI Reference

# Setup and account
obol setup <api_key>            # One-command install
obol whoami                     # Account info and status
obol diagnose                   # Verify installation

# Monitoring
obol status                     # Overview dashboard
obol agents                     # List your agents
obol events --agent 5           # View events for agent
obol tail --agent 5             # Live event stream

# Security
obol alerts                     # View security alerts
obol unlock                     # Remove lockdown (enforce mode)
obol retry                      # Resend failed events from local fallback

# Configuration
obol config show                # Current settings
obol config set KEY VALUE       # Change setting
obol disable                    # Temporarily disable monitoring
obol enable                     # Re-enable monitoring

Configuration

Environment Variables

Variable Purpose
OBOL_API_KEY API key (alternative to config file)
OBOL_API_URL API endpoint override (default: https://obol.grayowlresearch.com/v1)

Config File

Location: ~/.obol/config.json

{
  "api_key": "ob_live_...",
  "api_url": "https://obol.grayowlresearch.com/v1",
  "enforcement_mode": "audit",
  "agents": { ... }
}

The config file is created automatically by obol setup. Environment variables take precedence over config file values.

Privacy

All detection runs on your machine. Obol sends only categorical shapes to the cloud for cross-org threat intelligence:

  • Action type (bash, read, write, etc.)
  • Target category (e.g., "credential_ssh", "source_code", "unknown_external" -- never the actual path or URL)
  • Content hash (not content)
  • Timing information

No file paths, URLs, command text, or content ever leaves your machine. Full audit logs stay in ~/.obol/audit/.

Troubleshooting

Cloudflare blocks API requests. The default Python urllib User-Agent is blocked by Cloudflare. Obol's HTTP client sets User-Agent: obol-sdk/0.1.0 automatically. If you are making direct API calls, set the User-Agent header explicitly.

Hooks not running. Run obol diagnose to check hook installation. If hooks are missing, run obol setup <key> again. Verify hook files exist at ~/.obol/handler.py and ~/.obol/gate.py (both should be read-only, mode 444).

Agent not being monitored. Check that your agent appears in obol agents. If not, obol setup may not have detected it. For unsupported agents, use obol wrap -- <command>.

Nothing is being blocked. The default enforcement mode is audit, which logs but never blocks. To enable blocking, set enforce mode: obol config set enforcement_mode enforce.

Config file location. All Obol configuration is stored in ~/.obol/config.json. Audit logs are in ~/.obol/audit/. Failed events (when the API is unreachable) are buffered in ~/.obol/failed_events.jsonl.

API connection issues. Run obol diagnose to test connectivity. If the API is unreachable, events are buffered locally and can be retried with obol retry. Check that OBOL_API_URL or api_url in config points to https://obol.grayowlresearch.com/v1.

License

MIT License. Copyright Gray Owl Research, LLC.

Metadata

Release files for obol-sdk 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for obol-sdk 0.3.0
File Size Uploaded Provenance Actions
obol_sdk-0.3.0.tar.gz 249.0 kB Without provenance Details for obol_sdk-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for obol-sdk 0.3.0
File Interpreter ABI Platform Actions
obol_sdk-0.3.0-py3-none-any.whl Python 3 none any Details for obol_sdk-0.3.0-py3-none-any.whl

Total release size: 525.6 kB

Release files / obol_sdk-0.3.0.tar.gz

Download URL obol_sdk-0.3.0.tar.gz
Size 249.0 kB
Tags Source
SHA-256 checksum
How to use checksums
34800a6d2a0eec75b87a9e0582ec8c9864f5b1f7e681e52f8988d571ab56f742
BLAKE2b-256 checksum
How to use checksums
f66869998459292135470a2693038abc198ba028ec8e6290b4caef7877e3ddf0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / obol_sdk-0.3.0-py3-none-any.whl

Download URL obol_sdk-0.3.0-py3-none-any.whl
Size 276.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1d4400d3a77102b066d6e7e575bd1f3f1868a8eac32744ff403afd6292b7c097
BLAKE2b-256 checksum
How to use checksums
a67a0fbaf37fb24e8b1ad43fea249d0e31bf61fe31dd9f3bb2c6bd43074bf77a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Security for obol-sdk 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page