SDKs

Official client libraries for the LVNG platform. Use our SDKs to integrate LVNG into your applications with type-safe, ergonomic APIs.

Coming soon: Our official SDKs are currently in development. In the meantime, you can use the REST API directly with any HTTP client. Check the API Reference for all endpoints.

TypeScript / JavaScript

Coming Soonnpm install @lvng/sdk
example.ts
400">import { LVNG } 400">from 400">class="text-emerald-400">'@lvng/sdk';

400">const client = 400">new LVNG({
  apiKey: process.env.LVNG_API_KEY
});

400">class="text-zinc-500">// Send a message
400">const response = 400">await client.chat.send({
  message: 400">class="text-emerald-400">'Summarize our Q4 metrics',
  channelId: 400">class="text-emerald-400">'ch_550e8400-e29b-41d4-a716-446655440000'
});

400">class="text-zinc-500">// Deploy an agent
400">const agent = 400">await client.agents.create({
  name: 400">class="text-emerald-400">'Research Assistant',
  systemPrompt: 400">class="text-emerald-400">'You are a helpful research assistant.',
  tools: [400">class="text-emerald-400">'web_search', 400">class="text-emerald-400">'document_reader']
});

400">class="text-zinc-500">// Execute a workflow
400">const run = 400">await client.workflows.execute(400">class="text-emerald-400">'wf_123', {
  inputs: { query: 400">class="text-emerald-400">'market analysis' }
});

Python

Coming Soonpip install lvng
example.py
400">from lvng 400">import LVNG

client = LVNG(api_key=os.environ[400">class="text-emerald-400">"LVNG_API_KEY"])

# Send a message
response = client.chat.send(
    message=400">class="text-emerald-400">"Summarize our Q4 metrics",
    channel_id=400">class="text-emerald-400">"ch_550e8400-e29b-41d4-a716-446655440000"
)

# Deploy an agent
agent = client.agents.create(
    name=400">class="text-emerald-400">"Research Assistant",
    system_prompt=400">class="text-emerald-400">"You are a helpful research assistant.",
    tools=[400">class="text-emerald-400">"web_search", 400">class="text-emerald-400">"document_reader"]
)

# Execute a workflow
run = client.workflows.execute(400">class="text-emerald-400">"wf_123", inputs={
    400">class="text-emerald-400">"query": 400">class="text-emerald-400">"market analysis"
})

REST API

You can always use the LVNG API directly with any HTTP client. All endpoints accept and return JSON.

cURL
400">curl -X 400">POST https:400">class="text-zinc-500">//api.lvng.ai/api/v2/chat \
  -H 400">class="text-emerald-400">"Authorization: Bearer YOUR_API_KEY" \
  -H 400">class="text-emerald-400">"Content-Type: application/json" \
  -d 400">class="text-emerald-400">'{"message": "Hello, LVNG!"}'