add-adapter

add-adapter is a command for Claude Code from sandeep-alluru/agentdelta. It costs 0 tokens per session (406 once invoked), scanned A, original, MIT.

A command that scaffolds an instrumentation adapter for agentdelta, a library that records AI agent activity, for a framework it does not yet support. It generates the adapter, tests, exports, documentation, and dependency setup.

In plain words
What is it for?
Use it to add support for frameworks such as AutoGen, CrewAI, Smolagents, or Pydantic AI, including recording model calls, tool calls, and their results.
Why use it?
It reduces the repeated work of connecting a new agent framework's callbacks to a standard trace format.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/sandeep-alluru/agentdelta/add-adapter
Clone the repo
git clone --depth 1 https://github.com/sandeep-alluru/agentdelta

Made for: Claude Code.

Wrote 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.

agentmods badge for add-adapter

README.md
[![agentmods](https://agentmods.dev/badge/commands/sandeep-alluru/agentdelta/add-adapter.svg)](https://agentmods.dev/commands/sandeep-alluru/agentdelta/add-adapter)
Your own site
<a href="https://agentmods.dev/commands/sandeep-alluru/agentdelta/add-adapter"><img src="https://agentmods.dev/badge/commands/sandeep-alluru/agentdelta/add-adapter.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 406 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00406
Opus 5 $0.00000 $0.00203
Sonnet 5 $0.00000 $0.00081
Haiku 4.5 $0.00000 $0.00041

Measured 5d ago against content hash 6af598f4f4d7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

add-adapter scanned grade A with 0 findings 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 5d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/add-adapter.md · 33 lines

What it actually says

Scaffold a new instrumentation adapter for a framework not yet supported by agentdelta.

Usage: /project:add-adapter <framework_name>

Framework name from $ARGUMENTS (e.g. "autogen", "crewai", "smolagents", "pydantic-ai").

Generate the following:

  1. src/agentdelta/instrument_<framework>.py — adapter module:

    • A class <Framework>AgentdeltaAdapter that wraps the framework's event/callback API
    • Must emit TraceNode objects to an AgentTrace for each: agent start, LLM call, tool call, tool return, agent end
    • Use NodeType.START, NodeType.LLM, NodeType.TOOL_CALL, NodeType.TOOL_RETURN, NodeType.END
    • Include a record_<framework>() context manager mirroring the LangChain record() API
  2. Export from src/agentdelta/__init__.py:

    • Add to __all__ alphabetically
  3. tests/test_instrument_<framework>.py — at least 3 tests:

    • Callback captures LLM output as a NodeType.LLM node
    • Callback captures tool calls as NodeType.TOOL_CALL nodes
    • record() context manager saves a valid JSONL file on exit
  4. Update README.md Quick Start section with a snippet for the new framework

  5. Update pyproject.toml optional dependencies:

    • Add [<framework>] extra with the framework package pinned to >= minimum supported version

Context:

  • See src/agentdelta/instrument.py for the LangChain reference implementation
  • AgentTrace.add_node() and add_edge() are the only write methods needed
  • Keep content fields under 2000 chars for LLM nodes, 500 chars for tool nodes
  • The adapter does NOT need to import agentdelta internals other than trace.py
Changes

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.

  1. 5d ago First seen · 33 lines · 0 tokens per session scan A 6af598f4f4d7

Subscribe to this mod's changes

add-adapter is a command published in the GitHub repository sandeep-alluru/agentdelta (0 stars, last pushed 18d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 406 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.