Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/PatterAI/skillsnpx agentmods add skills/patterai/skills/inspect-calls-and-metricsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/patterai/skills/inspect-calls-and-metrics)<a href="https://agentmods.dev/skills/patterai/skills/inspect-calls-and-metrics"><img src="https://agentmods.dev/badge/skills/patterai/skills/inspect-calls-and-metrics/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/patterai/skills/inspect-calls-and-metrics"><img src="https://agentmods.dev/badge/skills/patterai/skills/inspect-calls-and-metrics.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00137 | $0.02798 |
| Opus 5.5 | $0.00055 | $0.01119 |
| Sonnet 5.5 | $0.00027 | $0.00560 |
| Haiku 4.5 | $0.00014 | $0.00280 |
Grade A, and why
inspect-calls-and-metrics scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
Example with curl: How it starts
The opening of the file, as written. The whole thing — 289 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Inspect calls and metrics with Patter
Patter persists every call to an in-memory MetricsStore (500-call ring
buffer by default), optionally backed by disk. The dashboard surfaces
live calls, transcripts, latency breakdowns, per-leg cost, and recordings.
You can also pull CallMetrics programmatically and export to CSV/JSON
for offline analysis.
Mount the live dashboard
Patter ships a dashboard route you can mount on the same server as your
agent. Visit http://localhost:8000/dashboard to see live calls.
Python
import asyncio
from getpatter import Patter, Twilio, OpenAIRealtime2
async def main():
phone = Patter(carrier=Twilio(), phone_number="+15550001234")
agent = phone.agent(
engine=OpenAIRealtime2(),
system_prompt="...",
first_message="Hi!",
)
# dashboard=True mounts /dashboard (UI) + /api/calls (REST) + /sse (live stream)
await phone.serve(agent, tunnel=True, dashboard=True)
asyncio.run(main())
TypeScript
import { Patter, Twilio, OpenAIRealtime2 } from "getpatter";
const phone = new Patter({ carrier: new Twilio(), phoneNumber: "+15550001234" });
const agent = phone.agent({
engine: new OpenAIRealtime2(),
systemPrompt: "...",
firstMessage: "Hi!",
});
await phone.serve({ agent, tunnel: true, dashboard: true });
Open http://localhost:8000/dashboard. Live calls appear at the top, with
real-time transcript, current cost, and latency p50/p90/p95/p99.
Read metrics in code
CallMetrics is the canonical model — every finished call produces one.
The hook is on_call_end passed as a kwarg to phone.serve(...). It
receives a dict (the CallMetrics serialized form), and is async.
Python
import asyncio
from getpatter import Patter, Twilio, OpenAIRealtime2
phone = Patter(carrier=Twilio(), phone_number="+15550001234")
async def on_end(metrics: dict) -> None:
print(f"Call {metrics['call_id']} | {metrics['duration_seconds']:.1f}s")
cost = metrics.get("cost", {})
print(f" Cost ${cost.get('total_usd', 0):.4f}: "
f"STT ${cost.get('stt_usd', 0):.4f} · "
f"LLM ${cost.get('llm_usd', 0):.4f} · "
f"TTS ${cost.get('tts_usd', 0):.4f} · "
f"Realtime ${cost.get('realtime_usd', 0):.4f} · "
f"Telephony ${cost.get('telephony_usd', 0):.4f}")
print(f" Latency p99: {metrics.get('latency_p99', 0):.0f} ms")
agent = phone.agent(engine=OpenAIRealtime2(), system_prompt="...", first_message="Hi!")
asyncio.run(phone.serve(agent, tunnel=True, on_call_end=on_end))
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3mo ago First seen · 289 lines · 137 tokens per session scan A 125a9d42aadf
inspect-calls-and-metrics is a skill published in the GitHub repository PatterAI/skills (6 stars, last pushed 5mo ago), licensed MIT. It adds 137 tokens to every session and 2,798 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
inspect-calls-and-metrics compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| inspect-calls-and-metricsPatterAI/skills | Skill | 6 | 5mo ago | MIT | A | 137 | Claude Code, Codex |
| agentlineAgentLineHQ/AgentLine | Skill | 64 | 1mo ago | MIT | C | 67 | Claude Code, Codex |
| x-tweet-by-conversationbrowser-act/skills | Skill | 6.4k | 26d ago | MIT | A | 218 | Claude Code, Codex |
| oma-scholarfirst-fluke/oh-my-agent | Skill | 1.5k | today | MIT | A | 30 | Claude Code |
| render-3d-product-showcasegooseworks-ai/goose-skills | Skill | 1.3k | 2d ago | MIT | A | 159 | Claude Code, Codex |
| render-airdrop-carouselgooseworks-ai/goose-skills | Skill | 1.3k | 2d ago | MIT | A | 207 | Claude Code, Codex |
| email-lifecycle-flow-writergooseworks-ai/goose-skills | Skill | 1.3k | 2d ago | MIT | A | 50 | Claude Code, Codex |