Tree-sitter AST detection
Python, JavaScript, TypeScript, TSX — all parsed at AST
level, not regex. The scanner catches dynamic imports,
importlib.import_module("anthropic"),
require("openai"), and SDK constructor calls
that confirm actual usage (not just "we imported it").
Detects: 9 LLM SDKs + 5 agent frameworks.
Workflow-graph extraction
For LangGraph, CrewAI, AutoGen, Mastra, and Vercel AI SDK
the scanner walks the code's structural definition
— node registrations, edge connections, handoff targets —
and emits a typed graph: nodes, edges, agents, tools,
risk signals.
Output schema: { framework, nodes[], edges[], entry_points[], terminals[], risk_signals[] }.
Tool inventory + arg shapes
Every @tool decorator, every
function_call spec, every Vercel AI SDK
tools object — extracted with the argument
shape, JSON schema (if present), and description string
the LLM sees.
Feeds the policy generator + capability risk scorer.
Custom rules layer
Drop a YAML file in rules/ with
id / pattern / severity and the scanner runs
your matchers alongside the built-ins. Regex, AST
predicate, or tool-call shape — your choice.
See /features/customize.
Already-protected detection
If a file already imports the AEGIS SDK or routes through
the gateway, it's flagged protected so you
don't double-instrument or generate redundant policies.
Idempotent across re-scans + injects.
Entry-point ranking
Confidence buckets — high (workflow
entry-point or main.py + LLM import),
medium (helper file with imports),
low (HTTP-only, no convention).
Wizard auto-injects high-confidence candidates; medium
gates behind operator review.
No more "AEGIS instrumented test fixture by accident".