{"slug": "agentwire-a-wireshark-for-ai-agents", "title": "AgentWire: A Wireshark for AI Agents", "summary": "AgentWire, an open-source observability and security layer for AI agent workflows, has been released as a minimal viable product (MVP) built on ASP.NET Core. The tool treats agent traffic like network packets, enabling tracing of prompts, responses, token usage, latency, and cost attribution per agent or model. Currently relying on SQLite with plans for ClickHouse, AgentWire provides a REST API for ingestion and analytics, aiming to merge observability, security scanning for prompt injections, and cost intelligence.", "body_md": "# AgentWire: A Wireshark for AI Agents\n\n[MCP](/en/tags/mcp/)server, you usually only see the final output, leaving you blind to how many tokens were actually burned, which specific hop caused a latency spike, or if a prompt injection quietly slipped through the chain.\n\nAgentWire attempts to fix this by treating agent traffic like network packets. It's essentially an observability and security layer designed to track the \"packet trail\" of an AI workflow.\n\n## The Technical Trade-off\n\nUnlike basic logging wrappers, this is built on ASP.NET Core as an event-driven system. The goal is to ingest high-throughput streams without blocking the agent's execution. It aims to merge three distinct functions:\n\n**Observability:** Tracing the path between user, agent, and MCP servers.**Security:** Scanning for secret leaks and prompt injections.**Cost Intelligence:** Attributing exact dollar amounts to specific agents or models.\n\nLooking at the current state, it's a lean MVP. It relies on SQLite for now, with ClickHouse planned for when the data scales. While the vision is \"OpenTelemetry + Wireshark,\" the current reality is a set of basic ingestion and analytics endpoints.\n\n## Deployment: A Practical Tutorial\n\nIf you want to test the ingestion pipeline, you'll need the .NET 10 SDK.\n\n1. **Spin up the API**\n\n```\ngit clone https://github.com/qmmughal/AgentWire.git\ncd AgentWire\ndotnet run --project src/AgentWire.Presentation\n```\n\n2. **Push a trace packet**\n\nThe system uses a `POST /v1/traces`\n\nendpoint. You send the prompt, response, and token counts, and it handles the cost calculation in the background.\n\n```\ncurl -X POST http://localhost:5102/v1/traces \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"traceId\": \"demo-001\",\n \"agentId\": \"support-bot\",\n \"modelProvider\": \"openai\",\n \"modelName\": \"gpt-4o-mini\",\n \"systemPrompt\": \"You are a helpful assistant.\",\n \"userPrompt\": \"Hello\",\n \"llmResponse\": \"Hi there!\",\n \"promptTokens\": 12,\n \"completionTokens\": 8,\n \"latencyMs\": 220\n }'\n```\n\n3. **Verify the data**\n\nYou can pull the enriched packet (including the calculated cost) via the packets endpoint:\n\n```\ncurl http://localhost:5102/v1/packets\n```\n\nThe output returns the `traceId`\n\nand the exact cost associated with that specific LLM call:\n\n```\n[\n {\n \"traceId\": \"demo-001\",\n \"packetId\": \"pk_9f2c1a\",\n \"agentId\": \"support-bot\",\n \"modelProvider\": \"openai\",\n \"modelName\": \"gpt-4o-mini\",\n \"promptTokens\": 12,\n \"completionTokens\": 8,\n \"latencyMs\": 220,\n \"cost\": 0.0000042,\n \"timestamp\": \"2026-07-26T10:15:03Z\"\n }\n]\n```\n\nIt's a promising start for anyone needing a deep dive into their AI workflow, though the real test will be how it handles massive concurrency once the YARP-based gateway is implemented.\n\n[Next Open-Weight AI: The Kubernetes Moment →](/en/threads/3666/)", "url": "https://wpnews.pro/news/agentwire-a-wireshark-for-ai-agents", "canonical_source": "https://promptcube3.com/en/threads/3674/", "published_at": "2026-07-26 12:01:56+00:00", "updated_at": "2026-07-26 12:09:19.786779+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "ai-infrastructure", "ai-safety", "developer-tools"], "entities": ["AgentWire", "ASP.NET Core", "SQLite", "ClickHouse", "OpenTelemetry", "YARP", "OpenAI", "GPT-4o-mini"], "alternates": {"html": "https://wpnews.pro/news/agentwire-a-wireshark-for-ai-agents", "markdown": "https://wpnews.pro/news/agentwire-a-wireshark-for-ai-agents.md", "text": "https://wpnews.pro/news/agentwire-a-wireshark-for-ai-agents.txt", "jsonld": "https://wpnews.pro/news/agentwire-a-wireshark-for-ai-agents.jsonld"}}