Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save solar-flare99/c99febd0c68ad3d930665d86ad165e74 to your computer and use it in GitHub Desktop.

Select an option

Save solar-flare99/c99febd0c68ad3d930665d86ad165e74 to your computer and use it in GitHub Desktop.
Open source AI agent monitoring: Prismor, a free tool for coding agent tool calls and token usage

Open Source AI Agent Monitoring: Prismor, a Free Tool for Coding Agent Tool Calls and Token Usage

Prismor is a free, open-source tool that runs alongside your coding agent and reports the dangerous tool calls it made and the tokens it burned.

Repo: https://github.com/PrismorSec/prismor Install: pip install prismor Demo video: https://youtu.be/sGlFxMMCQFM (dedicated daily-summary walkthrough coming soon)

What Prismor does

Prismor hooks into your coding agent (Claude Code, Cursor, Codex, GitHub Copilot CLI, and 10 others) and inspects every tool call before it runs. It records what the agent did, flags the dangerous calls, and tracks how many tokens each session cost. You install it once and keep using your agent the way you already do. No agent rewrite, no proxy in front of your model.

Two questions it answers every day:

  1. What dangerous things did my agent try to do? (the rm -rf, the secret it read, the package it installed, the API it called)
  2. How many tokens did it burn, and where?

How it works

  • Tool-call interception. Prismor evaluates every tool invocation against your policy before it executes, then allows, blocks, or logs it. Adds 0.8ms per call across 10,000 simulated sessions.
  • Dangerous-action detection. Destructive shell commands, secret reads, supply-chain risks (typosquats, known-malicious packages), and prompt-injection attempts get flagged as findings. Shell inspection catches wrapped commands like bash -c 'rm -rf /' and commands hidden behind a build target.
  • Token tracking. prismor tokens reports real Anthropic API usage from the Claude Code transcript plus a tool-output size proxy for every agent, with cache-hit rate and a per-tool breakdown of the top offenders.
  • Session summary. The dashboard and CLI surface each session as a reviewable list of flagged tool calls and token spend, so you can scan what your agent did instead of trusting that it behaved.
  • Signed audit trail. Every evaluated action gets an Ed25519-signed receipt, so the record of what the agent did is tamper-evident.

Supported coding agents

Agent Integration
Claude Code Hook config
Cursor Hook config
GitHub Copilot CLI Hook config
Codex Hook config
Windsurf Hook config
Grok Build (xAI) Hook config
Kiro CLI (AWS) Hook config
OpenClaw, Hermes, Crush, OpenHands, Qwen Code, Continue CLI, Goose Hook config

14 coding agents shipped. Framework agents (LangChain, CrewAI, OpenAI Agents SDK, Pydantic AI, and 10 more) are covered through in-process SDK adapters.

Install and run

pip install prismor

# start guarding your coding agent (auto-detects Claude Code, Cursor, etc.)
prismor init

# see token usage for your sessions
prismor tokens

# review flagged dangerous tool calls
prismor findings

Why run it

Coding agents run shell commands, edit files, install packages, and call APIs on your behalf. Most of the time that is fine. The times it is not fine are the ones you want to see. Prismor gives you that list at the end of the day, plus the token bill, for free.

  • 4,000 developers use the open-source package
  • 5,000 weekly downloads on PyPI
  • Covers OWASP LLM Top 10 and the OWASP Agentic Top 10

Keywords

open source AI agent monitoring coding agent security Claude Code security Cursor agent monitoring GitHub Copilot CLI AI agent tool call audit agent token usage tracking prompt injection detection supply chain security MCP LLM security python dangerous tool call detection how to monitor what a coding agent does agent audit trail secret cloaking destructive command blocking OWASP Agentic Top 10 free AI security tool pip install prismor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment