Skip to main content

Local-first observability SDK for AI agents

Project description

beacon-agent

Local-first observability SDK for AI agents.

Instrument your agent with one decorator and get a live dashboard with traces, costs, and alerts — all running locally.

Install

pip install beacon-trace

Usage

from beacon import trace

@trace(agent_id="my-agent", api_url="http://localhost:8000")
def run_agent(prompt: str) -> str:
    # your agent logic
    return result

Full control:

from beacon import BeaconTracer

tracer = BeaconTracer(agent_id="my-agent", api_url="http://localhost:8000")
tracer.start_trace(metadata={"user_id": "123"})

tracer.log_step(
    step_type="llm_call",
    model="gpt-4",
    input_tokens=1200,
    output_tokens=400,
    cost_usd=0.012,
    latency_ms=1200
)

tracer.end_trace(status="success")

Dashboard

Start the Beacon server to see your traces:

curl -fsSL https://raw.githubusercontent.com/pisigmac/beacon-trace/main/install.sh | bash
beacon start

Then open http://localhost:3000.

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

beacon_trace-1.0.1.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

beacon_trace-1.0.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file beacon_trace-1.0.1.tar.gz.

File metadata

  • Download URL: beacon_trace-1.0.1.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for beacon_trace-1.0.1.tar.gz
Algorithm Hash digest
SHA256 e0c94d82ffc2b6977e34e2efa4a98eb99fcc942068cafae02a0a2ac72b35d710
MD5 f2475a28f831a1cbf2a0a3b4aad0f0f3
BLAKE2b-256 80155685bf7adfcd31831f4463065c8d16857a16ea656ecd5fd11ff85c606d90

See more details on using hashes here.

File details

Details for the file beacon_trace-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: beacon_trace-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for beacon_trace-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 25ab390455575a49903f6428d249d22353c49a08c7ddaa7ac25923215a84e019
MD5 4be8dfd6f4969e0650921634bf1a6eee
BLAKE2b-256 01bf0da50f8f94bb3a140d475ec922cc7307035cd0d376d157732441605318c0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page