Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

1.2 KB
Raw Blame

@lobehub/sdk examples

Runnable with Bun from packages/sdk (the @lobehub/sdk import resolves to src/ through tsconfig.json):

export LOBEHUB_API_KEY=sk-lh-...
# export LOBEHUB_BASE_URL=http://localhost:3010   # another deployment

bun examples/quickstart.ts
File Shows
quickstart.ts users.me, agents.list
workspace.ts workspaceId → X-Workspace-Id (LOBEHUB_WORKSPACE_ID)
errors.ts LobeHubAPIError returned vs thrown (throwOnError)
retries.ts timeout, maxRetries, idempotencyKey
pagination.ts paginate over every topic
streaming.ts responses.stream (LOBEHUB_AGENT_ID)
upload.ts files.upload from a path, bytes and a Blob

retries.ts and upload.ts create and then delete an agent / files in the account.