Skip to content

Fetch & traces

A fetch is FACE’s main pipeline. It reads the selected data sources on a runner, profiles and reconciles them, runs the posture, rules, hypothesis and twin agents on the sovereign model plane, and returns one analysis with decisions, action cards and their judgements. FetchService starts fetches, streams their progress, lists past runs, and generates procedures.

Fetches always execute on a runner, never on the control plane. The control plane checks the tenant’s compute budget, then hands the work to an enrolled runner or dials the managed runner (see Configuration, connections & runners). Each successful fetch charges 25 compute units (see Metering & schedules).

Summary

ServiceRPCKindPurpose
FetchServiceRunFetchUnaryRun a fetch and return the analysis
FetchServiceRunFetchStreamServer streamingRun a fetch, streaming phase progress
FetchServiceListTracesUnaryList recent fetch runs
FetchServiceGetTraceDetailsUnaryOne run’s command, analysis and SQL
FetchServiceGenerateSOPUnaryDraft a standard operating procedure
FetchServiceTalkBidirectional streamingNot implemented
FetchServiceListFetchStartersUnarySuggested fetch prompts

FetchService/GetDispatchKey is internal to the platform (served only by a runner, and only to a verified mesh peer) and is not documented here.

FetchService

Full name semantics.v1.FetchService.

RunFetch

rpc RunFetch(RunFetchRequest) returns (RunFetchResponse);
  • Kind: Unary. A fetch can take many minutes: set a generous deadline, or use RunFetchStream.
  • Auth: Bearer session.
  • Errors: None beyond authentication. Every outcome is in the response. Check success and message:
SituationResponse
Compute budget exhaustedsuccess: false, message asks you to top up compute units. Nothing ran.
No runner available or reachablesuccess: false, message says so. The fetch never runs on the control plane.
No selected source could be readsuccess: false, message names each source and why.
Some analysis phases failedsuccess: false, message gives the verdict, and analysis carries what was produced.
Completesuccess: true, transaction_id and analysis set.

Read analysis.source_notices even on success: it reports sources that could not be read and where SQL actually ran.

Request: RunFetchRequest

Shared by RunFetch and RunFetchStream.

FieldTypeDescription
commandstringWhat to analyse, in plain language, for example Which shipments are running late, and why?.
documentsrepeated stringAttached documents, such as regulatory rules.
connection_idstringThe primary data source.
runner_idstringThe runner to use. The compute budget is always the tenant’s, whatever runner is named.
enrichment_connection_idsrepeated stringAdditional sources to read.
trigger_typeRunFetchRequest.TriggerTypeWhat started the run.
schedule_configstringOptional cron expression or description.
job_idstringYour job id. Used as the charge reference when there is no transaction id.
language_preferencestringPreferred language for the analysis.
notify_via_callboolAfter the run, phone the carrier number in the integration config with the spoken summary. Nothing happens if no number is configured.
notify_via_whatsappboolAfter the run, send the spoken summary to the WhatsApp number in the integration config. Nothing happens if no number is configured.
session_edaboolRun only the fast first phase (data domains, maturity, rules reconciliation, knowledge graph) and skip the deep hypothesis and twin agents.
synapse_thresholddoubleMinimum absolute Pearson r for the pass to record a measured link (“synapse”) between two data domains. 0 means the default, 0.5. Higher values give fewer, stronger links.
dispatched_connectionsrepeated ConnectionInternal. Set by the platform when it forwards work to a runner. A client value is overwritten or ignored.
dispatch_idstringInternal. As above.
dispatched_credentialsrepeated SealedCredentialInternal. As above. Clients never see or send credentials here.

Response: RunFetchResponse

FieldTypeDescription
successbooltrue only for a complete run.
messagestringWhy, when success is false.
transaction_idstringThe run’s id, also used as the trace id.
analysisFetchAnalysisResultThe analysis. Also present on a partial run.

RunFetchStream

rpc RunFetchStream(RunFetchRequest) returns (stream RunFetchUpdate);
  • Kind: Server streaming. Available over native gRPC and gRPC-web.
  • Auth: Bearer session.
  • Errors: Outcomes arrive in the stream, as for RunFetch. The stream can end with an error only if forwarding to the runner fails in transport.

Runs the same pipeline and streams real progress as each phase completes: data_health, rules, scenarios, recommendations, and a terminal final event that carries the full RunFetchResponse in result. A budget refusal is a single denied event with done: true. An identical recent request may be answered straight from a cache with one final event (“Analysis complete (cached)”), and the result’s provenance then says so.

Response: RunFetchUpdate

FieldTypeDescription
phasestringdata_health, rules, scenarios, recommendations, final, or denied.
messagestringHuman-readable progress, for example Data health checked.
doneboolThis phase, or for final and denied the whole run, is complete.
resultRunFetchResponseSet only on the final event.

ListTraces

rpc ListTraces(ListTracesRequest) returns (ListTracesResponse);
  • Kind: Unary.
  • Auth: Bearer session.
  • Errors: FAILED_PRECONDITION if no session store is configured. INTERNAL if it cannot be read.

Lists recent fetch runs, newest first.

Request: ListTracesRequest

FieldTypeDescription
limitint32Maximum runs. 0 or negative means 20. Capped at 200.

Response: ListTracesResponse

FieldTypeDescription
tracesrepeated TraceOne per run. description is Cmd: <command> | <first 50 characters of the analysis>.

GetTraceDetails

rpc GetTraceDetails(GetTraceDetailsRequest) returns (GetTraceDetailsResponse);
  • Kind: Unary.
  • Auth: Bearer session.
  • Errors: UNAVAILABLE if no session store is configured. NOT_FOUND if the trace does not exist.

Request: GetTraceDetailsRequest

FieldTypeDescription
trace_idstringA run’s transaction_id.

Response: GetTraceDetailsResponse

FieldTypeDescription
traceTraceThe run. description holds the command, the full analysis and the generated SQL.

GenerateSOP

rpc GenerateSOP(GenerateSOPRequest) returns (GenerateSOPResponse);
  • Kind: Unary.
  • Auth: Bearer session.
  • Errors: INVALID_ARGUMENT if the request trips the prompt-injection check. PERMISSION_DENIED if it trips the fetch agent’s guardrail.

Drafts a standard operating procedure in Markdown on the model plane. If the model is unavailable, sop_content is SOP Generation Failed. That is not an error, so check the content.

Request: GenerateSOPRequest

FieldTypeDescription
topicstringWhat the procedure is for.
process_namestringThe process.
stepsrepeated stringOptional step hints.

Response: GenerateSOPResponse

FieldTypeDescription
sop_contentstringThe procedure, in Markdown.
sop_idstringsop_<unix seconds>.

Talk

rpc Talk(stream FetchServiceTalkRequest) returns (stream FetchServiceTalkResponse);
  • Kind: Bidirectional streaming.
  • Auth: Bearer session.
  • Errors: Always UNIMPLEMENTED. Voice runs through CallingService.

Request: FetchServiceTalkRequest

FieldTypeDescription
audio_databytesAudio.

Response: FetchServiceTalkResponse

FieldTypeDescription
audio_databytesAudio. Never returned.
textstringText. Never returned.

ListFetchStarters

rpc ListFetchStarters(ListFetchStartersRequest) returns (ListFetchStartersResponse);
  • Kind: Unary.
  • Auth: Bearer session.
  • Errors: None.

Returns four suggested prompts, sampled from the deployment’s configured list or from a built-in list.

Request: ListFetchStartersRequest

No fields.

Response: ListFetchStartersResponse

FieldTypeDescription
startersrepeated FetchStarterSuggestions.

Messages

FetchAnalysisResult

FieldTypeDescription
transaction_idstringRun id.
sql_generatedstringThe SQL the pipeline generated and ran.
qualityDataQualityNot measured by the current pipeline: every figure is 0. See metrics.unmeasured_reason.
profilingDataProfilingOnly data_shapes is set, and it is a fixed label. The other fields are empty.
metricsEvaluationMetricsNo evaluation harness runs for a fetch: unmeasured_reason is set and every score is absent. Do not display them.
graph_nodesrepeated KnowledgeGraphNodeThe domain graph.
graph_edgesrepeated KnowledgeGraphEdgeIts edges, with the evidence in relation.
analysis_textstringThe business analysis, as prose.
decisionsrepeated DecisionThe twin’s decisions.
action_cardsrepeated ActionCardProposed actions, with origin stage fetch. Decide them with TwinsService/ExecuteAction.
time_seriesrepeated TimeSeriesInsightTime-series insights.
shadow_searchrepeated ShadowSearchResultPublic research used.
spoken_responsestringA short spoken-style summary.
provenanceProvenanceHow this result was produced: fresh, cached, or degraded.
hypothesis_scenariosrepeated DecisionScenarioThe hypothesis swarm’s scenarios. A union of independent agents’ answers, not a consensus.
hypothesis_impactsrepeated ImpactSimulationSwarm impacts.
hypothesis_tracesrepeated EvidenceTraceSwarm evidence traces.
hypothesis_forecastsrepeated TimeSeriesForecastSwarm forecasts.
hypothesis_anomaliesrepeated TimeSeriesAnomalySwarm anomalies.
hypothesis_scenarios_inferredint32Scenarios the estate proposed before the agent cap. Meaningful only when hypothesis_swarm_ran is true.
hypothesis_agents_dispatchedint32Agents started. Fewer than inferred means the lists above are a sample.
hypothesis_agents_succeededint32Agents that produced a simulation.
hypothesis_swarm_ranboolWhether the three counts above were measured. false means they are absent, not zero: for example on a session_eda fetch.
source_noticesrepeated stringSentences about sources that could not be read, or about where a source’s SQL ran. Empty does not mean everything was fine.
action_judgementsJudgementSetThe verdict on every action proposed in this run, accepted and rejected. Rejected actions appear nowhere else.

DataQuality

FieldTypeDescription
accuracydoubleAccuracy.
completenessdoubleCompleteness.
consistencydoubleConsistency.
timelinessdoubleTimeliness.
validitydoubleValidity.
uniquenessdoubleUniqueness.
integritydoubleIntegrity.
relevancedoubleRelevance.

DataProfiling

FieldTypeDescription
outliersrepeated stringOutliers.
patternsrepeated stringPatterns.
schema_driftsrepeated stringSchema drifts.
data_shapesstringData shapes.
duplicate_rowsint32Duplicate rows.

Provenance

FieldTypeDescription
pathstringHow the result was reached, for example exact-cache, near-dup or full.
modelstringThe model that produced it. Empty for a cache or deterministic result.
sourcestringfresh, exact-cache, near-dup or offline.
degradedboolProduced without full server capability.
confidencedoubleJudge score or near-duplicate similarity, 0 to 1.
computed_atint64Unix seconds when the underlying value was produced. Use it to judge staleness.

Trace

FieldTypeDescription
idstringThe run’s transaction id.
schema_namestringAlways execution_log.
table_namestringAlways session_result.
row_countint64Not populated.
size_bytesint64Not populated.
last_modifiedstringWhen the run was recorded, RFC 3339.
descriptionstringThe run’s command and analysis. See each RPC.
freshness_labelstringNot populated.
columnsrepeated stringNot populated.
downstream_tablesrepeated stringNot populated.

FetchStarter

FieldTypeDescription
iconstringIcon name.
titlestringTitle.
subtitlestringSubtitle.
prompt_textstringThe prompt to send as RunFetchRequest.command.

Enums

RunFetchRequest.TriggerType

ValueMeaning
TRIGGER_TYPE_UNSPECIFIEDNot set.
TRIGGER_TYPE_MANUALStarted by a person.
TRIGGER_TYPE_SCHEDULEDStarted by a schedule.
TRIGGER_TYPE_APIStarted by an integration.