SDK & API

Building on top of AI context infrastructure requires reverse-engineering internal protocols.

The LeanCTX SDK provides a typed TypeScript client for the full Context OS API. Call any tool, subscribe to events, mutate sessions, and query knowledge — all through a clean, documented interface. The same API is available as REST endpoints for any language.

समस्या

No Public Interface

You want to build a dashboard, a CI integration, or a custom agent orchestrator. But the only interface is an internal MCP protocol designed for IDE consumption, not programmatic access.

Connect to the Context OS and subscribe to workspace events with just a few lines of TypeScript.

typescript
typescript ()
- import { LeanCtx } from "@anthropic/lean-ctx-sdk";
-
- const ctx = new LeanCtx({
- baseUrl: "http://localhost:7700",
- workspace: "my-team",
- });
-
- for await (const ev of ctx.subscribe("feat/auth")) {
- console.log(ev.type, ev.data);
- }
SDK & API

4 टूल्स

01

TypeScript Client

Fully typed client library with async iterators for event streams, workspace/channel headers, and error handling.

02

Event Subscription

स्वचालित पुनःकनेक्शन, लैग पर बैकफ़िल, कंसिस्टेंसी लेवल्स, और version, parentId एवं consistencyLevel सहित टाइप्ड ContextEventV1 पेलोड के साथ वर्जनड इवेंट्स पर सब्सक्राइब करें।

03

REST API

Every tool and endpoint available as REST. JSON request/response with typed errors and rate limiting.

04

Token Authentication

Team tokens with configurable scopes. SHA-256 hashed, config-driven issuance via lean-ctx team token create.

TS TypeScript SDK
REST HTTP API
58+ Available Tools
टूल्स

0 MCP टूल्स

The LeanCTX SDK provides a typed TypeScript client for the full Context OS API. Call any tool, subscribe to events, mutate sessions, and query knowledge — all through a clean, documented interface. The same API is available as REST endpoints for any language.

SDK & API

संबंधित दस्तावेज़ीकरण

सत्यापन

हर आउटपुट प्रमाण के साथ आता है

LeanCTX हर सत्र के लिए प्रमाण आर्टिफैक्ट उत्पन्न करता है: कौन सी फ़ाइलें पढ़ी गईं, क्या संपीड़ित किया गया, कौन सी जाँचें पास हुईं और टोकन कैसे खर्च हुए। यह AI कार्य को ऑडिट योग्य, रीप्ले योग्य और विश्वसनीय बनाता है।

Explore SDK & API

The LeanCTX SDK provides a typed TypeScript client for the full Context OS API. Call any tool, subscribe to events, mutate sessions, and query knowledge — all through a clean, documented interface. The same API is available as REST endpoints for any language.