ConnectRPC Services
Candela components use ConnectRPC (over HTTP/2 or HTTP/1.1 via the Connect protocol) for high-performance dashboard population, user governance, post-hoc annotations, and local runtime orchestration.
Port mappings for ConnectRPC services:
candela-server/candelaCLI: Listen on:8181by default.
1. DashboardService
Section titled “1. DashboardService”Provides aggregated metrics and usage data for visualization, chart rendering, and status displays.
GetDashboardData
Section titled “GetDashboardData”Consolidates usage summaries, model breakdowns, and user budget status in a single round-trip.
- Request:
GetDashboardDataRequestmessage GetDashboardDataRequest {string project_id = 1;candela.types.TimeRange time_range = 2;string environment = 3;bool include_budget = 4; // Set true to request user budget context} - Response:
GetDashboardDataResponsemessage GetDashboardDataResponse {GetUsageSummaryResponse summary = 1;repeated ModelUsage models = 2;BudgetContext budget_context = 3; // Populated only if include_budget=true + auth}
GetLatencyPercentiles
Section titled “GetLatencyPercentiles”Retrieves latency distributions (p50, p90, p95, p99) and a time-series history for charts.
- Request:
GetLatencyPercentilesRequestmessage GetLatencyPercentilesRequest {string project_id = 1;candela.types.TimeRange time_range = 2;string model = 3; // optional: filter by model} - Response:
GetLatencyPercentilesResponsemessage GetLatencyPercentilesResponse {double p50_ms = 1;double p90_ms = 2;double p95_ms = 3;double p99_ms = 4;repeated TimeSeriesPoint latency_over_time = 10;}
Deprecated Endpoints
Section titled “Deprecated Endpoints”The following endpoints are deprecated and should not be used in new integrations:
GetUsageSummary(useGetDashboardDatainstead)GetModelBreakdown(useGetDashboardDatainstead)GetMyUsage(useGetDashboardDatawithinclude_budget=trueorUserService.GetMyBudgetinstead)
2. UserService
Section titled “2. UserService”Manages user accounts, active grants, and daily budget limits. It supports both admin commands and developer self-service.
Self-Service Endpoints (Current User)
Section titled “Self-Service Endpoints (Current User)”GetCurrentUser
Section titled “GetCurrentUser”Returns the profile, role, status, and active budget details for the authenticated session.
- Request:
GetCurrentUserRequestmessage GetCurrentUserRequest {} - Response:
GetCurrentUserResponsemessage GetCurrentUserResponse {candela.types.User user = 1;candela.types.UserBudget budget = 2;repeated candela.types.BudgetGrant active_grants = 3;double total_remaining_usd = 4; // Combined: grants + budget remaining}
GetMyBudget
Section titled “GetMyBudget”Retrieves a lightweight, high-performance budget summary. This is the endpoint polled by IDE plugins to display status bar spend and remaining credits.
- Request:
GetMyBudgetRequestmessage GetMyBudgetRequest {} - Response:
GetMyBudgetResponsemessage GetMyBudgetResponse {candela.types.UserBudget budget = 1;repeated candela.types.BudgetGrant active_grants = 2;double total_remaining_usd = 3;double budget_remaining_usd = 4;double grants_remaining_usd = 5;int64 tokens_used_today = 10;string period_key = 20;string period_resets_at = 21;}
Admin Endpoints
Section titled “Admin Endpoints”Requires admin credentials (OAuth2/ID token with appropriate roles).
- User Lifecycle:
CreateUser: Provision a new user with email and default daily budget.- Request:
CreateUserRequestmessage CreateUserRequest {string email = 1;string display_name = 2;candela.types.UserRole role = 3;double daily_budget_usd = 5;} - Response:
CreateUserResponsemessage CreateUserResponse {candela.types.User user = 1;candela.types.UserBudget budget = 2;}
- Request:
ListUsers: Paginated list of users, with optional status filters (ACTIVE,INACTIVE).GetUser: Get detailed user status, including active/expired grants.- Request:
GetUserRequestmessage GetUserRequest {string id = 1;} - Response:
GetUserResponsemessage GetUserResponse {candela.types.User user = 1;candela.types.UserBudget budget = 2;repeated candela.types.BudgetGrant active_grants = 3;}
- Request:
UpdateUser: Update display names or roles using aFieldMask.DeactivateUser/ReactivateUser: Enable or disable proxy traffic permissions.DeleteUser: Permanently purge a deactivated user account.
- Budget Limits:
SetBudget: Configure recurring daily spending limits.GetBudget: Retrieve limit and spent calculations.ResetSpend: Zero out today’s spending for emergency relief.
- Grants:
CreateGrant: Issue one-time credits with startup and expiration dates.ListGrants: Show active and expired grants.RevokeGrant: Cancel/expire an active grant.
- Audit Trail:
ListAuditLog: Retrieve an immutable audit trail of actions taken on a user.
3. AnnotationService
Section titled “3. AnnotationService”Provides APIs for post-hoc trace enrichment. Used for business outcome logging, human review labeling, and custom metric evaluation.
Unlike traces (which flow through high-throughput OTLP ingest pipelines), annotations have CRUD semantics and arrive asynchronously after a request completes.
SetOutcome
Section titled “SetOutcome”Records whether a trace succeeded or failed along with a business-level score.
- Request:
SetOutcomeRequestmessage SetOutcomeRequest {string trace_id = 1;bool success = 2;double score = 3; // Value from 0.0 to 1.0string comment = 4;} - Response:
SetOutcomeResponsemessage SetOutcomeResponse {candela.types.Annotation annotation = 1;}
AddLabel
Section titled “AddLabel”Attaches a human review label to a trace.
- Request:
AddLabelRequestmessage AddLabelRequest {string trace_id = 1;string label = 2;string reviewer = 3;string comment = 4;} - Response:
AddLabelResponsemessage AddLabelResponse {candela.types.Annotation annotation = 1;}
LogMetric
Section titled “LogMetric”Records a custom numerical metric associated with the trace.
- Request:
LogMetricRequestmessage LogMetricRequest {string trace_id = 1;string metric_name = 2;double metric_value = 3;string comment = 4;} - Response:
LogMetricResponsemessage LogMetricResponse {candela.types.Annotation annotation = 1;}
ListAnnotations
Section titled “ListAnnotations”Returns all annotations (outcomes, labels, and metrics) associated with a trace.
- Request:
ListAnnotationsRequestmessage ListAnnotationsRequest {string trace_id = 1;candela.types.AnnotationType type_filter = 2;} - Response:
ListAnnotationsResponsemessage ListAnnotationsResponse {repeated candela.types.Annotation annotations = 1;}
4. RuntimeService
Section titled “4. RuntimeService”Orchestrates local model servers (Ollama, vLLM, LM Studio) inside the local environment (candela-local).
-
Process Control:
StartRuntime: Start the configured inference daemon (e.g., Ollama or vLLM).- Request:
StartRuntimeRequestmessage StartRuntimeRequest {string backend = 1;} - Response:
StartRuntimeResponsemessage StartRuntimeResponse {RuntimeStatus status = 1;}
- Request:
StopRuntime: Terminate the active inference daemon.
-
Health & Models:
GetHealth: Checks state (STOPPED,STARTING,RUNNING,ERROR), uptime, and currently loaded models.- Request:
GetHealthRequestmessage GetHealthRequest {} - Response:
GetHealthResponsemessage GetHealthResponse {RuntimeStatus status = 1;repeated RuntimeModel models = 2;}
- Request:
ListModels: List all models available on the disk.LoadModel/UnloadModel: Load/unload models to/from GPU memory.- Request:
LoadModelRequestmessage LoadModelRequest {string model = 1;} - Response:
LoadModelResponsemessage LoadModelResponse {ModelLoadState state = 1;}
- Request:
PullModel/CancelPull: Start/cancel asynchronous model downloads from registries.DeleteModel: Delete downloaded model files.
-
Discovery:
ListBackends: Check which backend engines are installed on the local systemPATHand which is active.
-
State:
-
ResetState: Clear pull history and app preferences from the local SQLite database.- Request:
ResetStateRequestmessage ResetStateRequest {} - Response:
ResetStateResponsemessage ResetStateResponse {}
[!WARNING]
ResetStateis a destructive operation that permanently clears the local SQLite database containing download history and custom preferences. This action cannot be undone. - Request:
-
-
Catalog:
ListCatalog: Retrieve recommended models to install.