Skip to main content

Record every AI decision as a signed, append-only trail. Every loop leaves a tail.

Project description

looptail

Record every AI decision as a signed, append-only trail. Every loop leaves a tail.

pip install looptail
import looptail

looptail.init(app="support-agent")

@looptail.trail
def handle_ticket(ticket):
    ...

# report an outcome signal when you learn how it went
looptail.outcome(looptail.last_event_id(), csat=5)

Every call becomes a hash-chained, Ed25519-signed loop event appended to .looptail/support-agent.jsonl. Nothing is edited in place; any modification, deletion, or reorder of past records is detectable:

npx @looptail/cli verify --app support-agent

✔ 2 loop events
✔ chain intact · signatures valid

Or from Python: looptail.verify_trail().

The whole loop, CLI-first

looptail-evals run --rubric rubrics/refund-policy.json --app support-agent
looptail-issues cluster --app support-agent
looptail-improve propose --app support-agent --issue refund-policy/v1/criterion-0 \
    --prompt-file prompts/support.txt
looptail-improve replay --app support-agent --proposal prop_... \
    --cases regression.jsonl --runner myapp.replay:run --rubric rubrics/refund-policy.json
looptail-improve approve --app support-agent --proposal prop_... --apply

Evaluators score recorded events against your rubrics with an LLM judge (pip install "looptail[anthropic]" or [openai]); failing verdicts cluster into tracked issues; the improve loop drafts a patch, replays your regression set, and gates approval on a passing replay. Every step lands in the trail as a signed event. Guide: looptail.ai/docs/improve.

How it works

  • A signing key is created on first use at ~/.looptail/signing-key (override with LOOPTAIL_SIGNING_KEY, hex seed).
  • Events follow the open trail format — spec/trail-format.md — and are verifiable by any implementation, including the JS CLI.
  • The local trail is the source of truth. With an API key (looptail.init(app=..., api_key=...) or LOOPTAIL_API_KEY), events also sync to the hosted Tail (private beta); sync is best-effort and never blocks or crashes your app.

Read the trust model in the spec before relying on local trails as evidence: self-signed trails are tamper-evident; hosted anchoring (v0.2) makes them stronger.

Docs: looptail.ai/docs · License: Apache-2.0

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

looptail-0.2.0.tar.gz (27.2 kB view details)

Uploaded Source

Built Distribution

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

looptail-0.2.0-py3-none-any.whl (27.4 kB view details)

Uploaded Python 3

File details

Details for the file looptail-0.2.0.tar.gz.

File metadata

  • Download URL: looptail-0.2.0.tar.gz
  • Upload date:
  • Size: 27.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.15

File hashes

Hashes for looptail-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e64a17ee9e260f07759d81b4b4ea73d5415d99b0ec94515f3bcdbff5c7ab8435
MD5 2757518d0672b5689a7f78f92c591d5a
BLAKE2b-256 c447b767805314072de7d0b2f4faa4f19e5f5b743ccca37825922a0fb759f91b

See more details on using hashes here.

File details

Details for the file looptail-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: looptail-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 27.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.15

File hashes

Hashes for looptail-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 13d0160e875d66c5f6214cfe2a0e01bfa6310c70bd1c00d9b4dad85405119bda
MD5 353fd007a27b66048ba42b3929c4c6e6
BLAKE2b-256 aedfc52f24ce53e335f6e7e4c36b9e36df0fb914b40a9967377db7343ab41409

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