Canonical proto3 schemas for Chaukas — immutable AI-agent audit events, traces/spans, tool calls, and governance decisions (OTEL-friendly).
Chaukas is the Governance, Compliance, Safety, Trust and Explainability layer for AI agents and applications. This repository defines the source-of-truth Protobuf messages used to capture every event and decision into an append-only, WORM-retained audit trail with deep queryability and OpenTelemetry compatibility. This repository contains:
- Protocol Buffer definitions for event schema and gRPC services
- Generated Python client libraries for SDK integration
- Generated Go server libraries for platform implementation
proto/chaukas/spec/
├── common/v1/ # Shared data models (Event, QueryRequest, etc.)
├── client/v1/ # Client-side gRPC service definitions
└── server/v1/ # Server-side gRPC service definitions
python-client/ # Client SDK package (chaukas-spec-client)
python-server/ # Server implementation package (chaukas-spec-server)
chaukas/spec/ # Generated Go packages and module
├── common/v1/ # Data models
├── client/v1/ # Client gRPC stubs
└── server/v1/ # Server gRPC stubs + server-specific models
.generated/python/ # Temporary generated Python code (build artifact)
pip install chaukas-spec-clientpip install chaukas-spec-servergo get github.com/chaukasai/chaukas-specfrom chaukas.spec.client.v1.client_pb2_grpc import ChaukasClientServiceStub
from chaukas.spec.client.v1.client_pb2 import IngestEventRequest
from chaukas.spec.common.v1.events_pb2 import Event, EventType
# Create gRPC client
stub = ChaukasClientServiceStub(channel)
# Create and send event
event = Event(
event_id="evt_123",
type=EventType.EVENT_TYPE_AGENT_START,
session_id="session_abc"
)
request = IngestEventRequest(event=event)
stub.IngestEvent(request)from chaukas.spec.server.v1.server_pb2_grpc import ChaukasServerServiceServicer
from chaukas.spec.server.v1.server_pb2 import IngestEventResponse
class MyChaukasServer(ChaukasServerServiceServicer):
def IngestEvent(self, request, context):
# request is IngestEventRequest with .event field
return IngestEventResponse(
event_id=request.event.event_id,
status="accepted"
)import (
serverv1 "github.com/chaukasai/chaukas-spec/chaukas/spec/server/v1"
)
type MyChaukasServer struct {
serverv1.UnimplementedChaukasServerServiceServer
}
func (s *MyChaukasServer) IngestEvent(ctx context.Context, req *serverv1.IngestEventRequest) (*serverv1.IngestEventResponse, error) {
return &serverv1.IngestEventResponse{
EventId: req.Event.EventId,
Status: "accepted",
}, nil
}make gen-all # Generate both Python and Go code
make gen-python # Generate Python code only (for packages)
make gen-go # Generate Go code onlymake build-packages # Build both client and server Python packages
make build-client # Build client package only
make build-server # Build server package onlymake test-packages # Test both packages can be installed and importedmake clean-all # Clean all generated code
make clean-python # Clean Python code only
make clean-go # Clean Go code only
make clean-packages # Clean built packagesmake lint # Lint proto files with buf
make format # Format proto files with buf
make breaking # Check for breaking changes against mainThe repository includes a comprehensive CI/CD pipeline that:
- 🔍 Lints & Validates: Runs
buf lintand format checking - 🚨 Breaking Changes: Detects API breaking changes on PRs
- 🔨 Build & Test: Generates code and tests compilation across multiple Python/Go versions
- 📦 Package Building: Creates separate client and server Python packages
- 🚀 Automated Releases: Publishes to PyPI and Go modules on version tags
Automated via PyPI Trusted Publishing:
- Update version in package files:
python-client/pyproject.tomlpython-server/pyproject.tomlresources/client-init.pyresources/server-init.pyopenapi/chaukas/spec/v1/public.yaml
- Create and push a version tag:
git tag v1.0.3 && git push origin v1.0.3 - GitHub Actions automatically builds and publishes packages using PyPI Trusted Publishing
Requirements:
- GitHub environments
pypi-clientandpypi-serverconfigured - PyPI Trusted Publishing enabled for both packages
The specification supports comprehensive agent observability through:
- Comprehensive Event Types:
- Session lifecycle: SESSION_START, SESSION_END
- Agent operations: AGENT_START, AGENT_END, AGENT_HANDOFF
- Model invocations: MODEL_INVOCATION_START, MODEL_INVOCATION_END
- Tool interactions: TOOL_CALL_START, TOOL_CALL_END
- Protocol calls: MCP_CALL_START, MCP_CALL_END
- I/O events: INPUT_RECEIVED, OUTPUT_EMITTED
- Error handling: ERROR, RETRY
- Distributed Tracing: Full trace correlation with trace_id field across all events
- Agent Handoff Tracking: Complete agent-to-agent transition monitoring with context
- MCP Integration: Native Model Context Protocol call tracking and observability
- Enhanced Tool Tracking: Granular function-level tracking within tools
- Span-based Architecture: Parent-child relationships for complex agent workflows
- Rich Metadata: Performance metrics, cost tracking, infrastructure data
- Audit Features: WORM compliance, content hashing, integrity proofs
- Privacy: PII categorization, redaction capabilities
- Multi-tenancy: Tenant and project scoping
This is part of the open-core Chaukas agent audit and explainability platform.