SDKs & Claude Code
LVNG client libraries for TypeScript and Python, plus the Claude Code MCP server. Both clients cover the entire API reference: chat, agents, workflows, knowledge and every other resource.
Not published yet: the TypeScript client and the Claude Code MCP server are not on npm, and the Python client is not on PyPI, so npm install @lvng/sdk, npm install -g @lvng/mcp-server and pip install lvng do not work today. Until they are published, call the REST API with any HTTP client.
TypeScript SDK
Not on npm yetType-safe client for Node 18+ and the browser. Dual ESM/CJS, native fetch, retries with backoff, and SSE streaming.
Python SDK
Not on PyPI yetSync and async clients for Python 3.11+. Built on httpx + pydantic, with retries, timeouts, and SSE streaming.
Claude Code MCP
Not on npm yetConnects Claude Code to your LVNG workspace, with tools for workflows, agents and knowledge.
Choose your language
Send your first chat request from cURL, Python, or Node. The picker below is shared across every endpoint card on the docs: pick once and the rest of the site follows.
curl -X POST https://api.lvng.ai/api/v2/chat \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"message": "Hello, LVNG!",
"platform": "api"
}'What you get
TypeScript & Python parity
- -Both SDKs cover all 51 OpenAPI tags / 404 operations
- -TypeScript: hand-tuned overrides for chat, workflows, agents, knowledge, API keys
- -Identical error hierarchy (LvngError → AuthenticationError, RateLimitError, NotFoundError, ValidationError)
Real-time streaming
- -Server-Sent Events for chat.stream
- -TS: for await (const ev of client.chat.streamEvents({ ... }))
- -Python: for event in client.stream_chat(message="..."), or async via aiterate_sse
Resilient by default
- -Exponential backoff on 429 / 503, honours Retry-After
- -Per-request timeouts with AbortSignal (TS) / asyncio cancellation (Python)
- -Idempotency-Key header support for safe retries on POST
Production polish
- -TS: dual ESM/CJS, tree-shakable, .d.ts ships with the package
- -Python: typed (PEP 561), pydantic v2 models, sync + async siblings
- -Both clients carry the MIT license
Resource coverage
Both SDKs ship a class per OpenAPI tag, generated from the API reference. The table below highlights a few resources; the classes for every tag are generated and live in resources/_generated (TS) and resources/_generated (Python).
chatclient.chat.send / streamEventsclient.chat.send / client.stream_chatworkflowsclient.workflows.list / execute / parseclient.workflows.list / executeagentsclient.agents.create / messageclient.agents.create / messageknowledgeclient.knowledge.search / ingestclient.knowledge.search / documentsapiKeysclient.apiKeys.create / revokeclient.api_keys.create / delete_by_idevery other tagclient.<resource>.<method> via _generatedclient.<resource>.<method> via _generatedClaude Code (MCP server)
The LVNG MCP server connects Claude Code to your workspace, giving Claude tools for your workflows, agents and knowledge. It is not published yet. Until it is, call the REST API directly.
REST API
Both SDKs sit on top of the same JSON REST API, so you can drop down to raw HTTP whenever you need to.
curl https://api.lvng.ai/api/v2/workflows \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Next steps
TypeScript SDK guide
Streaming chat, retries, error handling, and the full resource surface.
Python SDK guide
Sync + async clients, SSE iterators, and idiomatic Python error handling.
API keys reference
Generate, manage, rotate, and revoke per-user API keys.
Full API reference
Endpoint documentation, grouped by resource.