Skip to main content

Drop-in observability and guardrails for AI agents.

Project description

Lightsei

Drop-in observability and guardrails for AI agents.

pip install lightsei
import lightsei
import openai

lightsei.init(api_key="bk_...", agent_name="my-bot")

oai = openai.OpenAI()  # auto-instrumented after init()

@lightsei.track
def reply(prompt: str) -> str:
    return oai.chat.completions.create(
        model="gpt-4o-mini",
        messages=[{"role": "user", "content": prompt}],
    ).choices[0].message.content

That's it. Every call now appears at app.lightsei.com with timestamps, model, latency, and token counts. No instrumentation, no manual wrapping.

What you get

  • Observability — runs, events, costs, errors. Out of the box for OpenAI and Anthropic; one line of code per provider.
  • Guardrails — daily cost caps, output validators (schema + content rules), behavioral checks. Caught before delivery, visible in the dashboard.
  • Polaris — a project orchestrator bot you can deploy via Lightsei's PaaS. Reads your MEMORY.md + TASKS.md and proposes the next moves.
  • Notifications — Slack, Discord, Teams, Mattermost, generic webhook. Polaris's plans land in your team chat, validation failures page you, agent crashes get reported.
  • Graceful degradation, non-negotiable — if Lightsei's backend is unreachable or rejects an event, your bot keeps running. SDK never crashes the user's program.

Configuration

lightsei.init(
    api_key="bk_...",            # your workspace key from app.lightsei.com
    agent_name="my-bot",         # appears in dashboard + cost rollups
    version="0.1.0",             # optional — tags events
    base_url="https://api.lightsei.com",  # default
)

Sign up for a workspace API key at app.lightsei.com/signup.

Deploying bots on Lightsei

lightsei deploy ./my-bot --agent my-bot

Zips the directory, uploads to Lightsei's hosted runtime, builds a venv from requirements.txt, runs bot.py. Logs stream into the dashboard.

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

lightsei-0.1.0.tar.gz (27.4 kB view details)

Uploaded Source

Built Distribution

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

lightsei-0.1.0-py3-none-any.whl (28.8 kB view details)

Uploaded Python 3

File details

Details for the file lightsei-0.1.0.tar.gz.

File metadata

  • Download URL: lightsei-0.1.0.tar.gz
  • Upload date:
  • Size: 27.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for lightsei-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a31459ed36d8706b81c6338180d92438dd44ea6008f243f7d4ee6b4710db5de2
MD5 4f24e0e53d2b943c844dbcee2f615240
BLAKE2b-256 ad1563dc258b6fefe7d2d2a4166a6bdad05b78f97eb224b05d61c0736d8e8714

See more details on using hashes here.

Provenance

The following attestation bundles were made for lightsei-0.1.0.tar.gz:

Publisher: release.yml on bewallace01/lightsei

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lightsei-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: lightsei-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 28.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for lightsei-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1cd2703bd6185c393460aa9b79a496e463494d91b55ddae5600ba508940fbbd7
MD5 16dc674a44806c94279328e0ae2469fd
BLAKE2b-256 b90cab2e50e28de375d9a50d3b49a9b809509d424891664482b559291d64d386

See more details on using hashes here.

Provenance

The following attestation bundles were made for lightsei-0.1.0-py3-none-any.whl:

Publisher: release.yml on bewallace01/lightsei

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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