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.2.tar.gz (3.7 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.2-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: beacon_trace-1.0.2.tar.gz
  • Upload date:
  • Size: 3.7 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.2.tar.gz
Algorithm Hash digest
SHA256 fc996e2185b27d7068f3da449aa04d4e564d94d2d862de976e2bfe5633f2050a
MD5 8e395e476fdd01bd57070cbf617d7c29
BLAKE2b-256 2ad4c0bde369396b5c56f0e04fd9de67957aadf5f7529174dfb8abb4def1978f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: beacon_trace-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.0 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8c83071c0825f97cd360b897d5fc1877914829fce5161d7ed6f129121c4caf50
MD5 5846a7eb8ac9f3cd7238a6b17c9e8aa7
BLAKE2b-256 08d818ff1dc10af498bc3129e18d42b43477c5941b40d24596803765414c50c7

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