Skip to main content

Introduction

Shannon provides HTTP REST and gRPC APIs for submitting tasks, streaming results, and managing AI agent workflows. Base URL: http://localhost:8080 (development)

Quick Start

API Endpoints

Core Task Operations

Task Control

Real-Time Streaming

Session Management

Schedules (Recurring Tasks)

Authentication

Approvals

OpenAI-Compatible API

Shannon provides an OpenAI-compatible API for easy integration with existing OpenAI SDKs and tools. See the OpenAI-Compatible API Reference for full details.

Health & Observability

Authentication

Development Default: Authentication is disabled (GATEWAY_SKIP_AUTH=1). Enable for production.
When enabled, pass API key via header:
SSE Streaming: Browser EventSource cannot send custom headers.
  • Development: set GATEWAY_SKIP_AUTH=1 to skip auth.
  • Production: initiate SSE from your backend (or edge) and inject X-API-Key or Authorization: Bearer headers.
  • For SSE endpoints, the api_key query parameter is supported as a fallback when headers cannot be sent.

Response Format

All endpoints return JSON with consistent error format: Success (200):
Error (400/401/404/429/500):

Rate Limiting

  • Default: 60 requests/minute per API key
  • Headers: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
  • 429 Response: Includes Retry-After header

Event Streaming

Shannon emits 33 event types for real-time monitoring: Core Events:
  • WORKFLOW_STARTED, WORKFLOW_COMPLETED
  • AGENT_STARTED, AGENT_COMPLETED
  • STATUS_UPDATE, DATA_PROCESSING
  • ERROR_OCCURRED
LLM Events:
  • LLM_PROMPT, LLM_OUTPUT, LLM_PARTIAL
Tool Events:
  • TOOL_INVOKED, TOOL_OBSERVATION
See Event Types Reference for the complete list. Python SDK: use the EventType enum for filtering and checks. See SDK Streaming.

Client Access

Use the Gateway REST API or the Python SDK (HTTP-only):
  • REST endpoints: http://localhost:8080/api/v1/*
  • Python SDK: ShannonClient(base_url="http://localhost:8080")
Note: gRPC services are internal and not part of the public SDK surface. The OpenAI-compatible /v1/chat/completions endpoint is intended for compatibility. For full Shannon features (skills, session workspaces, research strategies), use /api/v1/tasks and related endpoints.

Best Practices

1. Use Session IDs for Context

2. Stream Events for Long Tasks

3. Handle Rate Limits

4. Use Idempotency Keys

SDKs

Python SDK

Official Python client with streaming support

REST Clients

Use any HTTP client library

Next Steps

Submit Tasks

Task submission API

Stream Events

Real-time event streaming

Sessions API

Session management

Authentication

API keys and JWT authentication

Task Control

Pause, resume, and cancel tasks

Python SDK

Get started with Python