roboto.ai.core.context#
Module Contents#
- class roboto.ai.core.context.AnalysisScope(/, **data)#
Bases:
pydantic.BaseModelThe slice of data an agent is expected to analyze.
An
AnalysisScopeis delivered to everyAgentToolinvocation on the server side. Individual tools opt in to honoring the scope as they are adopted; this SDK type carries the configuration, it does not itself enforce anything. Fields set toNoneare unconstrained on that dimension; anAnalysisScopewith every fieldNoneis equivalent to no scope at all.- Parameters:
data (Any)
- end_time: int | None = None#
Upper bound (inclusive) of the analysis window, expressed as nanoseconds since the Unix epoch.
- start_time: int | None = None#
Lower bound (inclusive) of the analysis window, expressed as nanoseconds since the Unix epoch.
- class roboto.ai.core.context.ClientViewingContext(/, **data)#
Bases:
pydantic.BaseModelWhat the Roboto client (e.g. the Web UI) is currently viewing when the user composed a message.
Passed to the agent as implicit context for resolving deictic references — “this dataset”, “those files”, “the visualizer state I’m looking at” — that the user would otherwise have to spell out. This type is purely informational; it is not enforced and never gates tool authorization.
Distinct from:
AnalysisScope, which is a hard analysis window honored by individual tools on the server side.AgentGoal, which declares typed outcomes the agent runner must drive the turn to satisfy.
The corresponding wire-format field is
client_context(with a one-releasecontextalias for migration).- Parameters:
data (Any)
- dataset_ids: list[str] = None#
IDs of datasets the user is currently viewing or has selected.
- file_ids: list[str] = None#
IDs of files the user is currently viewing or has selected.
- misc_context: dict[str, Any] | None = None#
Miscellaneous client-supplied context that doesn’t fit the typed fields above. Use sparingly; prefer adding a typed field when a recurring shape emerges.
- visualizer_state: dict[str, Any] | None = None#
State of the visualizer, when the user composed the message from the visualizer view. A relatively opaque JSON blob.