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.

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
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).

ResourceTypeScriptPython
chatclient.chat.send / streamEventsclient.chat.send / client.stream_chat
workflowsclient.workflows.list / execute / parseclient.workflows.list / execute
agentsclient.agents.create / messageclient.agents.create / message
knowledgeclient.knowledge.search / ingestclient.knowledge.search / documents
apiKeysclient.apiKeys.create / revokeclient.api_keys.create / delete_by_id
every other tagclient.<resource>.<method> via _generatedclient.<resource>.<method> via _generated

Claude 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
curl https://api.lvng.ai/api/v2/workflows \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Next steps