ai-agent-tap 0.3.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. ai_agent_tap-0.3.3/LICENSE +21 -0
  2. ai_agent_tap-0.3.3/PKG-INFO +298 -0
  3. ai_agent_tap-0.3.3/README.md +263 -0
  4. ai_agent_tap-0.3.3/pyproject.toml +56 -0
  5. ai_agent_tap-0.3.3/setup.cfg +4 -0
  6. ai_agent_tap-0.3.3/src/agent_tap/__init__.py +3 -0
  7. ai_agent_tap-0.3.3/src/agent_tap/__main__.py +5 -0
  8. ai_agent_tap-0.3.3/src/agent_tap/adapters/__init__.py +0 -0
  9. ai_agent_tap-0.3.3/src/agent_tap/adapters/base.py +120 -0
  10. ai_agent_tap-0.3.3/src/agent_tap/adapters/claude_code.py +312 -0
  11. ai_agent_tap-0.3.3/src/agent_tap/adapters/codex.py +362 -0
  12. ai_agent_tap-0.3.3/src/agent_tap/adapters/copilot_cli.py +388 -0
  13. ai_agent_tap-0.3.3/src/agent_tap/adapters/declarative.py +263 -0
  14. ai_agent_tap-0.3.3/src/agent_tap/adapters/hermes.py +575 -0
  15. ai_agent_tap-0.3.3/src/agent_tap/adapters/omniroute.py +349 -0
  16. ai_agent_tap-0.3.3/src/agent_tap/adapters/raven.py +836 -0
  17. ai_agent_tap-0.3.3/src/agent_tap/adapters/service.py +599 -0
  18. ai_agent_tap-0.3.3/src/agent_tap/bugreport.py +354 -0
  19. ai_agent_tap-0.3.3/src/agent_tap/cli.py +354 -0
  20. ai_agent_tap-0.3.3/src/agent_tap/core/__init__.py +0 -0
  21. ai_agent_tap-0.3.3/src/agent_tap/core/config.py +96 -0
  22. ai_agent_tap-0.3.3/src/agent_tap/core/paths.py +95 -0
  23. ai_agent_tap-0.3.3/src/agent_tap/core/schema.py +73 -0
  24. ai_agent_tap-0.3.3/src/agent_tap/dashboard/__init__.py +757 -0
  25. ai_agent_tap-0.3.3/src/agent_tap/dashboard/static/index.html +926 -0
  26. ai_agent_tap-0.3.3/src/agent_tap/digest.py +352 -0
  27. ai_agent_tap-0.3.3/src/agent_tap/emitter.py +378 -0
  28. ai_agent_tap-0.3.3/src/agent_tap/examples/aider.toml +16 -0
  29. ai_agent_tap-0.3.3/src/agent_tap/examples/cline.toml +22 -0
  30. ai_agent_tap-0.3.3/src/agent_tap/examples/services/everos.toml +6 -0
  31. ai_agent_tap-0.3.3/src/agent_tap/examples/services/firecrawl.toml +13 -0
  32. ai_agent_tap-0.3.3/src/agent_tap/examples/services/freellmapi.toml +6 -0
  33. ai_agent_tap-0.3.3/src/agent_tap/examples/services/generic-docker.toml +7 -0
  34. ai_agent_tap-0.3.3/src/agent_tap/examples/services/generic-http.toml +8 -0
  35. ai_agent_tap-0.3.3/src/agent_tap/examples/services/searxng.toml +6 -0
  36. ai_agent_tap-0.3.3/src/agent_tap/onboard.py +102 -0
  37. ai_agent_tap-0.3.3/src/agent_tap/onboarding.py +193 -0
  38. ai_agent_tap-0.3.3/src/agent_tap/platform/__init__.py +0 -0
  39. ai_agent_tap-0.3.3/src/agent_tap/platform/scheduler.py +846 -0
  40. ai_agent_tap-0.3.3/src/agent_tap/platform/service.py +141 -0
  41. ai_agent_tap-0.3.3/src/agent_tap/redact.py +46 -0
  42. ai_agent_tap-0.3.3/src/agent_tap/state.py +288 -0
  43. ai_agent_tap-0.3.3/src/ai_agent_tap.egg-info/PKG-INFO +298 -0
  44. ai_agent_tap-0.3.3/src/ai_agent_tap.egg-info/SOURCES.txt +55 -0
  45. ai_agent_tap-0.3.3/src/ai_agent_tap.egg-info/dependency_links.txt +1 -0
  46. ai_agent_tap-0.3.3/src/ai_agent_tap.egg-info/entry_points.txt +10 -0
  47. ai_agent_tap-0.3.3/src/ai_agent_tap.egg-info/requires.txt +9 -0
  48. ai_agent_tap-0.3.3/src/ai_agent_tap.egg-info/top_level.txt +1 -0
  49. ai_agent_tap-0.3.3/tests/test_adapters_builtin.py +154 -0
  50. ai_agent_tap-0.3.3/tests/test_bugreport.py +198 -0
  51. ai_agent_tap-0.3.3/tests/test_core_cli.py +122 -0
  52. ai_agent_tap-0.3.3/tests/test_dashboard.py +135 -0
  53. ai_agent_tap-0.3.3/tests/test_declarative.py +103 -0
  54. ai_agent_tap-0.3.3/tests/test_init.py +126 -0
  55. ai_agent_tap-0.3.3/tests/test_scheduler.py +57 -0
  56. ai_agent_tap-0.3.3/tests/test_service.py +46 -0
  57. ai_agent_tap-0.3.3/tests/test_services.py +377 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 agent-tap contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,298 @@
1
+ Metadata-Version: 2.4
2
+ Name: ai-agent-tap
3
+ Version: 0.3.3
4
+ Summary: Local usage analytics, error debugging, trace correlation, and service monitoring for Claude Code, Codex, Copilot CLI, Aider, Cline, LiteLLM, Ollama, SearXNG, Firecrawl, and local AI services
5
+ License: MIT
6
+ Project-URL: Homepage, https://github.com/nareshh74/agent-tap
7
+ Project-URL: Source, https://github.com/nareshh74/agent-tap
8
+ Project-URL: Issues, https://github.com/nareshh74/agent-tap/issues
9
+ Keywords: ai-agents,coding-agents,claude-code,openai-codex,github-copilot,copilot-cli,aider,cline,litellm,ollama,mcp,model-context-protocol,llm-observability,agent-observability,agent-monitoring,agent-debugging,llmops,sqlite,developer-tools,opentelemetry
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Environment :: Console
12
+ Classifier: Environment :: Web Environment
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Topic :: Software Development :: Debuggers
21
+ Classifier: Topic :: System :: Monitoring
22
+ Classifier: Topic :: Software Development :: Quality Assurance
23
+ Requires-Python: >=3.11
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE
26
+ Requires-Dist: platformdirs>=3.0
27
+ Requires-Dist: fastapi>=0.100
28
+ Requires-Dist: uvicorn>=0.23
29
+ Provides-Extra: dev
30
+ Requires-Dist: pytest>=8; extra == "dev"
31
+ Requires-Dist: httpx>=0.24; extra == "dev"
32
+ Requires-Dist: build; extra == "dev"
33
+ Requires-Dist: twine; extra == "dev"
34
+ Dynamic: license-file
35
+
36
+ # agent-tap: local observability, usage analytics, and debugging for AI coding agents and local AI services
37
+
38
+ agent-tap is a local usage analytics, error debugging, trace correlation, and service monitoring tool for AI coding-agent harnesses and running AI services. It reads the logs, databases, and health endpoints that Claude Code, OpenAI Codex CLI, GitHub Copilot CLI, Aider, Cline, Roo Code, LiteLLM, Ollama, vLLM, SearXNG, Firecrawl, and your own services already produce, and stores them in one local SQLite file.
39
+
40
+ A dashboard at `http://127.0.0.1:6007` shows session usage, token counts, tool latencies, normalized error classes, parent-to-child subagent traces, and scheduled cron runs. Nothing leaves your machine, and prompt text is off by default. In this document, a harness is an AI coding agent program such as Claude Code, Codex CLI, or Copilot CLI.
41
+
42
+ <p align="center">
43
+ <a href="assets/agent-tap-demo.mp4"><img src="assets/agent-tap-demo.gif" alt="agent-tap demo: Claude Code, Codex CLI, Copilot CLI, Aider and Cline usage analytics, LiteLLM and Ollama service monitoring, error classes, scheduled tasks and parent-to-child subagent trace drawer" width="800"></a>
44
+ </p>
45
+
46
+ [Watch the narrated walkthrough (MP4, 48 seconds)](assets/agent-tap-demo.mp4). The data shown is synthetic.
47
+
48
+ | Harness activity and running AI services | Scheduled tasks and the subagent trace drawer |
49
+ |---|---|
50
+ | ![agent-tap dashboard overview showing Claude Code, Codex, Copilot CLI, Aider, Cline harness activity and LiteLLM, Ollama, SearXNG, Firecrawl running services](assets/dashboard-overview.png) | ![agent-tap scheduled tasks and crons table with the parent-to-child subagent trace drawer open](assets/trace-drawer-and-crons.png) |
51
+
52
+ ## Get started
53
+
54
+ You need Python 3.11 or later on Linux, macOS, or Windows (including WSL2).
55
+
56
+ Install from PyPI or run directly with `uvx`:
57
+
58
+ ```bash
59
+ pipx install ai-agent-tap
60
+ pip install ai-agent-tap
61
+ uvx --from ai-agent-tap agent-tap
62
+ ```
63
+
64
+ You can also install straight from GitHub:
65
+
66
+ ```bash
67
+ pipx install git+https://github.com/nareshh74/agent-tap
68
+ uvx --from git+https://github.com/nareshh74/agent-tap agent-tap doctor
69
+ ```
70
+
71
+ If you use Claude Code, you can install the bundled skill with `/plugin marketplace add nareshh74/agent-tap`.
72
+
73
+ First, choose which coding agents and local services to monitor:
74
+
75
+ ```bash
76
+ agent-tap init
77
+ ```
78
+
79
+ `init` scans your machine for coding-agent harnesses and local services, then asks which ones to enable. It pre-selects what it finds. It also asks whether to override any data path and whether to store prompt text (the default is no). The same questions appear on the first `run`, `serve`, or `service install` when no config file exists and a terminal is attached. For scripts, pass `--yes`, `--non-interactive`, or `--harnesses claude-code,codex`. Without a terminal, `init` never prompts.
80
+
81
+ Now start the collector and the live dashboard:
82
+
83
+ ```bash
84
+ agent-tap run --watch # collect continuously and serve the dashboard
85
+ agent-tap serve # dashboard only
86
+ agent-tap service install # start at login: Task Scheduler, launchd, or systemd --user
87
+ ```
88
+
89
+ Open `http://127.0.0.1:6007`. Then check your setup from the terminal:
90
+
91
+ ```bash
92
+ agent-tap doctor # config, databases, what was found, source health
93
+ agent-tap digest --hours 24 # sessions, tokens, tools, skills, errors, schedules
94
+ agent-tap query errors --json # presets: harnesses, errors, tools, sessions, or any read-only SQL
95
+ ```
96
+
97
+ ## What agent-tap monitors: coding agents, LLM gateways, and local services
98
+
99
+ Every monitored target is a service with one of three kinds. The kind decides which dashboard sections show it.
100
+
101
+ | Kind | Examples | Where it appears |
102
+ |---|---|---|
103
+ | harness | `claude-code`, `codex`, `copilot-cli`, `aider`, `cline`, `roo-code`, or any custom CLI agent | Harness Activity (sessions, turns, tool calls, skill calls, parent-to-child correlation) and every shared section |
104
+ | gateway | `litellm`, `ollama`, `vllm`, or any local OpenAI-compatible model proxy | Running Services & Gateways and every shared section |
105
+ | service | `searxng`, `firecrawl`, `postgres-pgvector`, and any HTTP endpoint, Docker container, process, or log service you add | Running Services & Gateways and every shared section |
106
+
107
+ The shared sections are Tool Usage & Latency, Skill Invocations, Crashes, Timeouts & Operational Errors, Scheduled Tasks & Crons, and source health.
108
+
109
+ Running Services & Gateways lists each non-harness service with its status (healthy, degraded, or down), endpoint or container, request and check counts, error count, p50 and p90 latency, and last seen time.
110
+
111
+ Common local AI services use these defaults. You can override any of them in `config.toml` or onboard new ones with `agent-tap onboard`.
112
+
113
+ | Service | Default health endpoint | Docker containers read for request logs |
114
+ |---|---|---|
115
+ | `litellm` | `http://127.0.0.1:4000/health/liveliness` | `litellm` |
116
+ | `ollama` | `http://127.0.0.1:11434/api/tags` | `ollama` (optional) |
117
+ | `searxng` | `http://127.0.0.1:8888` | `searxng` |
118
+ | `firecrawl` | `http://127.0.0.1:3003` | `firecrawl-api-1`, plus the companion containers for status |
119
+
120
+ Each probe writes a span with `span_kind` `SERVICE` and the attributes `service.name`, `service.kind`, `service.status`, `service.endpoint`, `http.status_code`, `service.latency_ms`, and `error.class` ([schema](docs/schema.md)).
121
+
122
+ ### Onboard any running service or gateway
123
+
124
+ Run `agent-tap onboard` (alias `service-add`) with a name, a kind, and at least one source:
125
+
126
+ ```bash
127
+ agent-tap onboard --name litellm --kind gateway --health-url http://127.0.0.1:4000/health/liveliness --docker-container litellm
128
+ agent-tap onboard --name ollama --kind gateway --health-url http://127.0.0.1:11434/api/tags --process-name ollama
129
+ agent-tap onboard --name billing-api --kind service --health-url http://127.0.0.1:9000/health --log-path ~/logs/billing.log
130
+ ```
131
+
132
+ The command appends a `[[services]]` entry to `config.toml`. For the full set of keys and for writing a Python adapter, see [docs/writing-a-service-adapter.md](docs/writing-a-service-adapter.md). To add a coding-agent harness that writes JSONL or SQLite logs, see [docs/writing-an-adapter.md](docs/writing-an-adapter.md).
133
+
134
+ ## Dashboard sections
135
+
136
+ - **Harness Activity** has one row per coding-agent harness with sessions, traces, spans, turns, LLM calls, tool calls, skill calls, tokens, errors, and latency.
137
+ - **Running Services & Gateways** has one row per non-harness service or LLM gateway.
138
+ - **Scheduled Tasks & Crons** lists Windows Task Scheduler, macOS launchd and crontab, Linux systemd user timers and crontab, plus agent-native cron schedules.
139
+ - **Recent Cron & Heartbeat Runs** shows the latest runs with status and duration.
140
+ - **Tool Usage & Latency** and **Skill Invocations** rank MCP tools, shell tools, and skills by use, with error rates.
141
+ - **Crashes, Timeouts & Operational Errors** groups failures by normalized error class.
142
+ - **Parent-to-Child Correlation Explorer** links a parent agent session to the child subagent sessions it started.
143
+
144
+ Every table sorts when you click a column header. Selecting a row opens the trace drawer with the spans of that trace. The **Report Issue** button in the header opens a pre-filled GitHub issue and copies a diagnostic bundle (see [Report a problem](#report-a-problem)).
145
+
146
+ ## Operational debugging features for coding agents and MCP tools
147
+
148
+ Usage analytics tell you what your agents and services did. These features tell you why something broke.
149
+
150
+ - **Normalized error classes.** Each failure gets an `error.class`, so identical failures group together instead of appearing as free text. The adapters emit classes such as these today:
151
+ - Agent orchestration and subagents: `gateway_first_byte_timeout_120s`, `litellm_midstream_fallback_error`, `acp_prompt_timeout_600s`, `subagent_max_tool_rounds_15`, `scheduled_approval_timeout_10s`, `cron_nested_schedule_blocked`.
152
+ - MCP servers and background loops: `mcp_oauth_400_refresh_loop` and `mcp_tool_error`. A five-minute OAuth refresh failure loop collapses into hourly buckets instead of thousands of duplicate rows.
153
+ - GitHub Copilot CLI: `acp_mcp_disposal_race` and `copilot_tool_error`.
154
+ - Claude Code: guardrail blocks such as `claude_sleep_guardrail_blocked`, and tool execution errors.
155
+ - OpenAI Codex CLI: turn errors, `codex_responses_retry_warn`, and upstream `401` authentication classes.
156
+ - LLM gateways: `gateway_http_<status>` (for example `gateway_http_401`, `gateway_http_499`, and `5xx`) and `gateway_circuit_degraded`.
157
+ - Local services: each service adapter reports a down or degraded state with its own `error.class`, for example when a health endpoint times out.
158
+ - **Parent-to-child trace correlation across harnesses.** A parent agent session links to its ACP child sessions and to second-degree subagents through ACP frame session ids, Codex `parent_thread_id`, and Claude Code `fork-context-ref`. The correlation explorer shows the tree, and the trace drawer shows each span with secrets redacted.
159
+ - **Scheduled task and cron monitoring.** Each schedule shows its last run, next run, exit code, and failures across OS schedulers and agent-native cron jobs.
160
+ - **Source health.** Every adapter stage keeps a watermark and a `source_health` row with the last event and the last error. `agent-tap doctor` and the dashboard show them, so a collector that stopped working is visible.
161
+ - **SQL on everything.** The data is a plain SQLite file. Query it with `agent-tap query` or any SQLite tool.
162
+
163
+ ## How agent-tap compares to CodeBurn, ccusage, agentsview, Phoenix, and Langfuse
164
+
165
+ | Feature | agent-tap | CodeBurn | ccusage | agentsview | Phoenix, Langfuse, OpenLIT |
166
+ |---|---|---|---|---|---|
167
+ | Usage, tokens, cost | Sessions, tokens, tools, and skills. No dollar pricing | Cost estimates, models, and optimization advice | Token and cost reports from local logs | Session browsing and search with analytics | Strong for apps you instrument |
168
+ | Error classes from process logs | Yes | No | No | Not its focus | Through your own instrumentation |
169
+ | Cross-harness parent-to-child traces | Yes | No | No | Not its focus | Through trace context you propagate |
170
+ | Schedule and cron monitoring | Yes | No | No | No | No |
171
+ | Running services and LLM gateways | Yes | No | No | No | Through your own instrumentation |
172
+ | Local SQLite, no Docker or SDK | Yes | Yes | Yes | Yes | Usually a server or Docker plus an SDK or OTLP exporter |
173
+ | New agent or service without code | Yes (TOML and entry points) | No | No | Not its focus | Instrumentation, not log adapters |
174
+
175
+ The table summarizes what each project usually focuses on and may be out of date. Check each project's documentation, and open an issue if a row is wrong.
176
+
177
+ agent-tap reads what your coding agents and local services already write to disk, so you get one analytics and debugging view across many different programs without instrumenting them or sending data off your machine.
178
+
179
+ You can run it next to the other tools:
180
+
181
+ - Keep CodeBurn or ccusage for dollar estimates and token savings advice. Use agent-tap to find which agent sessions failed, timed out, or looped.
182
+ - Keep agentsview to read and search full session transcripts. Use agent-tap for error classes, subagent trace trees, service health, and schedules.
183
+ - Use Arize Phoenix, Langfuse, or OpenLIT for the LLM applications you build and deploy. Use agent-tap for the coding agents and local services on your workstation. The span tables have the same shape as Phoenix, so exporting is a SQL query.
184
+
185
+ ## Report a problem
186
+
187
+ Open an issue with one of the forms in [.github/ISSUE_TEMPLATE](.github/ISSUE_TEMPLATE): a bug report, or a request to support a new service or harness.
188
+
189
+ Before you file a bug, generate the diagnostics:
190
+
191
+ ```bash
192
+ agent-tap bug-report --service firecrawl --error-text "paste the error or traceback here"
193
+ agent-tap bug-report --error-file error.txt --output report.md
194
+ agent-tap bug-report --open # opens a pre-filled GitHub issue
195
+ ```
196
+
197
+ The report lists your operating system, Python version, agent-tap version, enabled services and harnesses, source health, and recent errors from the agent-tap log. Before it writes anything, it masks secrets with the same rules as span redaction and replaces your home directory with `~`. Read the report before you post it. The dashboard's Report Issue button produces the same bundle.
198
+
199
+ ## Frequently asked questions (FAQ)
200
+
201
+ **How do I monitor and debug Claude Code, OpenAI Codex CLI, and GitHub Copilot CLI locally?**
202
+ Install agent-tap, run `agent-tap init` to pick the harnesses on your machine, then run `agent-tap run --watch`. Open `http://127.0.0.1:6007` for usage analytics and operational errors, or run `agent-tap digest --hours 24` in the terminal. Everything stays in a local SQLite file.
203
+
204
+ **How do I trace parent-to-child subagents across coding agents?**
205
+ agent-tap links a parent session to the child subagent sessions it started (`parent_agent -> child_agent` through ACP session frames, Codex `parent_thread_id`, and Claude Code `fork-context-ref`). Use the Parent-to-Child Correlation Explorer and the trace drawer, or query the `spans` table by `child.session_id`.
206
+
207
+ **How do I monitor local AI services and gateways such as LiteLLM, Ollama, vLLM, SearXNG, or Firecrawl?**
208
+ Select built-in services in `agent-tap init` or add any HTTP endpoint, Docker container, process, or log file with `agent-tap onboard`. agent-tap probes each health endpoint and parses request logs into service spans with status codes and p50/p90 latency.
209
+
210
+ **How do I debug MCP server errors and OAuth refresh loops across coding agents?**
211
+ agent-tap tails both agent session files and daemon error logs, normalizing failures into `error.class` values such as `mcp_oauth_400_refresh_loop`, `acp_mcp_disposal_race`, and `mcp_tool_error`. Repeated failure loops collapse into hourly buckets so you can spot broken MCP servers immediately.
212
+
213
+ **Is there an open-source complement to CodeBurn and ccusage that also helps with operational debugging?**
214
+ Yes. agent-tap does not price tokens in dollars. It adds normalized runtime error classes, parent-to-child trace correlation across harnesses, local service health monitoring, and cron schedule monitoring. Run it next to CodeBurn or ccusage.
215
+
216
+ **Does agent-tap send my prompts or code anywhere?**
217
+ No. It makes no network calls except the local health probes you configure against your own services. Prompt and tool text is dropped by default. To store it locally, set `store_prompt_text = true` or `AGENT_TAP_STORE_PROMPTS=1`. Secret redaction is pattern based, so treat it as best effort ([docs/privacy.md](docs/privacy.md)).
218
+
219
+ **What does agent-tap need to run?**
220
+ Python 3.11 or later and three small dependencies (`platformdirs`, `fastapi`, `uvicorn`). It needs no Docker, database server, API key, or cloud account. Docker is only needed to read the logs of services that run in Docker.
221
+
222
+ ## CLI reference
223
+
224
+ | Command | Purpose |
225
+ |---|---|
226
+ | `agent-tap init [--yes\|--non-interactive] [--harnesses h1,h2] [--store-prompts]` | Choose harnesses and services. Alias `setup` |
227
+ | `agent-tap onboard --name NAME --kind service\|gateway\|harness [--health-url URL] [--docker-container NAME] [--log-path FILE] [--process-name NAME]` | Add a service to `config.toml`. Alias `service-add` |
228
+ | `agent-tap doctor [--json]` | Show config, paths, what was found, and source health |
229
+ | `agent-tap run [--once\|--watch]` | Collect once, or continuously with the dashboard. `daemon` is an alias for `run --watch` |
230
+ | `agent-tap serve [--port 6007]` | Run the dashboard only |
231
+ | `agent-tap query <sql or preset> [--json]` | Run read-only SQL or a preset against the spans database |
232
+ | `agent-tap digest [--hours 24] [--json]` | Print a session and error digest |
233
+ | `agent-tap prune [--days 90]` | Delete traces older than the window |
234
+ | `agent-tap bug-report [--error-text TEXT] [--error-file FILE] [--service NAME] [--open] [--json] [--output FILE]` | Build a diagnostic bundle for a GitHub issue |
235
+ | `agent-tap service install\|status\|uninstall\|render [--os windows\|macos\|linux]` | Manage the background service. `render` prints the unit without installing it |
236
+ | `agent-tap adapters list\|validate <file.toml>` | List adapters or validate a declarative adapter |
237
+ | `agent-tap config show` | Print the effective configuration |
238
+
239
+ The global flag `--config <file>` selects a config file.
240
+
241
+ ## Configuration
242
+
243
+ Settings come from four places. Each one overrides the ones after it: command-line flags, `AGENT_TAP_*` environment variables, `config.toml`, and operating system defaults.
244
+
245
+ `config.toml` lives in the user config directory (`~/.config/agent-tap/` on Linux, `~/Library/Application Support/agent-tap/` on macOS, `%LOCALAPPDATA%\agent-tap\` on Windows). Set `AGENT_TAP_CONFIG` to use another path.
246
+
247
+ ```toml
248
+ spans_db = "/path/to/spans.db"
249
+ state_db = "/path/to/state.sqlite"
250
+ store_prompt_text = false # AGENT_TAP_STORE_PROMPTS=1 to enable
251
+ host = "127.0.0.1" # AGENT_TAP_HOST
252
+ port = 6007 # AGENT_TAP_PORT
253
+ interval = 5.0 # poll interval in seconds
254
+ lookback_hours = 48.0
255
+ retention_days = 90
256
+ project_name = "agent-analytics"
257
+ enabled_services = ["claude-code", "codex", "copilot-cli", "searxng"] # omit to use everything found
258
+ adapters_dir = "~/.config/agent-tap/adapters" # declarative harness adapters
259
+ wsl_discovery = false # AGENT_TAP_WSL=1 enables optional WSL2 path discovery on Windows
260
+
261
+ [paths] # data directory overrides, or AGENT_TAP_<NAME>_DIR
262
+ codex = "/custom/.codex"
263
+
264
+ [[services]] # one entry per onboarded service or gateway
265
+ name = "litellm"
266
+ kind = "gateway" # harness, gateway, or service
267
+ health_url = "http://127.0.0.1:4000/health/liveliness"
268
+ docker_container = "litellm"
269
+ log_path = "~/logs/litellm.log"
270
+ process_name = "litellm"
271
+ ```
272
+
273
+ The older key names `enabled_harnesses` and `adapters` still work as aliases for `enabled_services`.
274
+
275
+ Environment variables: `AGENT_TAP_CONFIG`, `AGENT_TAP_SPANS_DB`, `AGENT_TAP_STATE_DB`, `AGENT_TAP_STORE_PROMPTS`, `AGENT_TAP_HOST`, `AGENT_TAP_PORT`, `AGENT_TAP_WSL`, and `AGENT_TAP_<NAME>_DIR`.
276
+
277
+ ### Where agent-tap looks for harness data
278
+
279
+ | Harness | Locations checked |
280
+ |---|---|
281
+ | Claude Code | `~/.claude/projects`, `$XDG_CONFIG_HOME/claude/projects` |
282
+ | OpenAI Codex CLI | `$CODEX_HOME` or `~/.codex` |
283
+ | GitHub Copilot CLI | `~/.copilot` |
284
+ | Aider | `~/.aider*` or project `.aider.chat.history.md` / JSONL logs via `examples/adapters/aider.toml` |
285
+ | Cline / Roo Code | VS Code `globalStorage` task history via `examples/adapters/cline.toml` |
286
+ | Custom harnesses | Any directory configured in `[paths]`, `AGENT_TAP_<NAME>_DIR`, or `adapters_dir` |
287
+
288
+ ## More documentation
289
+
290
+ - [Storage schema](docs/schema.md)
291
+ - [Privacy](docs/privacy.md)
292
+ - [Write a harness adapter](docs/writing-an-adapter.md)
293
+ - [Write a service adapter](docs/writing-a-service-adapter.md)
294
+ - [Contributing](CONTRIBUTING.md)
295
+
296
+ ## License
297
+
298
+ MIT
@@ -0,0 +1,263 @@
1
+ # agent-tap: local observability, usage analytics, and debugging for AI coding agents and local AI services
2
+
3
+ agent-tap is a local usage analytics, error debugging, trace correlation, and service monitoring tool for AI coding-agent harnesses and running AI services. It reads the logs, databases, and health endpoints that Claude Code, OpenAI Codex CLI, GitHub Copilot CLI, Aider, Cline, Roo Code, LiteLLM, Ollama, vLLM, SearXNG, Firecrawl, and your own services already produce, and stores them in one local SQLite file.
4
+
5
+ A dashboard at `http://127.0.0.1:6007` shows session usage, token counts, tool latencies, normalized error classes, parent-to-child subagent traces, and scheduled cron runs. Nothing leaves your machine, and prompt text is off by default. In this document, a harness is an AI coding agent program such as Claude Code, Codex CLI, or Copilot CLI.
6
+
7
+ <p align="center">
8
+ <a href="assets/agent-tap-demo.mp4"><img src="assets/agent-tap-demo.gif" alt="agent-tap demo: Claude Code, Codex CLI, Copilot CLI, Aider and Cline usage analytics, LiteLLM and Ollama service monitoring, error classes, scheduled tasks and parent-to-child subagent trace drawer" width="800"></a>
9
+ </p>
10
+
11
+ [Watch the narrated walkthrough (MP4, 48 seconds)](assets/agent-tap-demo.mp4). The data shown is synthetic.
12
+
13
+ | Harness activity and running AI services | Scheduled tasks and the subagent trace drawer |
14
+ |---|---|
15
+ | ![agent-tap dashboard overview showing Claude Code, Codex, Copilot CLI, Aider, Cline harness activity and LiteLLM, Ollama, SearXNG, Firecrawl running services](assets/dashboard-overview.png) | ![agent-tap scheduled tasks and crons table with the parent-to-child subagent trace drawer open](assets/trace-drawer-and-crons.png) |
16
+
17
+ ## Get started
18
+
19
+ You need Python 3.11 or later on Linux, macOS, or Windows (including WSL2).
20
+
21
+ Install from PyPI or run directly with `uvx`:
22
+
23
+ ```bash
24
+ pipx install ai-agent-tap
25
+ pip install ai-agent-tap
26
+ uvx --from ai-agent-tap agent-tap
27
+ ```
28
+
29
+ You can also install straight from GitHub:
30
+
31
+ ```bash
32
+ pipx install git+https://github.com/nareshh74/agent-tap
33
+ uvx --from git+https://github.com/nareshh74/agent-tap agent-tap doctor
34
+ ```
35
+
36
+ If you use Claude Code, you can install the bundled skill with `/plugin marketplace add nareshh74/agent-tap`.
37
+
38
+ First, choose which coding agents and local services to monitor:
39
+
40
+ ```bash
41
+ agent-tap init
42
+ ```
43
+
44
+ `init` scans your machine for coding-agent harnesses and local services, then asks which ones to enable. It pre-selects what it finds. It also asks whether to override any data path and whether to store prompt text (the default is no). The same questions appear on the first `run`, `serve`, or `service install` when no config file exists and a terminal is attached. For scripts, pass `--yes`, `--non-interactive`, or `--harnesses claude-code,codex`. Without a terminal, `init` never prompts.
45
+
46
+ Now start the collector and the live dashboard:
47
+
48
+ ```bash
49
+ agent-tap run --watch # collect continuously and serve the dashboard
50
+ agent-tap serve # dashboard only
51
+ agent-tap service install # start at login: Task Scheduler, launchd, or systemd --user
52
+ ```
53
+
54
+ Open `http://127.0.0.1:6007`. Then check your setup from the terminal:
55
+
56
+ ```bash
57
+ agent-tap doctor # config, databases, what was found, source health
58
+ agent-tap digest --hours 24 # sessions, tokens, tools, skills, errors, schedules
59
+ agent-tap query errors --json # presets: harnesses, errors, tools, sessions, or any read-only SQL
60
+ ```
61
+
62
+ ## What agent-tap monitors: coding agents, LLM gateways, and local services
63
+
64
+ Every monitored target is a service with one of three kinds. The kind decides which dashboard sections show it.
65
+
66
+ | Kind | Examples | Where it appears |
67
+ |---|---|---|
68
+ | harness | `claude-code`, `codex`, `copilot-cli`, `aider`, `cline`, `roo-code`, or any custom CLI agent | Harness Activity (sessions, turns, tool calls, skill calls, parent-to-child correlation) and every shared section |
69
+ | gateway | `litellm`, `ollama`, `vllm`, or any local OpenAI-compatible model proxy | Running Services & Gateways and every shared section |
70
+ | service | `searxng`, `firecrawl`, `postgres-pgvector`, and any HTTP endpoint, Docker container, process, or log service you add | Running Services & Gateways and every shared section |
71
+
72
+ The shared sections are Tool Usage & Latency, Skill Invocations, Crashes, Timeouts & Operational Errors, Scheduled Tasks & Crons, and source health.
73
+
74
+ Running Services & Gateways lists each non-harness service with its status (healthy, degraded, or down), endpoint or container, request and check counts, error count, p50 and p90 latency, and last seen time.
75
+
76
+ Common local AI services use these defaults. You can override any of them in `config.toml` or onboard new ones with `agent-tap onboard`.
77
+
78
+ | Service | Default health endpoint | Docker containers read for request logs |
79
+ |---|---|---|
80
+ | `litellm` | `http://127.0.0.1:4000/health/liveliness` | `litellm` |
81
+ | `ollama` | `http://127.0.0.1:11434/api/tags` | `ollama` (optional) |
82
+ | `searxng` | `http://127.0.0.1:8888` | `searxng` |
83
+ | `firecrawl` | `http://127.0.0.1:3003` | `firecrawl-api-1`, plus the companion containers for status |
84
+
85
+ Each probe writes a span with `span_kind` `SERVICE` and the attributes `service.name`, `service.kind`, `service.status`, `service.endpoint`, `http.status_code`, `service.latency_ms`, and `error.class` ([schema](docs/schema.md)).
86
+
87
+ ### Onboard any running service or gateway
88
+
89
+ Run `agent-tap onboard` (alias `service-add`) with a name, a kind, and at least one source:
90
+
91
+ ```bash
92
+ agent-tap onboard --name litellm --kind gateway --health-url http://127.0.0.1:4000/health/liveliness --docker-container litellm
93
+ agent-tap onboard --name ollama --kind gateway --health-url http://127.0.0.1:11434/api/tags --process-name ollama
94
+ agent-tap onboard --name billing-api --kind service --health-url http://127.0.0.1:9000/health --log-path ~/logs/billing.log
95
+ ```
96
+
97
+ The command appends a `[[services]]` entry to `config.toml`. For the full set of keys and for writing a Python adapter, see [docs/writing-a-service-adapter.md](docs/writing-a-service-adapter.md). To add a coding-agent harness that writes JSONL or SQLite logs, see [docs/writing-an-adapter.md](docs/writing-an-adapter.md).
98
+
99
+ ## Dashboard sections
100
+
101
+ - **Harness Activity** has one row per coding-agent harness with sessions, traces, spans, turns, LLM calls, tool calls, skill calls, tokens, errors, and latency.
102
+ - **Running Services & Gateways** has one row per non-harness service or LLM gateway.
103
+ - **Scheduled Tasks & Crons** lists Windows Task Scheduler, macOS launchd and crontab, Linux systemd user timers and crontab, plus agent-native cron schedules.
104
+ - **Recent Cron & Heartbeat Runs** shows the latest runs with status and duration.
105
+ - **Tool Usage & Latency** and **Skill Invocations** rank MCP tools, shell tools, and skills by use, with error rates.
106
+ - **Crashes, Timeouts & Operational Errors** groups failures by normalized error class.
107
+ - **Parent-to-Child Correlation Explorer** links a parent agent session to the child subagent sessions it started.
108
+
109
+ Every table sorts when you click a column header. Selecting a row opens the trace drawer with the spans of that trace. The **Report Issue** button in the header opens a pre-filled GitHub issue and copies a diagnostic bundle (see [Report a problem](#report-a-problem)).
110
+
111
+ ## Operational debugging features for coding agents and MCP tools
112
+
113
+ Usage analytics tell you what your agents and services did. These features tell you why something broke.
114
+
115
+ - **Normalized error classes.** Each failure gets an `error.class`, so identical failures group together instead of appearing as free text. The adapters emit classes such as these today:
116
+ - Agent orchestration and subagents: `gateway_first_byte_timeout_120s`, `litellm_midstream_fallback_error`, `acp_prompt_timeout_600s`, `subagent_max_tool_rounds_15`, `scheduled_approval_timeout_10s`, `cron_nested_schedule_blocked`.
117
+ - MCP servers and background loops: `mcp_oauth_400_refresh_loop` and `mcp_tool_error`. A five-minute OAuth refresh failure loop collapses into hourly buckets instead of thousands of duplicate rows.
118
+ - GitHub Copilot CLI: `acp_mcp_disposal_race` and `copilot_tool_error`.
119
+ - Claude Code: guardrail blocks such as `claude_sleep_guardrail_blocked`, and tool execution errors.
120
+ - OpenAI Codex CLI: turn errors, `codex_responses_retry_warn`, and upstream `401` authentication classes.
121
+ - LLM gateways: `gateway_http_<status>` (for example `gateway_http_401`, `gateway_http_499`, and `5xx`) and `gateway_circuit_degraded`.
122
+ - Local services: each service adapter reports a down or degraded state with its own `error.class`, for example when a health endpoint times out.
123
+ - **Parent-to-child trace correlation across harnesses.** A parent agent session links to its ACP child sessions and to second-degree subagents through ACP frame session ids, Codex `parent_thread_id`, and Claude Code `fork-context-ref`. The correlation explorer shows the tree, and the trace drawer shows each span with secrets redacted.
124
+ - **Scheduled task and cron monitoring.** Each schedule shows its last run, next run, exit code, and failures across OS schedulers and agent-native cron jobs.
125
+ - **Source health.** Every adapter stage keeps a watermark and a `source_health` row with the last event and the last error. `agent-tap doctor` and the dashboard show them, so a collector that stopped working is visible.
126
+ - **SQL on everything.** The data is a plain SQLite file. Query it with `agent-tap query` or any SQLite tool.
127
+
128
+ ## How agent-tap compares to CodeBurn, ccusage, agentsview, Phoenix, and Langfuse
129
+
130
+ | Feature | agent-tap | CodeBurn | ccusage | agentsview | Phoenix, Langfuse, OpenLIT |
131
+ |---|---|---|---|---|---|
132
+ | Usage, tokens, cost | Sessions, tokens, tools, and skills. No dollar pricing | Cost estimates, models, and optimization advice | Token and cost reports from local logs | Session browsing and search with analytics | Strong for apps you instrument |
133
+ | Error classes from process logs | Yes | No | No | Not its focus | Through your own instrumentation |
134
+ | Cross-harness parent-to-child traces | Yes | No | No | Not its focus | Through trace context you propagate |
135
+ | Schedule and cron monitoring | Yes | No | No | No | No |
136
+ | Running services and LLM gateways | Yes | No | No | No | Through your own instrumentation |
137
+ | Local SQLite, no Docker or SDK | Yes | Yes | Yes | Yes | Usually a server or Docker plus an SDK or OTLP exporter |
138
+ | New agent or service without code | Yes (TOML and entry points) | No | No | Not its focus | Instrumentation, not log adapters |
139
+
140
+ The table summarizes what each project usually focuses on and may be out of date. Check each project's documentation, and open an issue if a row is wrong.
141
+
142
+ agent-tap reads what your coding agents and local services already write to disk, so you get one analytics and debugging view across many different programs without instrumenting them or sending data off your machine.
143
+
144
+ You can run it next to the other tools:
145
+
146
+ - Keep CodeBurn or ccusage for dollar estimates and token savings advice. Use agent-tap to find which agent sessions failed, timed out, or looped.
147
+ - Keep agentsview to read and search full session transcripts. Use agent-tap for error classes, subagent trace trees, service health, and schedules.
148
+ - Use Arize Phoenix, Langfuse, or OpenLIT for the LLM applications you build and deploy. Use agent-tap for the coding agents and local services on your workstation. The span tables have the same shape as Phoenix, so exporting is a SQL query.
149
+
150
+ ## Report a problem
151
+
152
+ Open an issue with one of the forms in [.github/ISSUE_TEMPLATE](.github/ISSUE_TEMPLATE): a bug report, or a request to support a new service or harness.
153
+
154
+ Before you file a bug, generate the diagnostics:
155
+
156
+ ```bash
157
+ agent-tap bug-report --service firecrawl --error-text "paste the error or traceback here"
158
+ agent-tap bug-report --error-file error.txt --output report.md
159
+ agent-tap bug-report --open # opens a pre-filled GitHub issue
160
+ ```
161
+
162
+ The report lists your operating system, Python version, agent-tap version, enabled services and harnesses, source health, and recent errors from the agent-tap log. Before it writes anything, it masks secrets with the same rules as span redaction and replaces your home directory with `~`. Read the report before you post it. The dashboard's Report Issue button produces the same bundle.
163
+
164
+ ## Frequently asked questions (FAQ)
165
+
166
+ **How do I monitor and debug Claude Code, OpenAI Codex CLI, and GitHub Copilot CLI locally?**
167
+ Install agent-tap, run `agent-tap init` to pick the harnesses on your machine, then run `agent-tap run --watch`. Open `http://127.0.0.1:6007` for usage analytics and operational errors, or run `agent-tap digest --hours 24` in the terminal. Everything stays in a local SQLite file.
168
+
169
+ **How do I trace parent-to-child subagents across coding agents?**
170
+ agent-tap links a parent session to the child subagent sessions it started (`parent_agent -> child_agent` through ACP session frames, Codex `parent_thread_id`, and Claude Code `fork-context-ref`). Use the Parent-to-Child Correlation Explorer and the trace drawer, or query the `spans` table by `child.session_id`.
171
+
172
+ **How do I monitor local AI services and gateways such as LiteLLM, Ollama, vLLM, SearXNG, or Firecrawl?**
173
+ Select built-in services in `agent-tap init` or add any HTTP endpoint, Docker container, process, or log file with `agent-tap onboard`. agent-tap probes each health endpoint and parses request logs into service spans with status codes and p50/p90 latency.
174
+
175
+ **How do I debug MCP server errors and OAuth refresh loops across coding agents?**
176
+ agent-tap tails both agent session files and daemon error logs, normalizing failures into `error.class` values such as `mcp_oauth_400_refresh_loop`, `acp_mcp_disposal_race`, and `mcp_tool_error`. Repeated failure loops collapse into hourly buckets so you can spot broken MCP servers immediately.
177
+
178
+ **Is there an open-source complement to CodeBurn and ccusage that also helps with operational debugging?**
179
+ Yes. agent-tap does not price tokens in dollars. It adds normalized runtime error classes, parent-to-child trace correlation across harnesses, local service health monitoring, and cron schedule monitoring. Run it next to CodeBurn or ccusage.
180
+
181
+ **Does agent-tap send my prompts or code anywhere?**
182
+ No. It makes no network calls except the local health probes you configure against your own services. Prompt and tool text is dropped by default. To store it locally, set `store_prompt_text = true` or `AGENT_TAP_STORE_PROMPTS=1`. Secret redaction is pattern based, so treat it as best effort ([docs/privacy.md](docs/privacy.md)).
183
+
184
+ **What does agent-tap need to run?**
185
+ Python 3.11 or later and three small dependencies (`platformdirs`, `fastapi`, `uvicorn`). It needs no Docker, database server, API key, or cloud account. Docker is only needed to read the logs of services that run in Docker.
186
+
187
+ ## CLI reference
188
+
189
+ | Command | Purpose |
190
+ |---|---|
191
+ | `agent-tap init [--yes\|--non-interactive] [--harnesses h1,h2] [--store-prompts]` | Choose harnesses and services. Alias `setup` |
192
+ | `agent-tap onboard --name NAME --kind service\|gateway\|harness [--health-url URL] [--docker-container NAME] [--log-path FILE] [--process-name NAME]` | Add a service to `config.toml`. Alias `service-add` |
193
+ | `agent-tap doctor [--json]` | Show config, paths, what was found, and source health |
194
+ | `agent-tap run [--once\|--watch]` | Collect once, or continuously with the dashboard. `daemon` is an alias for `run --watch` |
195
+ | `agent-tap serve [--port 6007]` | Run the dashboard only |
196
+ | `agent-tap query <sql or preset> [--json]` | Run read-only SQL or a preset against the spans database |
197
+ | `agent-tap digest [--hours 24] [--json]` | Print a session and error digest |
198
+ | `agent-tap prune [--days 90]` | Delete traces older than the window |
199
+ | `agent-tap bug-report [--error-text TEXT] [--error-file FILE] [--service NAME] [--open] [--json] [--output FILE]` | Build a diagnostic bundle for a GitHub issue |
200
+ | `agent-tap service install\|status\|uninstall\|render [--os windows\|macos\|linux]` | Manage the background service. `render` prints the unit without installing it |
201
+ | `agent-tap adapters list\|validate <file.toml>` | List adapters or validate a declarative adapter |
202
+ | `agent-tap config show` | Print the effective configuration |
203
+
204
+ The global flag `--config <file>` selects a config file.
205
+
206
+ ## Configuration
207
+
208
+ Settings come from four places. Each one overrides the ones after it: command-line flags, `AGENT_TAP_*` environment variables, `config.toml`, and operating system defaults.
209
+
210
+ `config.toml` lives in the user config directory (`~/.config/agent-tap/` on Linux, `~/Library/Application Support/agent-tap/` on macOS, `%LOCALAPPDATA%\agent-tap\` on Windows). Set `AGENT_TAP_CONFIG` to use another path.
211
+
212
+ ```toml
213
+ spans_db = "/path/to/spans.db"
214
+ state_db = "/path/to/state.sqlite"
215
+ store_prompt_text = false # AGENT_TAP_STORE_PROMPTS=1 to enable
216
+ host = "127.0.0.1" # AGENT_TAP_HOST
217
+ port = 6007 # AGENT_TAP_PORT
218
+ interval = 5.0 # poll interval in seconds
219
+ lookback_hours = 48.0
220
+ retention_days = 90
221
+ project_name = "agent-analytics"
222
+ enabled_services = ["claude-code", "codex", "copilot-cli", "searxng"] # omit to use everything found
223
+ adapters_dir = "~/.config/agent-tap/adapters" # declarative harness adapters
224
+ wsl_discovery = false # AGENT_TAP_WSL=1 enables optional WSL2 path discovery on Windows
225
+
226
+ [paths] # data directory overrides, or AGENT_TAP_<NAME>_DIR
227
+ codex = "/custom/.codex"
228
+
229
+ [[services]] # one entry per onboarded service or gateway
230
+ name = "litellm"
231
+ kind = "gateway" # harness, gateway, or service
232
+ health_url = "http://127.0.0.1:4000/health/liveliness"
233
+ docker_container = "litellm"
234
+ log_path = "~/logs/litellm.log"
235
+ process_name = "litellm"
236
+ ```
237
+
238
+ The older key names `enabled_harnesses` and `adapters` still work as aliases for `enabled_services`.
239
+
240
+ Environment variables: `AGENT_TAP_CONFIG`, `AGENT_TAP_SPANS_DB`, `AGENT_TAP_STATE_DB`, `AGENT_TAP_STORE_PROMPTS`, `AGENT_TAP_HOST`, `AGENT_TAP_PORT`, `AGENT_TAP_WSL`, and `AGENT_TAP_<NAME>_DIR`.
241
+
242
+ ### Where agent-tap looks for harness data
243
+
244
+ | Harness | Locations checked |
245
+ |---|---|
246
+ | Claude Code | `~/.claude/projects`, `$XDG_CONFIG_HOME/claude/projects` |
247
+ | OpenAI Codex CLI | `$CODEX_HOME` or `~/.codex` |
248
+ | GitHub Copilot CLI | `~/.copilot` |
249
+ | Aider | `~/.aider*` or project `.aider.chat.history.md` / JSONL logs via `examples/adapters/aider.toml` |
250
+ | Cline / Roo Code | VS Code `globalStorage` task history via `examples/adapters/cline.toml` |
251
+ | Custom harnesses | Any directory configured in `[paths]`, `AGENT_TAP_<NAME>_DIR`, or `adapters_dir` |
252
+
253
+ ## More documentation
254
+
255
+ - [Storage schema](docs/schema.md)
256
+ - [Privacy](docs/privacy.md)
257
+ - [Write a harness adapter](docs/writing-an-adapter.md)
258
+ - [Write a service adapter](docs/writing-a-service-adapter.md)
259
+ - [Contributing](CONTRIBUTING.md)
260
+
261
+ ## License
262
+
263
+ MIT
@@ -0,0 +1,56 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "ai-agent-tap"
7
+ version = "0.3.3"
8
+ description = "Local usage analytics, error debugging, trace correlation, and service monitoring for Claude Code, Codex, Copilot CLI, Aider, Cline, LiteLLM, Ollama, SearXNG, Firecrawl, and local AI services"
9
+ readme = "README.md"
10
+ license = { text = "MIT" }
11
+ requires-python = ">=3.11"
12
+ keywords = ["ai-agents", "coding-agents", "claude-code", "openai-codex", "github-copilot", "copilot-cli", "aider", "cline", "litellm", "ollama", "mcp", "model-context-protocol", "llm-observability", "agent-observability", "agent-monitoring", "agent-debugging", "llmops", "sqlite", "developer-tools", "opentelemetry"]
13
+ classifiers = [
14
+ "Development Status :: 4 - Beta",
15
+ "Environment :: Console",
16
+ "Environment :: Web Environment",
17
+ "Intended Audience :: Developers",
18
+ "License :: OSI Approved :: MIT License",
19
+ "Operating System :: OS Independent",
20
+ "Programming Language :: Python :: 3",
21
+ "Programming Language :: Python :: 3.11",
22
+ "Programming Language :: Python :: 3.12",
23
+ "Programming Language :: Python :: 3.13",
24
+ "Topic :: Software Development :: Debuggers",
25
+ "Topic :: System :: Monitoring",
26
+ "Topic :: Software Development :: Quality Assurance",
27
+ ]
28
+ dependencies = ["platformdirs>=3.0", "fastapi>=0.100", "uvicorn>=0.23"]
29
+
30
+ [project.urls]
31
+ Homepage = "https://github.com/nareshh74/agent-tap"
32
+ Source = "https://github.com/nareshh74/agent-tap"
33
+ Issues = "https://github.com/nareshh74/agent-tap/issues"
34
+
35
+ [project.optional-dependencies]
36
+ dev = ["pytest>=8", "httpx>=0.24", "build", "twine"]
37
+
38
+ [project.scripts]
39
+ agent-tap = "agent_tap.cli:main"
40
+
41
+ [project.entry-points."agent_tap.harnesses"]
42
+ raven = "agent_tap.adapters.raven:RavenAdapter"
43
+ hermes = "agent_tap.adapters.hermes:HermesAdapter"
44
+ claude-code = "agent_tap.adapters.claude_code:ClaudeCodeAdapter"
45
+ codex = "agent_tap.adapters.codex:CodexAdapter"
46
+ copilot-cli = "agent_tap.adapters.copilot_cli:CopilotCliAdapter"
47
+ omniroute = "agent_tap.adapters.omniroute:OmniRouteAdapter"
48
+
49
+ [tool.setuptools.packages.find]
50
+ where = ["src"]
51
+
52
+ [tool.setuptools.package-data]
53
+ agent_tap = ["dashboard/static/*", "examples/*.toml", "examples/services/*.toml"]
54
+
55
+ [tool.pytest.ini_options]
56
+ testpaths = ["tests"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+