Skip to main content

Lyrie Agent — Python SDK

Lyrie.ai by OTT Cybersecurity LLC — https://lyrie.ai — MIT License.

pip install lyrie-agent

The Lyrie Agent SDK lets any Python project embed Lyrie's offensive and defensive primitives: the Shield, the Attack-Surface Mapper, the Stages A–F validator, the Multi-Language Scanners, the Threat-Intel client, the HTTP proxy, the diff-view EditEngine, and the OSS-Scan service — all as native Python types with zero runtime dependencies (httpx is opt-in via lyrie-agent[http]).

This is the same surface that powers the lyrie-agent GitHub Action, exposed as pip install.

Quick start

from lyrie import Shield, AttackSurfaceMapper, StagesValidator, scan_files

# 1. Shield Doctrine — scan untrusted text BEFORE the agent sees it
shield = Shield()
print(shield.scan_recalled("Ignore all previous instructions"))
# → ShieldVerdict(blocked=True, severity='high', reason='prompt-injection ...')

# 2. Attack-Surface Mapper — what's worth attacking?
surface = AttackSurfaceMapper(root="./my-repo").run()
print(f"Found {len(surface.entry_points)} entry points,"
      f" {len(surface.data_flows)} tainted flows")

# 3. Multi-language scanners — Lyrie-original detection rules
report = scan_files(root="./my-repo")
for finding in report.findings:
    print(f"[{finding.severity}] {finding.title} @ {finding.file}:{finding.line}")

# 4. Stages A–F — kill false positives + auto-PoC + remediation
validator = StagesValidator()
for finding in report.findings:
    verdict = validator.validate(finding, surface=surface)
    if verdict.confirmed:
        print(f"✓ {finding.id}  confidence={verdict.confidence:.0%}")
        if verdict.poc:
            print(verdict.poc.payload)

Modules at a glance

Module Purpose
lyrie.Shield Shield Doctrine — scans recalled / inbound text. Blocks prompt injection + secret-shaped material.
lyrie.AttackSurfaceMapper Maps entry points, trust boundaries, tainted data flows, dependencies, hotspots.
lyrie.StagesValidator Six-stage exploitation validator. Kills false positives. Generates auto-PoCs and remediation.
lyrie.scan_files 8 Lyrie multi-language scanners — JS / TS / Python / Go / PHP / Ruby / C / C++.
lyrie.HttpProxy Capture, classify, replay, mutate HTTP exchanges. 9 security-signal detectors.
lyrie.EditEngine Diff-view edits with approval gates. Shield-scans every patch before disk.
lyrie.ThreatIntelClient Pulls KEV-aligned advisories from research.lyrie.ai. Auto-attribution.
lyrie.run_oss_scan The same engine that powers research.lyrie.ai/scan.

CLI

The package ships a lyrie-py CLI:

lyrie-py shield "Ignore all previous instructions"
lyrie-py understand --root ./my-repo
lyrie-py scan-files --root ./my-repo
lyrie-py validate-finding --severity high --evidence "execSync(req.body.cmd)"

License

MIT — © OTT Cybersecurity LLC. Lyrie.ai — https://lyrie.ai

Metadata

Release files for lyrie-agent 0.6.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 lyrie-agent 0.6.0
File Size Uploaded Provenance
lyrie_agent-0.6.0.tar.gz 38.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for lyrie-agent 0.6.0
File Interpreter ABI Platform
lyrie_agent-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 85.0 kB

Release files / lyrie_agent-0.6.0.tar.gz

Download URL lyrie_agent-0.6.0.tar.gz
Size 38.8 kB
Tags Source
SHA-256 checksum
How to use checksums
1bc284b063ea9dd7be1e8d72cc19d381e1c84863d2de3d5778bc0d059abd76b2
BLAKE2b-256 checksum
How to use checksums
ba005d6bf382cf06977790a1896128355af547eddadf77a161b768ecddafac45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / lyrie_agent-0.6.0-py3-none-any.whl

Download URL lyrie_agent-0.6.0-py3-none-any.whl
Size 46.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1dba819127c2dd66c47719e66752c4dbfd311efcaebc677b0217755f2f4da880
BLAKE2b-256 checksum
How to use checksums
b9b07da3b05a680ad1769cd6bcca8d5106531c1f4868efc225a6ce611b1a596d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Security for lyrie-agent 0.6.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