API Reference
Stagent exposes a local REST API with 157 endpoints across 24 domains. All endpoints accept and return JSON. Authentication is handled by provider API keys configured in Settings.
Base URL
http://localhost:3000 Stagent runs locally. All API calls are made to your local instance.
Core
Tasks
13 endpointsCreate, execute, cancel, and monitor task lifecycle with fire-and-forget execution and SSE log streaming.
Projects
7 endpointsManage project workspaces with working directories, document bindings, and cascading resource cleanup.
Workflows
11 endpointsOrchestrate multi-step execution patterns — sequence, parallel, loop, swarm, planner-executor, and checkpoint.
Blueprints
5 endpointsStore and instantiate reusable workflow templates with import and lineage tracking.
Schedules
5 endpointsClock-driven cron and heartbeat schedules with natural language parsing and delivery channels.
Intelligence
Chat
9 endpointsMulti-provider conversations with SSE streaming, tool permissions, model selection, and entity search.
Profiles
10 endpointsAgent profiles with multi-runtime support, testing, learned context, and AI-assisted creation.
Runtimes
2 endpointsQuery available agent runtimes and their capabilities across five providers.
Memory
2 endpointsEpisodic agent memory with decay scoring and confidence tracking.
Content
Documents
7 endpointsUpload, preprocess, version, and download files with automatic text extraction.
Tables
26 endpointsStructured data grids with columns, rows, charts, triggers, import/export, and templates.
Uploads
4 endpointsFile upload management with storage cleanup and metadata retrieval.
Views
4 endpointsSaved view configurations with filters, sorting, and column visibility.
Platform
Settings
14 endpointsProvider configuration, runtime routing, budgets, permissions, browser tools, and pricing.
Permissions
5 endpointsPermission patterns and presets for tool access control and agent governance.
Notifications
6 endpointsApproval requests, alerts, and SSE streaming for pending permission decisions.
Channels
6 endpointsMulti-channel delivery via Slack, Telegram, and webhooks with bidirectional messaging.
Environment
8 endpointsScan, audit, and manage CLI environments with health scoring and artifact discovery.
Snapshots
4 endpointsDatabase backup and restore with point-in-time snapshot management.
Workspace
3 endpointsDiscover, import, and analyze project workspace context for agent onboarding.
Operations
Logs
1 endpointsReal-time agent log streaming via Server-Sent Events with keepalive and backoff.
Handoffs
2 endpointsAgent handoff records for transferring execution context between runtimes.
Data
2 endpointsDatabase maintenance — clear all data or seed with sample records.
Context
1 endpointsBatch approve or reject learned context proposals from agent interactions.
Common Patterns
- Validation — Request bodies validated with Zod. Errors return
400witherror.flatten()format. - IDs — All resources use UUID v4 identifiers, auto-generated on creation.
- Fire-and-forget — Execution endpoints return
202 Acceptedwhile work runs asynchronously. - SSE — Streaming endpoints use
text/event-streamwith keepalive heartbeats. - Timestamps — All dates are ISO 8601 strings in responses.