Reference
API Reference
REST API endpoints for programmatic access to your Lobstack agent. Send messages, manage sessions, configure skills, and more.
📝
Authentication
All API requests are authenticated via secure session cookies. The dashboard handles this automatically. For programmatic access, authenticate via the Supabase Auth API first.
Agent Status#
Get the current status of your agent, including server details, usage metrics, and optional related data.
GET /api/agent/status
curl -b "sb-access-token=YOUR_TOKEN" \
"https://lobstack.ai/api/agent/status?include=messages,skills,logs,health"Response Fields#
| Field | Type | Description |
|---|---|---|
| agent.id | string | Unique agent instance ID |
| agent.status | string | running, provisioning, or error |
| agent.server_ip | string | VM IP address |
| agent.server_tier | string | starter, standard, performance, enterprise |
| agent.server_region | string | us-east, us-west, eu-central, eu-north, ap-south |
| agent.ai_model | string | Current AI model identifier |
| agent.messages_used | number | Messages used this billing period |
| agent.messages_limit | number | Monthly message limit for current plan |
| agent.plan_tier | string | Subscription plan tier |
| messages | array | Recent messages (when include=messages) |
| skills | array | Enabled skills (when include=skills) |
Chat#
Send a message to your agent and receive a response. The agent may execute tools during processing.
POST /api/agent/chat
curl -X POST -H "Content-Type: application/json" \
-b "sb-access-token=YOUR_TOKEN" \
-d '{"message": "What is running on this server?", "session_id": "abc123"}' \
"https://lobstack.ai/api/agent/chat"| Parameter | Type | Required | Description |
|---|---|---|---|
| message | string | Yes | The user message to send |
| session_id | string | No | Session ID for conversation isolation |
| images | array | No | Base64 image data for multimodal analysis |
Sessions#
List Sessions#
GET /api/agent/sessions
curl -b "sb-access-token=YOUR_TOKEN" \
"https://lobstack.ai/api/agent/sessions"Create Session#
POST /api/agent/sessions
curl -X POST -H "Content-Type: application/json" \
-b "sb-access-token=YOUR_TOKEN" \
-d '{"title": "Debug Session", "category": "task"}' \
"https://lobstack.ai/api/agent/sessions"Update Session#
Update session metadata — title, category, status, icon, or pinned state. At least one field is required.
PATCH /api/agent/sessions
curl -X PATCH -H "Content-Type: application/json" \
-b "sb-access-token=YOUR_TOKEN" \
-d '{"sessionId": "abc123", "category": "research", "pinned": true}' \
"https://lobstack.ai/api/agent/sessions"| Parameter | Type | Description |
|---|---|---|
| sessionId | string | Session ID to update (required) |
| title | string | New session title (max 100 chars) |
| category | string | general, task, research, support, automation, creative, or debug |
| status | string | active, completed, paused, or archived |
| icon | string | Custom icon for the session |
| pinned | boolean | Pin session for quick access |
Delete Session#
DELETE /api/agent/sessions
curl -X DELETE -H "Content-Type: application/json" \
-b "sb-access-token=YOUR_TOKEN" \
-d '{"sessionId": "abc123"}' \
"https://lobstack.ai/api/agent/sessions"Skills#
Get Enabled Skills#
GET /api/agent/skills
curl -b "sb-access-token=YOUR_TOKEN" \
"https://lobstack.ai/api/agent/skills"Enable/Disable Skill#
POST /api/agent/skills
curl -X POST -H "Content-Type: application/json" \
-b "sb-access-token=YOUR_TOKEN" \
-d '{"skill": "discord", "enabled": true}' \
"https://lobstack.ai/api/agent/skills"Configure Skill Credentials#
PUT /api/agent/skills
curl -X PUT -H "Content-Type: application/json" \
-b "sb-access-token=YOUR_TOKEN" \
-d '{"skill": "discord", "config": {"discord_token": "MTk...", "discord_app_id": "123..."}}' \
"https://lobstack.ai/api/agent/skills"Memory#
GET /api/agent/memory
curl -b "sb-access-token=YOUR_TOKEN" \
"https://lobstack.ai/api/agent/memory"POST /api/agent/memory (Create)
curl -X POST -H "Content-Type: application/json" \
-b "sb-access-token=YOUR_TOKEN" \
-d '{"key": "timezone", "value": "America/New_York", "category": "user_pref"}' \
"https://lobstack.ai/api/agent/memory"Token Budget#
Get token budget status or request a model routing recommendation based on message complexity.
GET /api/agent/token-budget
curl -b "sb-access-token=YOUR_TOKEN" \
"https://lobstack.ai/api/agent/token-budget"POST /api/agent/token-budget
curl -X POST -H "Content-Type: application/json" \
-b "sb-access-token=YOUR_TOKEN" \
-d '{"message": "What time is it?"}' \
"https://lobstack.ai/api/agent/token-budget"Chat Automation#
Create workflows from natural language commands. Used by slash commands like /automate, /schedule, /trigger, and /remind.
POST /api/agent/chat-automate
curl -X POST -H "Content-Type: application/json" \
-b "sb-access-token=YOUR_TOKEN" \
-d '{"command": "schedule", "text": "every day at 9am check inventory"}' \
"https://lobstack.ai/api/agent/chat-automate"| Parameter | Type | Description |
|---|---|---|
| command | string | automate, schedule, trigger, remind, or status |
| text | string | Natural language description of the automation |
Update Agent Settings#
Change AI model, messenger, server tier, or region. Triggers a full VM rebuild.
POST /api/agent/update
curl -X POST -H "Content-Type: application/json" \
-b "sb-access-token=YOUR_TOKEN" \
-d '{"aiModel": "claude-opus-4-6"}' \
"https://lobstack.ai/api/agent/update"| Parameter | Type | Description |
|---|---|---|
| aiModel | string | AI model to switch to |
| messengerType | string | Messenger channel (web, telegram, discord, slack, whatsapp) |
| serverTier | string | Server tier (starter, standard, performance, enterprise) |
| serverRegion | string | Server region (us-east, us-west, eu-central, eu-north, ap-south) |
| aiApiKey | string | Your own AI provider API key (optional) |