get started

Get your trail in 10 minutes

By the end of this page your agent's decisions are being recorded as signed loop events, and you've verified the chain yourself.

1. Install the SDK

# python
pip install looptail

# typescript / node
npm install @looptail/sdk

2. Initialize

The SDK is local-first: no account needed. Events append to .looptail/<app>.jsonl, and a signing key is created at ~/.looptail/signing-key on first use. Adding an API key (hosted Tail, private beta) additionally syncs events to your hosted trail — best-effort, never blocking your app.

# python
import looptail

looptail.init(app="support-agent")
# with hosted sync (private beta): looptail.init(app="support-agent", api_key="lt_...")
// typescript
import { Looptail } from '@looptail/sdk';

const lt = new Looptail({ app: 'support-agent' });

3. Wrap your agent

Wrap the function where a decision happens. Looptail records inputs, retrieved context, tool calls, output, and — once you report them — outcome signals.

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

# report an outcome signal when you learn how it went
looptail.outcome(event_id, csat=5)
// typescript
export const handleTicket = lt.trail(async (ticket) => {
  // ...
});

4. Verify the chain

Every record is hash-chained and signed at write time. Verify from your terminal — no dashboard required, no trust required.

npx @looptail/cli verify --app support-agent --since 24h

✔ 1,204 loop events
✔ chain intact · signatures valid

What's next

Stuck? hello@looptail.ai — a human answers.