docs: update all documentation for subscription auth, billing tiers, and API key management
Some checks failed
Publish npm packages / publish (push) Successful in 50s
Publish PyPI package / publish (push) Failing after 3s
Deploy AgentLens / deploy (push) Successful in 1m21s

This commit is contained in:
Vectry
2026-02-11 00:35:51 +00:00
parent 9e6f6337c0
commit 32ed6e3f1d
9 changed files with 393 additions and 9 deletions

View File

@@ -13,10 +13,12 @@ npm install agentlens-sdk
## Quick Start
First, create an account at [agentlens.vectry.tech/register](https://agentlens.vectry.tech/register) and generate an API key in **Settings > API Keys** in the dashboard.
```typescript
import { init, TraceBuilder, shutdown } from "agentlens-sdk";
// Initialize the SDK
// Initialize with the API key from Settings > API Keys
init({
apiKey: "your-api-key",
endpoint: "https://agentlens.vectry.tech/api",
@@ -104,17 +106,31 @@ Pass `InitOptions` to `init()`:
```typescript
init({
apiKey: "your-api-key", // Required. Your AgentLens API key.
apiKey: "your-api-key", // Required. Create at Settings > API Keys in the dashboard.
endpoint: "https://...", // API endpoint. Defaults to AgentLens cloud.
maxBatchSize: 100, // Max items per batch before auto-flush.
flushInterval: 5000, // Auto-flush interval in milliseconds.
});
```
You can also set the API key via the `AGENTLENS_API_KEY` environment variable instead of passing it directly.
## Transport
The SDK ships with `BatchTransport`, which batches payloads and flushes them on an interval or when the batch size threshold is reached. This is used internally by `init()` — you typically do not need to instantiate it directly.
## Billing
Each trace counts as one session for billing. AgentLens cloud offers three tiers:
| Plan | Price | Sessions |
|------|-------|----------|
| Free | $0 | 20 sessions/day |
| Starter | $5/month | 1,000 sessions/month |
| Pro | $20/month | 100,000 sessions/month |
Manage your subscription in **Settings > Billing**. Self-hosted instances have no session limits.
## Documentation
Full documentation: [agentlens.vectry.tech/docs/typescript-sdk](https://agentlens.vectry.tech/docs/typescript-sdk)