Skip to main content

Protocol buffers and gRPC service definitions for building Chaukas-compatible observability backends

Project description

Chaukas Spec Server

Protocol buffers and gRPC service definitions for building Chaukas-compatible observability backends

PyPI version Python 3.9+ License

What is this?

chaukas-spec-server provides the server-side Protocol Buffer definitions and gRPC service interfaces for the Chaukas agent observability platform. Use this package to:

  • Build observability backends that comply with the Chaukas specification
  • Implement gRPC services for ingesting agent telemetry
  • Process and store 19+ standardized event types
  • Provide analytics on agent performance and behavior
  • Enable compliance with audit trail requirements

Who should use this?

  • Platform engineers building observability and monitoring platforms
  • Backend developers implementing telemetry collection services
  • DevOps teams deploying agent monitoring infrastructure
  • Security teams building compliance and audit systems

Note: If you're instrumenting an agent or SDK to send events, use chaukas-spec-client instead.

Installation

pip install chaukas-spec-server

Quick Start

from concurrent import futures
import grpc
from chaukas.spec.server.v1.server_pb2_grpc import (
    ChaukasServerServiceServicer,
    add_ChaukasServerServiceServicer_to_server
)
from chaukas.spec.server.v1.server_pb2 import IngestEventResponse

class MyChaukasServer(ChaukasServerServiceServicer):
    def IngestEvent(self, request, context):
        # Process the event
        event = request.event
        print(f"Received event: {event.event_id} of type {event.type}")

        # Store in your database, send to analytics, etc.
        # ...

        # Return response with processing details
        return IngestEventResponse(
            event_id=event.event_id,
            status="accepted",
            processed_at=int(time.time() * 1000)
        )

# Start gRPC server
server = grpc.server(futures.ThreadPoolExecutor(max_workers=10))
add_ChaukasServerServiceServicer_to_server(MyChaukasServer(), server)
server.add_insecure_port('[::]:50051')
server.start()
server.wait_for_termination()

Server-Specific Features

The server package includes additional capabilities beyond the client package:

Enhanced Response Types

  • IngestEventResponse - Detailed ingestion status with timestamps
  • IngestEventBatchResponse - Batch processing results with accept/reject counts
  • GetEventStatsResponse - Analytics and statistics on event data

Additional RPC Methods

  • GetEventStats - Retrieve aggregated statistics by tenant, project, or time range

Event Analytics

def GetEventStats(self, request, context):
    # Return aggregated metrics
    return GetEventStatsResponse(
        total_events=1000,
        total_sessions=50,
        events_by_type={
            "EVENT_TYPE_AGENT_START": 50,
            "EVENT_TYPE_MODEL_INVOCATION_START": 300,
        },
        avg_session_duration_ms=45000.0
    )

Event Types

Handle comprehensive event types for complete agent observability:

Category Event Types
Session SESSION_START, SESSION_END
Agent AGENT_START, AGENT_END, AGENT_HANDOFF
Model MODEL_INVOCATION_START, MODEL_INVOCATION_END
Tools TOOL_CALL_START, TOOL_CALL_END, MCP_CALL_START, MCP_CALL_END
I/O INPUT_RECEIVED, OUTPUT_EMITTED
Errors ERROR, RETRY
Extensions POLICY_DECISION, DATA_ACCESS, STATE_UPDATE, SYSTEM

Package Contents

chaukas/spec/
├── server/v1/       # Server gRPC service interfaces
│   ├── server_pb2.py
│   └── server_pb2_grpc.py
└── common/v1/       # Shared event definitions
    ├── events_pb2.py
    └── query_pb2.py

Architecture Considerations

When building your observability backend:

  • Storage: Design for high-volume event ingestion (consider time-series databases)
  • Multi-tenancy: Use tenant_id and project_id fields for isolation
  • Analytics: Pre-aggregate statistics for common queries
  • Compliance: Implement WORM (Write-Once-Read-Many) for audit trails
  • Privacy: Respect PII categorization and redaction fields
  • Performance: Use batch ingestion for high-throughput scenarios

Documentation

Related Packages

Contributing

We welcome contributions! Please see our Contributing Guide and Code of Conduct.

License

Apache 2.0 - See LICENSE for details.

Support

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chaukas_spec_server-1.0.5.tar.gz (27.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chaukas_spec_server-1.0.5-py3-none-any.whl (28.8 kB view details)

Uploaded Python 3

File details

Details for the file chaukas_spec_server-1.0.5.tar.gz.

File metadata

  • Download URL: chaukas_spec_server-1.0.5.tar.gz
  • Upload date:
  • Size: 27.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for chaukas_spec_server-1.0.5.tar.gz
Algorithm Hash digest
SHA256 5a5de124f052e14163f81b0d10a6c98a78ba863a202e199311fe20ef4e7e0d85
MD5 6b2289c9d43e85d22efc5b97a03ad734
BLAKE2b-256 0f39a9e34a919ed795a3037957914805c4a66dc9435c583a424e02d2ffb5f5b3

See more details on using hashes here.

Provenance

The following attestation bundles were made for chaukas_spec_server-1.0.5.tar.gz:

Publisher: release.yml on chaukasai/chaukas-spec

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file chaukas_spec_server-1.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for chaukas_spec_server-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 70738b095cda8e94e74151f89257ee70af58bbcfdf0805865733c1000435561e
MD5 e38c9522cfc70871ea3dbf36f4f37e63
BLAKE2b-256 449e1d74a5a7a20d25dc7996e959934d20d7e3218d3ce693c5dd2f49cd751ee0

See more details on using hashes here.

Provenance

The following attestation bundles were made for chaukas_spec_server-1.0.5-py3-none-any.whl:

Publisher: release.yml on chaukasai/chaukas-spec

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page