Skip to main content
AI LAB

System of Oversight and Monitoring for Agents

SOMA is a closed-loop behavioral guidance system. It watches every action an AI agent takes, computes behavioral pressure from multiple signals, and injects corrective feedback before problems escalate. Open-source, MIT licensed.

FEATURES

Capabilities

01

Real-Time Behavioral Monitoring

6 behavioral signals per action — uncertainty, drift, error rate, goal coherence, cost, and token usage. Watches everything, catches problems early.

02

Predictive Escalation

Warns ~5 actions before problems escalate. Trend extrapolation and pattern detection catch error streaks, thrashing, and blind writes before they compound.

03

Corrective Guidance Injection

Injects specific, actionable advice directly into the agent's context. "Read the file before editing" — the agent reads it and changes its behavior.

04

Epistemic Uncertainty Classification

Distinguishes knowledge gaps from inherent ambiguity via output entropy analysis. Knowledge gaps escalate, inherent ambiguity dampens.

05

Adaptive Thresholds

Tracks intervention outcomes and tunes thresholds over time. Every agent develops its own behavioral profile — no one-size-fits-all.

06

Framework Integrations

Native adapters for Claude Code, LangChain, CrewAI, AutoGen, and any Python agent via the SDK. pip install soma-ai and go.

BENEFITS

Why It Matters

Open-source under MIT license — full transparency, no vendor lock-in
773 tests passing — production-grade reliability
Zero-config Claude Code integration via soma setup-claude
Catches blind writes, retry loops, scope drift, and analysis paralysis
Half-life temporal modeling predicts agent degradation over time
Works with any LLM provider — OpenAI, Anthropic, open-source models
15min
Avg Response Time
99.9%
Uptime SLA
98%
Client Satisfaction
200+
Clients Served
Your AI agent just edited 5 files without reading any of them. It's retrying the same failing command for the 8th time. It wandered from your auth module into unrelated config files. And you have no idea until it's too late.SOMA sees all of this in real-time — and steers the agent back on track.
22 STEPS PER ACTION

The Pipeline

Watch

6 behavioral signals per action — uncertainty, drift, error rate, goal coherence, cost, token usage

Classify

Epistemic vs. aleatoric uncertainty via output entropy — knowledge gaps escalate, inherent ambiguity dampens

Guide

Injects specific advice into agent context — "3 writes without a Read — read the target file first"

Predict

Warns ~5 actions before escalation — trend extrapolation + pattern detection catches problems early

Learn

Tracks intervention outcomes and tunes thresholds over time — no static rules, no false positives

Model

Half-life temporal modeling predicts agent degradation — warns before reliability drops below 50%

PROGRESSIVE ESCALATION

4-Mode Guidance

OBSERVE0–24%

Silent monitoring. Status line shows vitals. Positive feedback when agent behaves well.

GUIDE25–49%

Soft suggestions injected into context. Never blocks anything — just nudges.

WARN50–74%

Insistent warnings with increasing urgency. Still never blocks normal tools.

BLOCK75%+

Blocks ONLY destructive operations: rm -rf, force push, .env writes. Everything else works.

OrderChaos

Order vs. chaos — SOMA keeps your agents on the left side

WHAT AGENTS SEE

Real Output

soma-ai

$ pip install soma-ai

$ soma setup-claude

✓ SOMA configured for Claude Code

// Real-time guidance injected into agent context:

[do] Read main.py before editing — 3 writes without a Read

[do] STOP retrying, try a different approach — 4 consecutive failures

[do] Start writing code — 7 reads, 0 writes in last 10 actions

[predict] escalation in ~5 actions (error_streak)

[scope] expanded to tests/, config/ — is this intentional?

[quality] grade=D (2 syntax errors, 3/8 bash commands failed)

[✓] good — read before writing, clean edits

// Status line:

SOMA: #42 [implement] ctx=73% focused

COMPARISON

Why Not Just Guardrails?

ApproachObservesTells AgentGuidesAdaptsMulti-Agent
Guardrails (NeMo, Lakera)Prompt onlyNoFilterNoNo
Observability (LangSmith)YesNoNoNoPartial
Rate LimitersNoNoToken capNoNo
SOMA6 signals7 patterns4 modesSelf-learningTrust graph
INTEGRATIONS

Works Everywhere

Claude Code

Zero-config via soma setup-claude

Python SDK

soma.wrap() for any Anthropic/OpenAI client

LangChain

SomaLangChainCallback adapter

CrewAI

SomaCrewObserver attachment

AutoGen

SomaAutoGenMonitor integration

Any Agent

soma.track() context manager

773
Tests Passing
60
Modules
10,100
Lines of Code
3
Dependencies
THE MATH

No Black Boxes

P = 0.7 · mean(wᵢpᵢ) + 0.3 · max(pᵢ)

Aggregate pressure — catches gradual and acute failures

z = (x - μ) / max(σ, 0.05) → sigmoid(z)

Signal normalization — adapts to each agent's baseline

μₜ = 0.15 · x + 0.85 · μₜ₋₁

EMA baseline — half-life of ~4.3 observations

U = 0.30·retry + 0.25·tool + 0.20·fmt + 0.25·entropy

Composite uncertainty from 4 behavioral components

D = 1 - cos(v_current, v_baseline)

Drift via cosine distance on behavior vectors

P(t) = exp(-ln(2) · t / half_life)

Temporal reliability decay

No neural networks. No cloud dependency. No API keys. No telemetry. Just math.

MIT licensed. Forever.

View on GitHub
pip install soma-ai

Try SOMA

pip install soma-ai — open-source, free, and ready to monitor your agents today.