Quick Start
This guide will walk you through integrating Octavus into your application in under 10 minutes.
Prerequisites
- Node.js 18+
- An Octavus account with API key
- A Next.js application (or any Node.js backend)
Test Your Agent First
Before integrating with SDKs, use Agent Preview to test your agent directly in the platform:
- Open your agent in the platform at
octavus.ai/agents/[agentId] - Click the Preview tab
- Configure session inputs and tool mock responses
- Start a conversation to test agent behavior
Agent Preview supports all trigger types, file attachments, tool mocking, and real-time streaming. This is the fastest way to iterate on your agent logic before writing any integration code.
Installation
Install the Octavus SDKs in your project:
Backend Setup
1. Initialize the Client
Create an Octavus client instance in your backend:
2. Create a Session Endpoint
Create an API endpoint that creates sessions and returns the session ID:
Getting Your Agent ID
There are two ways to create and manage agents:
Option 1: Platform UI (Recommended for getting started)
- Go to octavus.ai and create an agent in the web editor
- Copy the agent ID from the URL (e.g.,
octavus.ai/agents/clxyz123abc456) - Add it to your
.env.local:OCTAVUS_SUPPORT_AGENT_ID=clxyz123abc456
Option 2: Local Development with CLI
For version-controlled agent definitions, use the Octavus CLI:
The CLI approach is better for teams and CI/CD pipelines where you want agent definitions in your repository.
3. Create a Trigger Endpoint
Create an endpoint that handles triggers and streams responses:
Frontend Setup
1. Create a Chat Component
Use the useOctavusChat hook with the HTTP transport:
2. Create Session and Render Chat
Environment Variables
Add these to your .env.local:
What's Next?
Now that you have a basic integration working:
- Learn about the protocol to define custom agent behavior
- Explore the Server SDK for advanced backend features
- Build rich UIs with the Client SDK
- Handle tools on the client for interactive UIs and browser APIs