gRPC API Reference
The Soul Kernel exposes its core functionality through a gRPC API, enabling language-agnostic communication between the Rust kernel and various shells (iOS, Unity, Physical AI).Overview
The gRPC API provides three core operations:- Init: Initialize a new Soul session
- Ask: Process queries with streaming responses
- Remember: Store memories in the Soul’s memory graph
Service Definition
Endpoints
Init - Create a Soul Session
Initialize a new Soul with a name and optional metadata. Request:Ask - Query the Soul
Send queries to the Soul and receive streaming responses. Supports progressive text generation, thinking status, and skill execution feedback. Request:-
Text Chunks: Progressive text generation
-
Thinking Status: Processing feedback
-
Skill Execution: Skill activity feedback
Remember - Store Memories
Store new memories in the Soul’s memory graph. Request:Common Types
ResponseMetadata
All responses include metadata for observability:Client Examples
Rust Client
Python Client
JavaScript/TypeScript Client
Error Handling
The gRPC API uses standard gRPC status codes:Performance
- Latency: p95 < 1s (online), < 6s (offline)
- Streaming: First chunk typically arrives within 100-200ms
- Throughput: Supports 1000+ concurrent connections
- Binary Size: Server binary < 20MB
Security
- Session tokens expire after 24 hours
- All responses include correlation IDs for tracing
- TLS encryption recommended for production
- Rate limiting per soul_id