Getting Started
Sibyl is an AI-native observability platform that investigates incidents automatically. Get started in under 5 minutes.
QUICK START
Create an account
Sign up and create your first project to get a DSN.
Install the SDK
Add the Sibyl SDK to your project.
Start investigating
Errors and traces flow in automatically. Ask Sibyl to investigate any incident.
Installation
Install the Sibyl SDK for your platform.
Node.js
npm install @sibyl/nodePython
pip install sibyl-sdkConfiguration
Initialize Sibyl with your project DSN. You can find this in your project settings.
DSN Format
https://<public-key>@ingest.sibyl.dev/<project-id>Environment Variables
| Variable | Required | Description |
|---|---|---|
| SIBYL_DSN | Yes | Your project DSN from the dashboard |
| SIBYL_ENVIRONMENT | No | Environment name (production, staging, dev) |
| SIBYL_SAMPLE_RATE | No | Event sample rate from 0.0 to 1.0 (default: 1.0) |
| SIBYL_DEBUG | No | Enable debug logging (default: false) |
Node.js SDK
The Node.js SDK auto-captures unhandled exceptions, promise rejections, and HTTP breadcrumbs.
Basic Setup
import { Sibyl } from '@sibyl/node';
Sibyl.init({
dsn: process.env.SIBYL_DSN,
environment: 'production',
});Manual Capture
// Capture an error
try {
await riskyOperation();
} catch (err) {
Sibyl.captureException(err, {
service: 'payment-service',
userId: user.id,
});
}
// Capture a message
Sibyl.captureMessage('Deployment started', 'info', {
version: '1.2.3',
});Graceful Shutdown
process.on('SIGTERM', async () => {
await Sibyl.flush();
await Sibyl.close();
process.exit(0);
});Python SDK
The Python SDK supports FastAPI, Django, and the standard logging module.
Basic Setup
import sibyl
sibyl.init(
dsn="https://key@ingest.sibyl.dev/proj_123",
environment="production",
)FastAPI Integration
from fastapi import FastAPI
from sibyl.integrations.fastapi import SibylMiddleware
app = FastAPI()
app.add_middleware(SibylMiddleware)Django Integration
# settings.py
MIDDLEWARE = [
'sibyl.integrations.django.SibylMiddleware',
# ... other middleware
]API Reference
All API endpoints require authentication via Bearer token or API key.
/v1/ingestBatch ingest events and spans
{ "events": [...], "spans": [...] }/v1/investigateStart an AI investigation (SSE stream)
{ "query": "Why are we seeing 500s?", "projectId": "..." }/api/explore/logsSearch and filter log events
?level=error&service=api&from=2024-01-01/api/explore/tracesList distributed traces
?service=api&minDuration=1000/api/incidentsList grouped incidents
?status=open&level=error/api/searchHybrid semantic + keyword search
{ "query": "database connection timeout" }Integrations
Framework-specific middleware for automatic error and performance capture.
Express.js
import express from 'express';
import { Sibyl } from '@sibyl/node';
import { sibylExpressMiddleware } from '@sibyl/node/integrations/express';
Sibyl.init({ dsn: process.env.SIBYL_DSN });
const app = express();
app.use(sibylExpressMiddleware());
// Your routes...
app.listen(3000);Next.js
// next.config.js
const { withSibyl } = require('@sibyl/node/integrations/nextjs');
module.exports = withSibyl({
// your Next.js config
});OpenTelemetry
import { SibylSpanExporter } from '@sibyl/node';
import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node';
import { SimpleSpanProcessor } from '@opentelemetry/sdk-trace-base';
const provider = new NodeTracerProvider();
provider.addSpanProcessor(
new SimpleSpanProcessor(new SibylSpanExporter())
);
provider.register();Self-Hosting
Run Sibyl on your own infrastructure with Docker Compose.
Prerequisites
- Docker & Docker Compose
- Node.js 20+
- pnpm 9+
- Google AI Studio API key (free tier)
1. Start Infrastructure
git clone https://github.com/your-org/sibyl.git
cd sibyl
cp .env.example .env.local
# Start PostgreSQL, Redis, ClickHouse, Qdrant
docker compose -f infra/docker-compose.yml up -d2. Install & Run
pnpm install
pnpm db:push # Apply database schema
pnpm dev # Start web + ingest service3. Environment Variables
# .env.local
DATABASE_URL=postgresql://sibyl:sibyl@localhost:5432/sibyl
CLICKHOUSE_URL=http://localhost:8123
REDIS_URL=redis://localhost:6379
QDRANT_URL=http://localhost:6333
GEMINI_API_KEY=your-api-key
JWT_SECRET=your-secret-key
NEXT_PUBLIC_API_URL=http://localhost:3000
NEXT_PUBLIC_INGEST_URL=http://localhost:3001