Skip to main content
Glama
Pisama-AI

Pisama MCP Server

Official
by Pisama-AI

Pisama

Find and fix failures in AI agent systems. No LLM calls required.

PyPI License: MIT Python 3.10+

Pisama ships 32 core heuristic detectors plus framework-specific detectors for n8n, LangGraph, Dify, and OpenClaw. They run locally with zero LLM cost on the heuristic tier. An archived run on the TRAIL benchmark reports 59.9% joint accuracy (span and category), compared with 11.9% for the best general-purpose LLM judge tested. The public confusion counts reproduce the reported macro-F1 and micro-F1. See the benchmark evidence and its reproducibility boundary.

Install

pip install pisama

Usage

from pisama import analyze

result = analyze("trace.json")  # also accepts dicts and JSON strings

for issue in result.issues:
    print(f"[{issue.type}] {issue.summary} (severity: {issue.severity})")
    print(f"  Fix: {issue.recommendation}")

CLI

pisama analyze trace.json          # Analyze a trace
pisama watch python my_agent.py    # Watch a live agent (pip install pisama[auto])
pisama replay <trace-id>           # Re-run detection on stored traces
pisama smoke-test --last 50        # Batch test recent traces
pisama detectors                   # List all 32 core detectors
pisama mcp-server                  # Start MCP server (pip install pisama[mcp])

MCP Server

Works in Cursor, Claude Desktop, and Windsurf. No API key is needed:

{
  "mcpServers": {
    "pisama": { "command": "pisama", "args": ["mcp-server"] }
  }
}

Detectors

32 core detectors plus framework-specific detectors for n8n, LangGraph, Dify, and OpenClaw. A representative selection:

Detector

What It Catches

loop

Infinite loops, retry storms, stuck patterns

coordination

Deadlocked handoffs, message storms

hallucination

Factual errors, fabricated tool results

injection

Prompt injection, jailbreak attempts

corruption

State corruption, type drift

persona_drift

Persona drift, role confusion

derailment

Task deviation, goal drift

context

Context neglect, ignored instructions

specification

Output vs. requirement mismatch

communication

Inter-agent message breakdown

decomposition

Poor task breakdown, circular dependencies

workflow

Unreachable nodes, missing error handling

completion

Premature completion, unfinished work

withholding

Suppressed findings, hidden errors

convergence

Metric plateau, regression, thrashing

overflow

Context window exhaustion

delegation

Delegation quality and task handoff failures

grounding

Claims not supported by source documents

retrieval_quality

Poor retrieval relevance or coverage

compaction_quality

Information loss during context compaction

Benchmark Results

TRAIL (trace-level failure detection, 148 traces):

Method

Joint Accuracy

GPT-5.4

11.9%

Gemini 3.1 Pro

6.8%

Pisama archived run

59.9%

Who&When (ICML 2025, multi-agent attribution, 58 hand-crafted cases):

Method

Agent Accuracy

Step Accuracy

GPT-5.4 Mini

60.3%

22.4%

Pisama + Sonnet 4

60.3%

24.1%

License

MIT

Source boundary

This repository is the public source for the MIT-licensed pisama Python package. It does not contain the Pisama Cloud backend, dashboard, calibration data, managed detection tiers, or paid automation.

-
license - not tested
-
quality - not tested
A
maintenance

Maintenance

Maintainers
Response time
Release cycle
1Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Pisama-AI/pisama-python'

If you have feedback or need assistance with the MCP directory API, please join our Discord server