Observability CLI for agentic workflows and event-driven systems. Query LGTM stack + Kafka from your terminal.
Project description
lgtm-observe
Observability CLI for agentic workflows and event-driven systems.
Trace requests across distributed services, debug Kafka consumers, and correlate logs with traces - all from your terminal.
Built for teams running AI agents, Kafka pipelines, and microservices on the LGTM stack (Loki, Grafana, Tempo, Prometheus).
Why?
When debugging agentic workflows, you need to:
- Trace a request across multiple services (agent → tool → API → database)
- Check Kafka lag to see if consumers are keeping up
- Correlate logs with traces to find where things went wrong
- Do it fast without clicking through Grafana dashboards
Existing tools are siloed:
logcli- Loki onlypromtool- Prometheus onlytempo-cli- Tempo only
lgtm-observe: All of them + Kafka in one tool. Optimized for the workflow of debugging distributed systems.
Install
# Core (logs, traces, metrics)
pip install adjoint-lgtm-observe
# With Kafka support
pip install adjoint-lgtm-observe[kafka]
# Development
pip install -e ".[dev,kafka]"
Quick Start
# Configure endpoints (pick one method)
# Option 1: Environment variables
export LOKI_URL=http://localhost:3100
export TEMPO_URL=http://localhost:3200
export PROMETHEUS_URL=http://localhost:9090
export KAFKA_BOOTSTRAP=localhost:9093
# Option 2: Config file
cat > ~/.lgtm-observe.json << 'EOF'
{
"loki_url": "http://localhost:3100",
"tempo_url": "http://localhost:3200",
"prometheus_url": "http://localhost:9090",
"kafka_bootstrap": "localhost:9093"
}
EOF
# Check status
lgtm-observe status
# Query logs
lgtm-observe logs
lgtm-observe logs --service myapp --limit 50
# Get traces
lgtm-observe traces --service myapp
lgtm-observe trace abc123def456
# Query metrics
lgtm-observe metrics 'up'
lgtm-observe metrics 'rate(http_requests_total[5m])'
# Kafka state
lgtm-observe kafka topics
lgtm-observe kafka consumers
lgtm-observe kafka lag
Commands
| Command | Description |
|---|---|
status |
Health check all systems |
config |
Show current configuration |
logs |
Query logs from Loki |
trace <id> |
Get a specific trace |
traces |
Search recent traces |
metrics <query> |
Query Prometheus |
kafka topics |
List topics with message counts |
kafka consumers |
List consumer groups |
kafka lag |
Show consumer lag |
Development
# Using uv (recommended)
uv sync --all-extras --dev
uv run pytest
uv run ruff check src/
# Or with pip
pip install -e ".[dev,kafka]"
pytest
ruff check src/
Publishing
This package uses uv and PyPI Trusted Publishers for secure, token-free releases.
- Create a GitHub release with a version tag (e.g.,
v0.1.0) - GitHub Actions automatically builds and publishes to PyPI
First-time PyPI setup
Add a Trusted Publisher on PyPI:
- Go to https://pypi.org/manage/project/adjoint-lgtm-observe/settings/publishing/
- Add GitHub as trusted publisher:
- Owner:
Adjoint-uk - Repository:
lgtm-observe - Workflow:
publish.yml - Environment:
pypi
- Owner:
License
Apache 2.0 - Adjoint Ltd
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file adjoint_lgtm_observe-0.1.0.tar.gz.
File metadata
- Download URL: adjoint_lgtm_observe-0.1.0.tar.gz
- Upload date:
- Size: 31.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0cfc455e83b234e29053eac21eee0de42d24961194417701f062ee68d9632890
|
|
| MD5 |
e80a7006c200c2b98b06de3637df86cb
|
|
| BLAKE2b-256 |
5d14445e3ef25d27196b0b198f5abe055963c10a0a34a2fcadf0607cb76eae1f
|
File details
Details for the file adjoint_lgtm_observe-0.1.0-py3-none-any.whl.
File metadata
- Download URL: adjoint_lgtm_observe-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
751960b420d48e8f9ff89dab41b39dc1e8dd7c17685b8872eb8fd445256dea0f
|
|
| MD5 |
63d0704817d8f517dd438a4215e3678c
|
|
| BLAKE2b-256 |
ee87aac697fb106fed11a7bcd69c08eebca6451a0461e54d43d6cb399f9f0e8e
|