gRPC Intelligence Service
Protocol Buffers schema and gRPC endpoint reference for internal service communication.
gRPC Intelligence Service
Internal communication between the Rust API gateway and the Python AI intelligence service is conducted over gRPC using Protocol Buffers v3. The service executes on port 50051.
The schema is defined in intelligence.proto.
IntelligenceService Definition
service IntelligenceService {
// Analyzes the raw user prompt to classify goals, constraints, diet, and budget parameters.
rpc ProcessIntent(IntentRequest) returns (IntentResponse);
// Executes the cognitive reasoning graph (LangGraph) and returns a real-time stream
// of agent execution steps, safety audits, and UI visualization packages.
rpc OrchestrateAgentGraph(OrchestrateGraphRequest) returns (stream OrchestrateGraphResponse);
// Triggers the learning loop reflection engine to extract rules, preferences, and feedback metrics.
rpc TriggerReflection(ReflectionRequest) returns (ReflectionResponse);
}RPC Methods
ProcessIntent
Extracts high-level nutritional goals, constraints, dietary type, and budget limits from the raw natural language user prompt.
- Request Type:
IntentRequest - Response Type:
IntentResponse
OrchestrateAgentGraph
Runs the multi-agent reasoning chain (Planner, Safety, Nutrition, Budget, etc.) via LangGraph. Yields a server-side stream of state updates, intermediate tool traces, progressive text tokens, and layout blueprints.
- Request Type:
OrchestrateGraphRequest - Response Type:
stream OrchestrateGraphResponse
TriggerReflection
An asynchronous feedback-triggered learning node. Evaluates user ratings/text feedback to extract semantic rules and habits which are committed to vector database memory.
- Request Type:
ReflectionRequest - Response Type:
ReflectionResponse
Message Schemas
1. Intent Analysis
IntentRequest
Prop
Type
IntentResponse
Prop
Type
2. Agent Orchestration
OrchestrateGraphRequest
Prop
Type
UserContext
Prop
Type
ChatMessageHistory
Prop
Type
OrchestrateGraphResponse
Prop
Type
AgentStepUpdate
Prop
Type
UIElement
Prop
Type
TextDelta
Prop
Type
3. Agent Feedback & Reflection
ReflectionRequest
Prop
Type
ReflectionResponse
Prop
Type