Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

AtFlow

See what your LLM calls cost. One command. No signup.

AtFlow is a local observability tool for LLM applications. Point your SDK at it, see your costs, tokens, and latency in real-time.

python -m pip install atflows==0.1b1
atflows

AtFlow 0.1b1 is a beta release. AtFlow uses Bun (>=1.1.0) to run its local server. Install Bun before starting the command. The first launch prepares the bundled runtime in ~/.cache/atflows and needs package network access.

Dashboard: localhost:3000 · Proxy: localhost:8080


Quick Start

1. Start AtFlow

The PyPI package and CLI are named atflows; the product is AtFlow.

python -m pip install atflows==0.1b1
atflows

For development from source:

git clone https://github.com/aetna000/atflow.git
cd atflow
bun install
bun run build
bun run dev

2. Point Your SDK

# Python
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8080/v1")
// JavaScript
const client = new OpenAI({ baseURL: 'http://localhost:8080/v1' })
// PHP
$client = OpenAI::factory()->withBaseUri('http://localhost:8080/v1')->make();

3. View Dashboard

Open localhost:3000 to see your traces, costs, and token usage.


Who Is This For?

  • Solo developers building with OpenAI, Anthropic, etc.
  • Hobbyists who want to see what their AI projects cost
  • Anyone who doesn't want to pay for or set up a SaaS observability tool

Features

Feature Description
Cost Tracking Real-time pricing for 2000+ models
Request Logging See every request/response with latency
Multi-Provider OpenAI, Anthropic, Gemini, Ollama, Groq, Mistral, and more
OpenTelemetry Accept OTLP/HTTP traces from LangChain, LlamaIndex, Traceloop, Vercel AI SDK, etc.
Session correlation Group multi-turn agent runs under one session via session.id (OpenInference / OTel)
Span timeline Virtualized waterfall view; ~5k spans per trace stays smooth
Zero Config Just run it, point your SDK, done
Local Storage SQLite database, no external services

Supported Providers

Use path prefixes or the X-AtFlow-Provider header:

Provider URL
OpenAI http://localhost:8080/v1 (default)
Anthropic http://localhost:8080/anthropic/v1
Gemini http://localhost:8080/gemini/v1
Ollama http://localhost:8080/ollama/v1
Groq http://localhost:8080/groq/v1
Mistral http://localhost:8080/mistral/v1
Azure OpenAI http://localhost:8080/azure/v1
Cohere http://localhost:8080/cohere/v1
Together http://localhost:8080/together/v1
OpenRouter http://localhost:8080/openrouter/v1
Perplexity http://localhost:8080/perplexity/v1

OpenTelemetry Support

If you're using LangChain, LlamaIndex, or other instrumented frameworks:

# Python - point OTLP exporter to AtFlow
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter

exporter = OTLPSpanExporter(endpoint="http://localhost:3000/v1/traces")
// JavaScript
import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-http'

new OTLPTraceExporter({ url: 'http://localhost:3000/v1/traces' })

Session correlation

If your spans carry one of these attributes, AtFlow groups multiple traces into a single session and exposes them in the Sessions tab:

Convention Attribute
OpenInference / Phoenix / Arize session.id (recommended)
LangSmith langsmith.trace.session_id
Traceloop / OpenLLMetry traceloop.association.properties.session_id
Vercel AI SDK ai.telemetry.metadata.sessionId
OTel resource fallback service.instance.id resource attribute

For chat-thread correlation, set gen_ai.conversation.id (OTel) or traceloop.association.properties.thread_id.


Configuration

Variable Default Description
PROXY_PORT 8080 Proxy port
DASHBOARD_PORT 3000 Dashboard + OTLP receiver port (npx falls back to 1337)
DATA_DIR ~/.atflows Data directory
MAX_TRACES 10000 Max traces to retain
VERBOSE 0 Enable verbose logging

Set provider API keys as environment variables (OPENAI_API_KEY, ANTHROPIC_API_KEY, etc.) if you want the proxy to forward requests.


Development

AtFlow is a Bun workspaces monorepo (apps/server, apps/dashboard, plus six packages under packages/). Bun is required.

# Clone and install (one workspace install at root covers every package)
git clone https://github.com/aetna000/atflow.git
cd atflows && bun install

# Server (dashboard on :3000, proxy on :8080)
bun run dev

# Dashboard dev server with HMR (separate terminal, proxies /api + /ws)
bun run dev:dashboard

# Build dashboard for production (outputs to /public/)
bun run build

# Tests
bun run test                # server unit/integration
bun run --filter @atflows/dashboard test    # viewport vitest suite
bun run test:e2e            # Playwright

The dashboard is Svelte 5 + Vite 8 and builds to /public/ at the repo root. The bin entry bin/atflows.js (for the npm workspace) spawns apps/server/src/server.ts directly.


Advanced Features

For advanced usage, see the docs/ folder:


License

MIT © Helge Sverre and Javad Taghia

Credits

AtFlow is a rebrand and continuation of LLMFlow by Helge Sverre. Original code remains under the MIT license in LICENSE. Rebrand, packaging and dashboard work by Javad Taghia.

Release files for atflows 0.1b1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for atflows 0.1b1
File Interpreter ABI Platform
atflows-0.1b1-py3-none-any.whl Python 3 none any Details

Release files / atflows-0.1b1-py3-none-any.whl

Download URL atflows-0.1b1-py3-none-any.whl
Size 177.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7a5864db1540d0952522b14acfd544c8edf385f12d74300f995efef19b811406
BLAKE2b-256 checksum
How to use checksums
e4b0c761fd7bc07e1f7e5efdca800627dc3ec30025172ac07361b042b6e4fd64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.2
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page