Tools and integrations
SDKs
Install the TypeScript or Python client, get a scoped API token and make the first call against the Lynxby API.
Lynxby publishes two thin API clients: @lynxby/sdk for TypeScript and lynxby for Python. Both cover assistants, tasks and runs, both stream the answer as it is written, and neither has a runtime dependency.
The source, examples and full client reference live at github.com/LynxbyAI/lynxby-sdk.
Get a token
- Sign in to your organisation. An administrator creates accounts; there is no anonymous sandbox token.
- Open Settings → API tokens.
- Create a token, choose an expiry and tick the scopes you need.
- Copy the value. It is shown once; afterwards only the first eight characters are visible.
A token belongs to one person and one organisation, and that person's group permissions still apply. A token with task.execute only runs a task its owner may run.
The usual scope set for an integration is assistant.read, assistant.execute, task.read, task.execute, run.read and run.execute. Add knowledge.read if the same token also connects an MCP harness.
Set the token and the base URL in the server environment, never in browser code:
export LYNXBY_TOKEN=lynx_…
export LYNXBY_BASE_URL=https://lynxby.com
Install
TypeScript, Node 22.18 or newer:
git clone https://github.com/LynxbyAI/lynxby-sdk.git
npm install ./lynxby-sdk/packages/sdk-typescript
Python, 3.11 or newer:
pip install "git+https://github.com/LynxbyAI/lynxby-sdk.git#subdirectory=packages/sdk-python"
Neither package is on npm or PyPI yet. Install from the repository, or copy src/ or lynxby/ into your project; there is no build step.
First call
import { Lynxby } from '@lynxby/sdk'
const lynx = new Lynxby() // LYNXBY_TOKEN and LYNXBY_BASE_URL
const tasks = await lynx.tasks.list({ perPage: 10 })
const run = await lynx.tasks.run(tasks.data[0].id, { text: 'A long letter.' })
console.log(run.answer)
from lynxby import Lynxby
lynx = Lynxby() # LYNXBY_TOKEN and LYNXBY_BASE_URL
tasks = lynx.tasks.list(per_page=10)
run = lynx.tasks.run(tasks["data"][0]["id"], {"text": "A long letter."})
print(run["answer"])
An assistant works the same way: lynx.agents.run(12, 'Summarise the contract.'). Pass the session id from the first answer to continue the conversation.
Streaming
Both clients hand you the server-sent events in order and close the request when you stop reading.
for await (const event of lynx.agents.stream(12, 'Summarise the contract.')) {
if (event.event === 'delta') process.stdout.write(event.data.delta)
if (event.event === 'error') console.error(event.data.code, event.data.message)
}
stream = lynx.agents.stream(12, "Summarise the contract.")
try:
for event in stream:
if event["event"] == "delta":
print(event["data"]["delta"], end="", flush=True)
finally:
stream.close()
Events are start, thinking, tool, delta, done and error. The done payload is the ordinary assistant-message or run response.
Retries and errors
A 429 and every 5xx are retried twice with backoff and jitter. A Retry-After header wins over the backoff, and the idempotency key is reused, so a retried POST cannot become a second message or run.
Every failed call raises a typed error with status, code, message, requestId and, on validation, errors: AuthenticationError for 401, PermissionError for 403, NotFoundError for 404, ValidationError for 422, RateLimitError for 429 and ServerError for 5xx.
Every creating POST carries an Idempotency-Key. Pass your own when the key must survive a process restart.
Lists take a cursor and a page size and answer data, next_cursor and has_more. Send the cursor back unchanged; null marks the end.
MCP instead
You do not need a client to connect an agent harness. The same organisation exposes an MCP endpoint at https://lynxby.com/mcp. Read MCP setup for the token scopes and the configuration for Claude Code, Copilot, OpenCode and Codex.
Reference
Want to see this on your own documents?
Contact us