# About

> Why hashspan exists, the principles behind it, and how it is built in the open.

Source: https://hashspan.dev/about

**Agents are starting to move money. Their traces should show where it went.**

hashspan is an open-source TypeScript library that records every on-chain transaction an AI agent sends as OpenTelemetry spans, inside the agent's own trace. It works the same for a TypeScript service that sends EVM transactions through viem, the Coinbase CDP SDK or x402, or through a [wallet service](https://hashspan.dev/docs/integrations#wallet-services), such as a payment worker or a wallet backend. This page explains why it exists and how it is built.

## The gap

Agent tracing tools show the model call and the tool call. When that tool sends a transaction, the trace usually ends there. Whether it was mined, reverted or replaced, and what it cost, lives in a block explorer or a separate monitoring product, away from the decision that caused it.

With protocols like x402 and wallet APIs built for agents, more tool calls now move real value. Debugging them shouldn't mean copying a hash between tabs.

## The approach

hashspan keys everything to the transaction hash and emits standard OpenTelemetry spans, a `send` span and a `confirm` span (a `payment` span for an x402 or MPP payment), nested under the tool that made it. Your existing tracing backend becomes the UI.

## Principles

1. **No new dashboard.** Standard OpenTelemetry spans. Jaeger, Grafana Tempo, Langfuse, Honeycomb or any OTLP backend is the UI.
2. **Keyed by the hash.** The transaction hash is the join key between the agent trace and the chain.
3. **You choose what is recorded.** Calldata arguments and error messages are opt-in. Addresses are recorded by default and can be hashed or dropped.
4. **Never in the way.** It never signs or broadcasts, and telemetry stays off the call path.
5. **Small footprint.** The core has one peer dependency, @opentelemetry/api. Adapters add the library they instrument, plus viem to read the chain.
6. **Standards-minded.** Span and attribute names are a public draft, aiming at a proposal to OpenTelemetry.

## Built in the open

Every design decision is written down as an architecture decision record. The span and attribute names are a public draft, with a proposal to OpenTelemetry on the roadmap. Packages are published with npm provenance.

- [Read the ADRs](https://github.com/selimaytac/hashspan/tree/main/docs/adr)
- [Semantic conventions](https://github.com/selimaytac/hashspan/blob/main/docs/semconv.md)
- [Upstream findings](https://github.com/selimaytac/hashspan/blob/main/docs/upstream-findings.md)
- [Roadmap](https://hashspan.dev/roadmap.md)
- [Security and stability](https://hashspan.dev/docs/security)

Selected architecture decision records:

- [ADR 0001: Hash-centric core](https://github.com/selimaytac/hashspan/blob/main/docs/adr/0001-hash-centric-core.md)
- [ADR 0002: Send and confirm spans](https://github.com/selimaytac/hashspan/blob/main/docs/adr/0002-send-confirm-spans.md)
- [ADR 0004: Privacy defaults](https://github.com/selimaytac/hashspan/blob/main/docs/adr/0004-privacy-defaults.md)
- [ADR 0005: Revert reason replay](https://github.com/selimaytac/hashspan/blob/main/docs/adr/0005-revert-reason-replay.md)
- [ADR 0008: Replaced transactions](https://github.com/selimaytac/hashspan/blob/main/docs/adr/0008-replaced-transactions.md)
- [ADR 0012: Coinbase CDP adapter](https://github.com/selimaytac/hashspan/blob/main/docs/adr/0012-cdp-adapter.md)

## Maintainer

Selim Aytaç: Maintains hashspan. Writes about OpenTelemetry, agentic payments and on-chain transaction internals. (https://github.com/selimaytac)

hashspan is open to contributors. If you trace agents that send transactions, feedback on the span schema is the most valuable contribution right now.

- Feedback on the span names: https://github.com/selimaytac/hashspan/discussions/categories/semconv-feedback
- Source: https://github.com/selimaytac/hashspan
