SDKs & Claude Code
Official LVNG client libraries for TypeScript and Python, plus the Claude Code MCP server. All three are released and cover the entire v2 API surface — chat, agents, workflows, knowledge graphs, and 47 other resources.
TypeScript SDK
npm install @lvng/sdkType-safe client for Node 18+ and the browser. Dual ESM/CJS, native fetch, retries with backoff, and SSE streaming.
Python SDK
pip install lvngSync and async clients for Python 3.11+. Built on httpx + pydantic, with retries, timeouts, and SSE streaming.
Claude Code MCP
npm install -g @lvng/mcp-serverConnect your LVNG workspace directly to Claude Code. Exposes 21 tools across 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 / 386 operations
- -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 SDKs published under the LVNG MIT license
Resource coverage
Both SDKs ship a class per OpenAPI tag, auto-discovered from the spec. The table below highlights the hand-tuned resources; the full list of 51 tags is generated and lives in resources/_generated (TS) and resources/_generated (Python).
chatclient.chat.send / streamEventsclient.chat.send / stream_chatworkflowsclient.workflows.list / execute / parseclient.workflows.list / executeagentsclient.agents.create / messageclient.agents.create / messageknowledgeclient.knowledge.search / ingestclient.knowledge.search / ingestapiKeysclient.apiKeys.create / revokeclient.api_keys.create / revoke46 other tagsclient.<resource>.<method> via _generatedclient.<resource>.<method> via _generatedClaude Code (MCP server)
The LVNG MCP server connects Claude Code to your workspace, giving Claude direct access to 21 tools across workflows, agents, and knowledge. No code required.
Setup
- 1Generate an API key from Settings → Developer.
- 2Install the MCP server.
# Install from npm
npm install -g @lvng/mcp-server
# Or run directly without a global install
npx @lvng/mcp-server- 3Add the LVNG MCP server to your Claude Code configuration.
// Add to ~/.claude/settings.json
{
"mcpServers": {
"lvng": {
"command": "lvng-mcp-server",
"env": {
"LVNG_API_KEY": "lvng_sk_live_..."
}
}
}
}- 4Start asking Claude to interact with your workspace.
> list my workflows
> create an agent called "Data Analyst" with web search tools
> search knowledge for "Q4 revenue"
> execute workflow wf_123 with topic "market research"Available tools (21)
list, get, create, update, delete, execute, get_run, list_runs, parselist, get, create, update, delete, message, start, stopsearch, ingest, list_entities, get_statsREST 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 for all 51 v2 resource groups.