diff --git a/README.md b/README.md
index edadad5..4dda01e 100644
--- a/README.md
+++ b/README.md
@@ -6,6 +6,8 @@
+
+
@@ -44,6 +46,8 @@ Open `https://agentlens.vectry.tech/dashboard` to see your traces.
## Features
- **Decision Tracing** -- Log every decision point with reasoning, alternatives, and confidence scores
+- **OpenCode Plugin** -- Trace your coding agent sessions with `opencode-agentlens`
+- **TypeScript SDK** -- First-class TypeScript support with `agentlens-sdk`
- **OpenAI Integration** -- Auto-instrument OpenAI calls with one line: `wrap_openai(client)`
- **LangChain Integration** -- Drop-in callback handler for LangChain agents
- **Nested Traces** -- Multi-agent workflows with parent-child span relationships
@@ -52,13 +56,62 @@ Open `https://agentlens.vectry.tech/dashboard` to see your traces.
- **Analytics** -- Token usage, cost tracking, duration timelines per trace
- **Self-Hostable** -- Docker Compose deployment, bring your own Postgres + Redis
+## OpenCode Plugin
+
+Trace your [OpenCode](https://opencode.ai) coding agent sessions automatically.
+
+```bash
+npm install -g opencode-agentlens
+```
+
+Add to your `opencode.json`:
+
+```json
+{
+ "plugin": ["opencode-agentlens"]
+}
+```
+
+Set environment variables:
+
+```bash
+export AGENTLENS_API_KEY="your-key"
+export AGENTLENS_ENDPOINT="https://agentlens.vectry.tech"
+```
+
+Every coding session automatically captures tool calls, LLM interactions, file edits, and permission flows.
+
+## TypeScript SDK
+
+```bash
+npm install agentlens-sdk
+```
+
+```typescript
+import { init, TraceBuilder, SpanType, SpanStatus } from "agentlens-sdk";
+
+init({ apiKey: "your-key", endpoint: "https://agentlens.vectry.tech" });
+
+const trace = new TraceBuilder("my-agent-task", {
+ tags: ["production"],
+});
+
+trace.addSpan({
+ name: "tool-call",
+ type: SpanType.TOOL_CALL,
+ status: SpanStatus.COMPLETED,
+});
+
+trace.end();
+```
+
## Architecture
```
-SDK (Python) API (Next.js) Dashboard (React)
+SDK (Python/TS) API (Next.js) Dashboard (React)
agentlens.trace() ------> POST /api/traces ------> Real-time SSE stream
- agentlens.log_decision() Prisma + Postgres Decision tree viz
- wrap_openai(client) Redis pub/sub Analytics & filters
+ TraceBuilder.end() Prisma + Postgres Decision tree viz
+ OpenCode plugin Redis pub/sub Analytics & filters
```
## Integrations
@@ -142,16 +195,20 @@ The dashboard will be available at `http://localhost:4200`.
```
agentlens/
- apps/web/ # Next.js 15 dashboard + API
- packages/database/ # Prisma schema + client
- packages/sdk-python/ # Python SDK (PyPI: vectry-agentlens)
- examples/ # Example agent scripts
- docker-compose.yml # Production deployment
+ apps/web/ # Next.js 15 dashboard + API
+ packages/database/ # Prisma schema + client
+ packages/sdk-python/ # Python SDK (PyPI: vectry-agentlens)
+ packages/sdk-ts/ # TypeScript SDK (npm: agentlens-sdk)
+ packages/opencode-plugin/ # OpenCode plugin (npm: opencode-agentlens)
+ examples/ # Example agent scripts
+ docker-compose.yml # Production deployment
```
## SDK Reference
-See the full [Python SDK documentation](packages/sdk-python/README.md).
+- [Python SDK documentation](packages/sdk-python/README.md)
+- [TypeScript SDK documentation](packages/sdk-ts/README.md)
+- [OpenCode plugin documentation](packages/opencode-plugin/README.md)
## Examples
diff --git a/apps/web/src/app/dashboard/layout.tsx b/apps/web/src/app/dashboard/layout.tsx
index dddfd98..50d4673 100644
--- a/apps/web/src/app/dashboard/layout.tsx
+++ b/apps/web/src/app/dashboard/layout.tsx
@@ -51,7 +51,11 @@ function Sidebar({ onNavigate }: { onNavigate?: () => void }) {