docs: update all documentation for subscription auth, billing tiers, and API key management
This commit is contained in:
@@ -8,6 +8,8 @@ OpenCode plugin for AgentLens — trace your coding agent's decisions, tool call
|
||||
## Requirements
|
||||
|
||||
- OpenCode >= 1.1.0
|
||||
- An AgentLens account -- register at [agentlens.vectry.tech/register](https://agentlens.vectry.tech/register)
|
||||
- An API key created in **Settings > API Keys** in the AgentLens dashboard
|
||||
|
||||
## Install
|
||||
|
||||
@@ -44,7 +46,7 @@ Add the plugin to your OpenCode configuration at `~/.config/opencode/opencode.js
|
||||
}
|
||||
```
|
||||
|
||||
Set your API key:
|
||||
Set your API key (create one at **Settings > API Keys** in the [AgentLens dashboard](https://agentlens.vectry.tech)):
|
||||
|
||||
```bash
|
||||
export AGENTLENS_API_KEY="your-api-key"
|
||||
@@ -52,6 +54,8 @@ export AGENTLENS_API_KEY="your-api-key"
|
||||
|
||||
The plugin activates automatically when OpenCode starts. No code changes required.
|
||||
|
||||
Each OpenCode session counts as one trace (one session) for billing purposes. See the [billing documentation](https://agentlens.vectry.tech/docs/authentication-billing) for plan details.
|
||||
|
||||
## What Gets Captured
|
||||
|
||||
The plugin hooks into OpenCode's event system and records:
|
||||
|
||||
@@ -12,6 +12,8 @@ AgentLens is an observability SDK for AI agents. Unlike generic LLM tracing tool
|
||||
|
||||
## 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.
|
||||
|
||||
```bash
|
||||
pip install vectry-agentlens
|
||||
```
|
||||
@@ -19,7 +21,7 @@ pip install vectry-agentlens
|
||||
```python
|
||||
import agentlens
|
||||
|
||||
# Initialize once at startup
|
||||
# Initialize with the API key from Settings > API Keys
|
||||
agentlens.init(api_key="your-api-key")
|
||||
|
||||
# Trace any function with a decorator
|
||||
@@ -160,7 +162,7 @@ Initialize the SDK. Call once at application startup.
|
||||
|
||||
```python
|
||||
agentlens.init(
|
||||
api_key="your-api-key", # Required. Your AgentLens API key.
|
||||
api_key="your-api-key", # Required. Create at Settings > API Keys in the dashboard.
|
||||
endpoint="https://...", # API endpoint (default: https://agentlens.vectry.tech)
|
||||
flush_interval=5.0, # Seconds between batch flushes (default: 5.0)
|
||||
max_batch_size=10, # Traces per batch before auto-flush (default: 10)
|
||||
@@ -168,6 +170,8 @@ agentlens.init(
|
||||
)
|
||||
```
|
||||
|
||||
You can also set the API key via the `AGENTLENS_API_KEY` environment variable instead of passing it directly.
|
||||
|
||||
### `agentlens.trace()`
|
||||
|
||||
Decorator or context manager that creates a trace (or a nested span if already inside a trace).
|
||||
@@ -264,13 +268,25 @@ The SDK is lightweight and non-blocking. Traces are serialized and batched in a
|
||||
|
||||
## Dashboard
|
||||
|
||||
View your traces at [agentlens.vectry.tech](https://agentlens.vectry.tech):
|
||||
View your traces at [agentlens.vectry.tech](https://agentlens.vectry.tech) (login required):
|
||||
|
||||
- **Decision Trees** - Visualize the full decision path of every agent run
|
||||
- **Analytics** - Token usage, cost breakdowns, latency percentiles
|
||||
- **Real-time Streaming** - Watch agent decisions as they happen
|
||||
- **Session Grouping** - Track multi-turn conversations by session ID
|
||||
|
||||
## 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.
|
||||
|
||||
## Development
|
||||
|
||||
```bash
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user