AI Agent Quality & Security Monitoring Platform — Real-time execution tracking, loop detection, security analysis, and multi-agent swarm monitoring for Strands agents using Amazon Nova
Project description
Norn
AI Agent Quality & Security Monitoring Platform
Real-time monitoring and testing platform for Strands AI agents. Import agents from GitHub or ZIP, analyze their code with AST-based static analysis, detect security and quality issues, execute agents in isolated workspaces, and monitor every tool call in real time — including multi-agent swarm pipelines.
The Problem
AI agents are powerful but unpredictable. In production, they:
- Get stuck in infinite loops — repeating the same tool call without progress
- Drift away from their task — doing unrelated work instead of what was asked
- Leak sensitive data — exposing API keys, credentials, or private information
- Execute malicious instructions — prompt injection in tool outputs or system prompts
- Hallucinate results — claiming success without actually completing the task
- In multi-agent pipelines — silently diverge from the original goal as tasks are handed off between agents
Without observability, these failures go undetected.
The Solution
Norn provides end-to-end observability for AI agent execution:
1. Import & Analyze
Import agents from GitHub (with subfolder support) or ZIP files. Norn automatically:
- Runs AST-based static analysis to discover tools, functions, dependencies, and entry points
- Detects missing packages and installs them (PyPI and local)
- Identifies security issues (hardcoded credentials, missing configurations)
- Generates AI-powered test tasks tailored to the agent's actual capabilities using Amazon Nova
2. Execute & Monitor
Run agents directly from the dashboard with real-time monitoring:
- Live WebSocket updates stream every tool call as it happens
- Per-step relevance scoring (0–100): is this step helping complete the task?
- Per-step security scoring (0–100): is this step safe?
- Deterministic loop and drift detection with configurable thresholds
- Three guard modes: Monitor (observe), Intervene (stop on loops), Enforce (stop on security violations)
3. Workspace Isolation
Each agent run gets its own sandboxed working directory:
- Output files go to
norn_logs/workspace/{session_id}/— not the project root - Agents receive the
NORN_WORKSPACEenvironment variable pointing to their directory - Clean separation between runs with no cross-contamination
4. Swarm Monitoring
Monitor chains of agents that work together as a pipeline:
- Group sessions by
swarm_id— see the full pipeline at a glance - Alignment score: measures how closely each agent's task aligns with the first agent's original intent
- Per-agent quality, efficiency, and security scores displayed in pipeline order
- AI-powered pipeline coherence analysis identifies where a chain starts drifting off-goal
5. Session Evaluation
After execution completes, Amazon Nova performs deep analysis:
- Task completion assessment with confidence score
- Per-tool usage analysis: was each tool used correctly, unnecessarily, or incorrectly?
- Decision-making pattern observations
- Efficiency explanation (actual steps vs. expected)
- Actionable recommendations for improvement
6. Shadow Browser Audit (optional — requires Nova Act)
When agents visit URLs, Nova Act runs a shadow browser session to independently verify:
- The page content matches what the agent reported
- No prompt injection payloads are embedded in the page
- No phishing indicators, suspicious redirects, or hidden malicious elements
To enable: pip install -e ".[browser]" and set NOVA_ACT_API_KEY in your .env file.
Quick Start
Prerequisites
| Requirement | Version | Notes |
|---|---|---|
| Python | 3.10+ | Backend |
| Node.js | 18+ | Dashboard |
| AWS account | — | Amazon Bedrock access for Nova models |
Installation
# Clone and install
git clone https://github.com/hashtagemy/norn.git
cd norn
python -m venv .venv && source .venv/bin/activate
pip install -e ".[api]"
# Configure AWS credentials
cp .env.example .env
# Edit .env — add your AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_DEFAULT_REGION
# Install dashboard
cd norn-dashboard && npm install && cd ..
Start Norn
# Terminal 1 — Backend
source .venv/bin/activate
python -m norn.api
# API available at http://localhost:8000
# Terminal 2 — Dashboard
cd norn-dashboard && npm run dev
# Dashboard available at http://localhost:3000
Install via PyPI (SDK only — no dashboard)
To use the Norn SDK (NornHook) inside your own projects:
pip install norn-sdk
See QUICKSTART.md for detailed setup instructions.
Integration
Add Norn monitoring to your Strands agent with a single line of code.
Hook Integration (recommended)
Install norn-sdk in your agent's virtual environment:
pip install norn-sdk
Then add the hook to your agent:
from norn import NornHook
from strands import Agent
hook = NornHook(
norn_url="http://localhost:8000", # streams to dashboard in real time
agent_name="My Agent",
)
agent = Agent(tools=[...], hooks=[hook])
Every tool call is now tracked on the dashboard in real time.
Multi-Agent Swarm
Monitor a pipeline of agents working together. Link them with a shared swarm_id:
from datetime import datetime
from norn import NornHook
from strands import Agent
run_id = datetime.now().strftime("%Y%m%d-%H%M%S")
# Agent A — Researcher
hook_a = NornHook(
norn_url="http://localhost:8000",
agent_name="Researcher",
swarm_id=f"my-pipeline-{run_id}",
swarm_order=1,
)
agent_a = Agent(tools=[...], hooks=[hook_a])
result_a = agent_a("Find recent AI safety research trends")
# Agent B — Writer (receives output from Agent A)
hook_b = NornHook(
norn_url="http://localhost:8000",
agent_name="Writer",
swarm_id=f"my-pipeline-{run_id}",
swarm_order=2,
handoff_input=str(result_a)[:500],
)
agent_b = Agent(tools=[...], hooks=[hook_b])
agent_b(f"Write a report based on: {result_a}")
Both sessions appear together under Swarm Monitor with an alignment score and AI-powered pipeline analysis.
NornHook Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
norn_url |
str |
None |
Dashboard API URL. If set, steps stream to the dashboard in real time. |
agent_name |
str |
None |
Human-readable label shown on the dashboard. |
mode |
str |
"monitor" |
Guard mode: monitor, intervene, or enforce. |
max_steps |
int |
50 |
Maximum steps before intervention (in intervene mode). |
enable_ai_eval |
bool |
True |
Enable Amazon Nova AI evaluation for quality scoring. |
session_id |
str |
None |
Fixed session ID. If set, steps accumulate across runs on the same dashboard card. |
swarm_id |
str |
None |
Shared ID to group agents into a pipeline. Must be identical for all agents in a run. |
swarm_order |
int |
None |
Position in the swarm pipeline (1 = first agent). |
handoff_input |
str |
None |
Data received from the previous agent — visible on the dashboard for debugging. |
loop_window |
int |
5 |
Number of recent steps to check for loop patterns. |
loop_threshold |
int |
3 |
Repetitions within window that trigger a loop alert. |
max_same_tool |
int |
10 |
Maximum times a single tool can be called before triggering an alert. |
Guard Modes
Norn supports three operating modes, configurable via code, environment variable, or the dashboard UI:
| Mode | Behavior |
|---|---|
| Monitor | Observe and record only. All tool calls proceed normally. Issues are logged but never blocked. |
| Intervene | Automatically terminates the session when a critical loop is detected (severity >= 8) or the step limit is exceeded. |
| Enforce | Terminates the session on any serious security violation (SSL bypass, prompt injection, data exfiltration, credential leak, unauthorized access). Also scans agent system prompts before execution and blocks malicious instructions. |
Amazon Nova Models
Norn uses the Amazon Nova model family for all AI-powered features:
| Feature | Model | Purpose |
|---|---|---|
| Smart Task Generation | Nova 2 Lite | Generates structured, tool-aware test tasks from agent capabilities |
| Per-Step Scoring | Nova 2 Lite | Real-time relevance (0–100) and security (0–100) scoring during execution |
| Session Evaluation | Nova 2 Lite | Post-run analysis: task completion, tool usage, decision patterns, recommendations |
| Swarm Analysis | Nova 2 Lite | Pipeline coherence assessment across multi-agent chains |
| Shadow Browser Audit | Nova Act | Autonomous browser that independently visits URLs and detects prompt injection |
Model ID (configurable via .env):
BEDROCK_NOVA_LITE_MODEL=us.amazon.nova-2-lite-v1:0
Dashboard
Modern React dashboard with real-time monitoring capabilities:
| Feature | Description |
|---|---|
| Agent Management | Import from GitHub or ZIP, view registered agents, run with one click |
| Code Analysis | AST-based discovery of tools, functions, dependencies, and entry points |
| Smart Task Generation | AI-generated test tasks based on each agent's actual tools and README |
| Dependency Management | Automatic detection and installation of missing packages |
| Real-Time Monitoring | WebSocket-based live updates during agent execution |
| Session History | Detailed reports for all past executions with drill-down views |
| Test Results | Five automated checks: loop detection, task completion, efficiency, security, overall quality |
| AI Analysis | Amazon Nova evaluation with tool usage analysis, decision observations, and recommendations |
| Swarm Monitor | Multi-agent pipeline view with alignment score, agent ordering, and coherence analysis |
| Shadow Browser Audit | Nova Act verification results for web-browsing agents |
| Audit Logs | Filterable event stream with severity levels, agent/session filtering |
| Configuration | Guard mode, thresholds, and feature toggles adjustable from the UI |
Tech stack: React 19 + TypeScript + Tailwind CSS + Vite | FastAPI + Python 3.10+ | WebSocket
Security Features
Norn provides multi-layered security analysis combining deterministic rules and AI evaluation:
Deterministic Checks (fast, runs on every step)
- SSL bypass detection — flags
verify_ssl=Falseand similar patterns - Shell injection detection — catches
shell=Trueand shell metacharacters in commands - Credential exposure — detects sensitive field names (passwords, API keys, tokens) in tool arguments
- Empty input detection — flags tools receiving trivially empty data (potential analysis bypass)
- Prompt injection scanning — regex-based detection of manipulation patterns in tool outputs
- System prompt analysis — scans agent instructions for data exfiltration, reconnaissance, and covert commands
AI-Powered Analysis (runs via Amazon Nova)
- Per-step security scoring with reasoning
- Data exfiltration pattern detection
- Credential leak identification
- Session-level security assessment
Credential Masking
Sensitive values (password, api_key, token, secret, etc.) are automatically redacted to ***REDACTED*** before writing to logs or streaming to the dashboard — including values nested inside dicts and lists.
Quality Levels
| Level | Meaning |
|---|---|
| EXCELLENT | Task completed efficiently with no issues |
| GOOD | Task completed with minor inefficiencies |
| POOR | Task partially completed or significantly inefficient |
| FAILED | Task not completed or serious security violation |
| STUCK | Infinite loop detected |
| PENDING | Evaluation not yet complete |
Architecture
graph TB
subgraph Dashboard["React Dashboard :3000"]
UI[Agent Import · Execution · Monitoring<br/>Swarm Monitor · Browser Audit · Audit Logs]
end
subgraph Backend["FastAPI Backend :8000"]
API[10 Routers · WebSocket · REST API]
Runner[Agent Execution · Workspace Isolation]
end
subgraph Core["Norn Core"]
Hook[NornHook<br/>Strands HookProvider]
Analyzer[StepAnalyzer<br/>Loop · Drift · Security]
Evaluator[QualityEvaluator<br/>Amazon Nova]
Browser[ShadowBrowser<br/>Nova Act]
end
subgraph AWS["AWS Services"]
Bedrock[Amazon Bedrock<br/>Nova 2 Lite]
NovaAct[Nova Act<br/>Browser Automation]
end
UI -->|WebSocket + REST| API
API --> Runner
Runner --> Hook
Hook --> Analyzer
Hook --> Evaluator
Evaluator --> Bedrock
Hook --> Browser
Browser --> NovaAct
For detailed architecture documentation with component diagrams, data flows, API reference, configuration tables, and project structure, see ARCHITECTURE.md.
License
Apache 2.0 — See LICENSE for details.
Built With
Strands Agents | Amazon Bedrock | Amazon Nova | Nova Act | FastAPI | React | Tailwind CSS | Vite
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file norn_sdk-0.2.2.tar.gz.
File metadata
- Download URL: norn_sdk-0.2.2.tar.gz
- Upload date:
- Size: 87.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
294bcaddc830946c3f14f4076a36ee41c5eb4369b569fde4f3d210b90f056629
|
|
| MD5 |
3d9df8765707b1f93351401a4c03274c
|
|
| BLAKE2b-256 |
f82492875cbb97c89a7495152d1a362dd8ec430cff0b612ac21d2a77825bbbe5
|
Provenance
The following attestation bundles were made for norn_sdk-0.2.2.tar.gz:
Publisher:
publish-pypi.yml on hashtagemy/norn
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
norn_sdk-0.2.2.tar.gz -
Subject digest:
294bcaddc830946c3f14f4076a36ee41c5eb4369b569fde4f3d210b90f056629 - Sigstore transparency entry: 1172153517
- Sigstore integration time:
-
Permalink:
hashtagemy/norn@e694e65146411706dffd738e0b290cb2e336562d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/hashtagemy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@e694e65146411706dffd738e0b290cb2e336562d -
Trigger Event:
push
-
Statement type:
File details
Details for the file norn_sdk-0.2.2-py3-none-any.whl.
File metadata
- Download URL: norn_sdk-0.2.2-py3-none-any.whl
- Upload date:
- Size: 96.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
194d29ce40a4eb39dd8db850ebf2dcc6806f1bfbb8613ec6ec1207466ac4338a
|
|
| MD5 |
d22cdc3515fc4b865f58c1084096da9d
|
|
| BLAKE2b-256 |
4aa0929ae711385165a99443a9548cdf1bc69e10c80021891ed291e1695e134b
|
Provenance
The following attestation bundles were made for norn_sdk-0.2.2-py3-none-any.whl:
Publisher:
publish-pypi.yml on hashtagemy/norn
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
norn_sdk-0.2.2-py3-none-any.whl -
Subject digest:
194d29ce40a4eb39dd8db850ebf2dcc6806f1bfbb8613ec6ec1207466ac4338a - Sigstore transparency entry: 1172153538
- Sigstore integration time:
-
Permalink:
hashtagemy/norn@e694e65146411706dffd738e0b290cb2e336562d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/hashtagemy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@e694e65146411706dffd738e0b290cb2e336562d -
Trigger Event:
push
-
Statement type: