Skip to main content

Runtime security monitoring for AI agents. In-process. No data leaves your environment.

Project description

scandar-guard

Runtime security monitoring for AI agents. Drop-in wrapper for Anthropic, OpenAI, LangChain, CrewAI, and AutoGen.

Zero data leaves your environment. All inspection runs in-process.

Install

pip install scandar-guard

Quick Start

from anthropic import Anthropic
from scandar_guard import guard, GuardConfig

client = guard(Anthropic(), GuardConfig(
    agent_id="my-agent",
    asg_telemetry=True,
    asg_api_key="sk_your_key",
))

# Use as normal — Guard monitors every call
response = client.messages.create(
    model="claude-sonnet-4-20250514",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello"}],
)

Context Manager (recommended)

from scandar_guard import guard_session, GuardConfig

with guard_session(Anthropic(), GuardConfig(
    agent_id="my-agent",
    asg_telemetry=True,
    asg_api_key="sk_your_key",
)) as client:
    response = client.messages.create(...)
    # session_end telemetry sent automatically on exit

CrewAI

from crewai import Crew
from scandar_guard.integrations.crewai import ScandarCrewAIMonitor

monitor = ScandarCrewAIMonitor(api_key="sk_xxx")

crew = Crew(
    agents=[...],
    tasks=[...],
    step_callback=monitor.step_callback,
    task_callback=monitor.task_callback,
)

AutoGen

from autogen import ConversableAgent
from scandar_guard.integrations.autogen import register_scandar_hooks

agent = ConversableAgent(name="my-agent", ...)
register_scandar_hooks(agent, api_key="sk_xxx")

What it detects

  • Prompt injection (direct, indirect, encoded, multi-turn)
  • Tool argument injection and data exfiltration sequences
  • Privilege escalation and anomalous tool call patterns
  • Behavioral profile deviations with per-agent baselines
  • 140+ detection rules mapped to OWASP LLM Top 10

Agent Security Graph

When asg_telemetry=True and asg_api_key are set, Guard sends anonymized telemetry (tool names, finding categories, threat scores — never prompts or content) to the Agent Security Graph for fleet-wide visibility.

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

scandar_guard-0.1.0.tar.gz (33.8 kB view details)

Uploaded Source

Built Distribution

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

scandar_guard-0.1.0-py3-none-any.whl (36.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for scandar_guard-0.1.0.tar.gz
Algorithm Hash digest
SHA256 36cfe78d9be93b897ae5bdbd4c07fd2a6730e700ccd5c63b47924cb33dfbf880
MD5 8a12b453d39ba482ffb30b34aebf9399
BLAKE2b-256 1c0f78224fad2af5745460397409ee48e70e4f77ec44ab3d8769281501d6eb0a

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for scandar_guard-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ca9438bd349117522a6bef2ff1b7fa598d573efc0c363d285d7164e709410cb2
MD5 43ea76fdca26ab7d4d26bbc712e99772
BLAKE2b-256 25ec0b786d530fddbe0e90cbbc8d11290f0e3776140dc53d58a3becfb3cb9072

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