Features
High-Level API
Clean, intuitive interface for agents, playbooks, and conversations
Streaming Support
Real-time SSE streaming for agent responses with typewriter effect
TypeScript First
Full type definitions for all API responses and methods
Auto-Generated Types
OpenAPI-generated types ensure API compatibility
Installation
Quick Example
SDK Structure
The SDK is organized into namespaces that mirror the NimbleBrain Studio concepts:| Namespace | Purpose |
|---|---|
nb.agents | List and interact with agents |
nb.conversations | Create and manage conversations |
nb.messages | Send messages and stream responses |
nb.playbooks | List and execute playbooks |
nb.executions | Track playbook execution status |
When to Use the SDK
Building Custom Chat Interfaces
Building Custom Chat Interfaces
Create your own chat UI that connects to NimbleBrain agents. The streaming API provides real-time responses for a smooth user experience.
Backend Automation
Backend Automation
Run playbooks programmatically from your backend services. Integrate NimbleBrain automations into your existing workflows.
CI/CD Pipelines
CI/CD Pipelines
Trigger playbooks as part of your deployment process. For example, run a playbook that notifies your team after each deployment.
Custom Applications
Custom Applications
Build internal tools that leverage NimbleBrain’s AI capabilities without using the Studio UI.
Requirements
- Node.js 18.0 or later (for native fetch support)
- API Key from NimbleBrain Studio
Getting Your API Key
- Log in to NimbleBrain Studio
- Navigate to Settings > API Keys
- Click Create API Key
- Copy the key (it starts with
nb_live_ornb_test_)
Next Steps
Quickstart
Get up and running in 5 minutes
Agents API
Work with agents and conversations
Playbooks API
Execute playbooks programmatically
Streaming
Real-time message streaming