Skip to main content

aisoc-sandbox

Run an AiSOC agent investigation offline in under 30 seconds. No Docker, no API key, no network.

License: MIT PyPI release

aisoc-sandbox is the quickest possible on-ramp to AiSOC. It walks one alert fixture through a four-stage agent funnel — Detect → Triage → Hunt → Respond — using a deterministic offline reasoner in place of a real LLM, and prints the resulting Investigation Ledger to your terminal.

It is the simulator-equivalent of the production services/agents/ graph, collapsed into a single zero-dependency Python package. When you're ready to run the real stack: pnpm aisoc:demo from a fresh clone of AiSOC.

Why this exists

The production AiSOC stack needs Postgres, Kafka, Redis, an LLM API key, and ~5 minutes to boot. That's the right cost for a buyer evaluating against their own alert data — but it's the wrong cost for a developer who just wants to see how the agent reasons before they commit their evening.

This package collapses the boot time to < 5 seconds and the disk footprint to < 50 KB. The trade-off is that the reasoning is deterministic and the tools are simulated (not executed); see "Differences from the production stack" below.

Install

# Today (from this monorepo):
git clone https://github.com/beenuar/AiSOC.git
cd AiSOC && pip install -e packages/aisoc-sandbox

# Once published to PyPI (ready, unpublished — the upload is blocked on
# registry credentials, which is an account action, not a code change):
#   pip install aisoc-sandbox
#   pipx run aisoc-sandbox demo

Python 3.10+ on Linux / macOS / Windows. Zero runtime dependencies.

Quick start

# Walk the default scenario (lateral-movement) through the funnel
aisoc-sandbox demo

# Pick a different bundled scenario
aisoc-sandbox demo --scenario aws-credential-exfil

# Use your own scenario JSON
aisoc-sandbox demo --file ./my-alert.json

# Machine-readable output
aisoc-sandbox demo --scenario phishing-payload --json | jq

# What scenarios are bundled?
aisoc-sandbox scenarios

Bundled scenarios

Five scenarios ship with the package; each one is a single JSON file under src/aisoc_sandbox/scenarios/ and is small enough to read end-to-end:

ID Title MITRE Severity
lateral-movement Impossible-travel Okta sign-in T1078, T1078.004 high
aws-credential-exfil IAM keys used from new ASN, then s3:GetObject flood T1552, T1567, T1078.004 critical
phishing-payload Click-through to credential-harvest page T1566, T1566.002 high
kubernetes-privesc Namespace SA bound to cluster-admin T1098, T1078 critical
github-token-theft PAT leaked, six private repos cloned in 11 s T1078, T1555, T1567 high

What you'll see

Each aisoc-sandbox demo run emits a four-step ledger:

Investigation Ledger
  4 steps · 12 ms total · synthetic offline run (no LLM, no Docker)

Step  0  DETECT  DetectAgent  (3 ms)
  Action     Match incoming events against detection ruleset
  Rationale  2 event(s) ingested; matched detection ruleset against MITRE techniques T1078, T1078.004.
  · events_ingested: 2
  · mitre_techniques: ['T1078', 'T1078.004']
  · severity_at_intake: high
  · entity:user: alice@example.com
  → would-call rules.match({"rule_count": "800+", ...})
  → would-call fusion.score({"window_minutes": 15})
  Decision   Open alert at severity=high

Step  1  TRIAGE  TriageAgent  (3 ms)
  Action     Score alert confidence + cross-reference with prior cases
  Rationale  Authenticated session signals look legitimate at the protocol layer, but the geo pivot between sequential events is physically impossible — classic credential takeover.
  ...

The shape mirrors the production Investigation Rail at /alerts/[id]. The four stages, the evidence chips, and the "Decision" lines are the same — only the LLM rationale and tool execution are simulated.

Library use

The package's surface is small enough to embed:

from aisoc_sandbox import load_scenario, run_investigation

scenario = load_scenario("aws-credential-exfil")
ledger = run_investigation(scenario)

# Iterate the steps
for step in ledger:
    print(step.step, step.agent, step.action, step.decision)

# Or render to a stream (TTY-aware colour)
ledger.render_human()

# Or serialise
print(ledger.to_json())

Differences from the production stack

aisoc-sandbox Production services/agents/
LLM Deterministic template-driven stub OpenAI / Anthropic / Ollama via LiteLLM
Tool calls Simulated as "would-call(name, args)" Dispatched to connector / action services
Persistence In-memory; one CLI invocation Postgres investigation_events table
Latency Synthetic per-stage numbers Real LLM + tool latency
Boot time < 5 s ~5 min cold, ~3.5 min warm
Dependencies None Postgres + Kafka + Redis + LLM API key

This is on purpose. The sandbox is the on-ramp, not a replacement: it gives you 30-second visibility into how the funnel hangs together so you can decide whether the full demo is worth the 5-minute boot.

License

MIT — see the repo LICENSE.

Metadata

Release files for aisoc-sandbox 0.1.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 aisoc-sandbox 0.1.0
File Size Uploaded
aisoc_sandbox-0.1.0.tar.gz 24.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aisoc-sandbox 0.1.0
File Interpreter ABI Platform
aisoc_sandbox-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 46.5 kB

Release files / aisoc_sandbox-0.1.0.tar.gz

Download URL aisoc_sandbox-0.1.0.tar.gz
Size 24.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d4a634dacd1c83efb2079cd0e307a49b91262f448c1ae0f715190691bcb03a83
BLAKE2b-256 checksum
How to use checksums
c02340a0d56c4afac00f349bc7e0e3311f7c8f996de00eaebe31cb05003730a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.

Transparency log

Release files / aisoc_sandbox-0.1.0-py3-none-any.whl

Download URL aisoc_sandbox-0.1.0-py3-none-any.whl
Size 22.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
047d4d1aa1070372a68936d02582aa99f01cb63c28558557e8518acd449df5ad
BLAKE2b-256 checksum
How to use checksums
a7c2e9bb028d2f3d7c0c12bcc47106b54d7e8d410e67d962ea77712ede54bc6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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