Skip to main content
Onyx Octopus

Eventuali API Server

A FastAPI-based REST and Server-Sent Events (SSE) API server for the Eventuali event sourcing system.

Features

  • Event Management: Emit and query events across agent, workflow, and system aggregates
  • Real-time Streaming: Server-Sent Events (SSE) for live event monitoring
  • RESTful API: Complete REST API with OpenAPI documentation
  • Health Monitoring: Built-in health checks for API and database
  • CORS Support: Configurable cross-origin resource sharing
  • CLI Interface: Simple command-line interface for server management

Installation

pip install eventuali-api-server

Quick Start

Start the server with defaults:

eventuali-api-server

The server will start on http://127.0.0.1:8765 with Swagger UI available at /docs.

Start with custom configuration:

eventuali-api-server --host 0.0.0.0 --port 9000 --reload

Environment Variables

All CLI options can also be set via environment variables:

export HOST=0.0.0.0
export PORT=9000
export RELOAD=true
export LOG_LEVEL=debug
export DATA_DIR=/path/to/events
export CORS_ORIGINS="http://localhost:3000,https://app.example.com"
eventuali-api-server

API Endpoints

Events

  • POST /events/emit/agent - Emit agent lifecycle events
  • POST /events/emit/workflow - Emit workflow lifecycle events
  • POST /events/emit/system - Emit system lifecycle events
  • GET /events/ - Query events with pagination and filters
  • GET /events/agents/{agent_id} - Get events for specific agent
  • GET /events/workflows/{workflow_id} - Get events for specific workflow
  • GET /events/workflows/{workflow_id}/agents - Get agents in workflow
  • GET /events/stream - Real-time event stream via SSE

Health

  • GET /health/ - Overall health check
  • GET /health/database - Database connection health

Documentation

  • GET /docs - Swagger UI documentation
  • GET /openapi.json - OpenAPI schema

Event Types

Agent Events

{
  "name": "agent.started",
  "attributes": {
    "agent_name": "url-cacher",
    "message": "Agent started successfully"
  },
  "aggregate_id": "url-cacher-abc123",
  "correlation_id": "workflow-def456",
  "causation_id": "parent-agent-789"
}

Workflow Events

{
  "name": "workflow.started", 
  "attributes": {
    "user_prompt": "Cache the documentation page"
  },
  "aggregate_id": "workflow-def456"
}

System Events

{
  "name": "session.started",
  "attributes": {
    "session_type": "interactive"
  },
  "aggregate_id": "session-ghi789"
}

Configuration

The server can be configured via CLI options, environment variables, or programmatically:

from eventuali_api_server import APIServerConfig, set_config

config = APIServerConfig(
    host="0.0.0.0",
    port=8765,
    data_dir="/custom/events/path",
    cors_origins=["https://myapp.com"],
    log_level="debug"
)

set_config(config)

Development

Install for development:

git clone <repository>
cd eventuali-api-server
pip install -e ".[dev]"

Run tests:

pytest

Code quality:

black src/ tests/
flake8 src/ tests/
mypy src/

Integration

The API server integrates with:

  • Eventuali Event Store: SQLite-based event storage
  • eventuali-mcp-server: MCP server for Claude Code integration
  • @eventuali/dashboard: React-based UI dashboard

License

MIT License - see LICENSE file for details.

Metadata

Release files for eventuali-api-server 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for eventuali-api-server 0.2.2
File Size Uploaded Provenance
eventuali_api_server-0.2.2.tar.gz 12.7 kB With provenance Details

Release files / eventuali_api_server-0.2.2.tar.gz

Download URL eventuali_api_server-0.2.2.tar.gz
Size 12.7 kB
Tags Source
SHA-256 checksum
How to use checksums
8aba397b1899c7c8ac47db79d0b736bd9554038ea2ee02ca9c0fa5b601bf2a84
BLAKE2b-256 checksum
How to use checksums
81819fb277ebe8b59d417cf96839e050289d75ec4af5e1ad533215dcc0cffe07
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 25, 2025.

Transparency log

Security for eventuali-api-server 0.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 1 file in this release has been uploaded with provenance metadata.

Attestation for eventuali_api_server-0.2.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 25, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.2 This release

1 release file Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page