roboto.ai.goals.achieve_inputs#
Pydantic models for the inputs an achieve-tool receives from the LLM.
Each model captures the exact JSON shape the LLM submits when invoking the
achieve-tool for a goal of the corresponding GoalType. The models
are shared between the server-side handlers (which validate the LLM’s
tool_use input against them) and the SDK-side
roboto.ai.goals.results GoalResult discriminated union (which
re-hydrates the same shape from the persisted message stream).
Vocabulary-aware constraints (e.g. “label must be one of the goal’s declared
labels”, “event name must be in the goal’s event vocabulary”) are not
expressible at the static-model level because they depend on the goal
instance; the server-side handler enforces them as a second pass after this
structural validation. The SDK does not enforce them at all — historical
tool_use inputs have already passed both Bedrock’s schema check and the
handler’s vocab check at the time they were persisted.
Module Contents#
- class roboto.ai.goals.achieve_inputs.CreateEventsAchieveInput(/, **data)#
Bases:
pydantic.BaseModelInput the LLM submits to achieve a
GoalType.CREATE_EVENTSgoal.- Parameters:
data (Any)
- class roboto.ai.goals.achieve_inputs.DatasetSummaryAchieveInput(/, **data)#
Bases:
pydantic.BaseModelInput the LLM submits to achieve a
GoalType.DATASET_SUMMARYgoal.- Parameters:
data (Any)
- summary: str = None#
The full natural-language summary to persist for the dataset.
Must contain non-whitespace characters; the achieve-tool rejects pure whitespace as equivalent to empty.
- class roboto.ai.goals.achieve_inputs.DatasetTriageAchieveInput(/, **data)#
Bases:
pydantic.BaseModelInput the LLM submits to achieve a
GoalType.DATASET_TRIAGEgoal.- Parameters:
data (Any)
- label_decisions: list[LabelDecision] = None#
One
LabelDecisionper entry in the goal’slabel_vocabulary.Vocabulary completeness — every label declared on the goal appears exactly once, with no duplicates — is enforced by the server-side handler. This model only validates the structural shape of each decision.
- class roboto.ai.goals.achieve_inputs.EventSpec(/, **data)#
Bases:
pydantic.BaseModelOne event the LLM proposes inside a
CreateEventsAchieveInput.The
namemust come from the parent goal’sevent_vocabularyand everytagsentry from the goal’stag_vocabulary; both checks live in the server-side handler because they depend on the goal instance.- Parameters:
data (Any)
- description: str | None = None#
Optional longer explanation of what the event captures.
- end_time: pydantic.StrictInt#
Event end, in nanoseconds since the Unix epoch. Must be greater than or equal to
start_time.Strictly typed for the same reason as
start_time.
- name: str#
The kind of event. Must be one of the goal’s declared event vocabulary names (enforced by the handler).
- start_time: pydantic.StrictInt#
Event start, in nanoseconds since the Unix epoch.
Strictly typed: pydantic would otherwise coerce stringified integers and (notably) booleans —
Truewould silently parse as timestamp 1. The historical achieve-tool contract required a JSON integer.
- tags: list[str] = None#
Tags attached to this event. Each must be one of the goal’s declared tag vocabulary keys (enforced by the handler). Empty by default.
- target_id: str | None = None#
Identifier of the Roboto entity this event is attached to. The server-side handler infers the entity type from the id prefix (
ds_/fl_/tp_/mp_) and enforces that the target descends from the goal’s dataset.Optional rather than required so the SDK can re-hydrate
CreateEventsGoalResultfrom persisted tool-use records written before per-event target scoping was added — those carry notarget_idon each spec. Current-day records always carry a non-empty value; the handler rejectsNoneon new invocations via a corrective tool-failure response.
- class roboto.ai.goals.achieve_inputs.LabelDecision(/, **data)#
Bases:
pydantic.BaseModelOne per-label deliberation entry inside a
DatasetTriageAchieveInput.Every label in the goal’s
label_vocabularymust appear exactly once across the parentlabel_decisionslist — that constraint is enforced by the server-side handler after structural validation, since the vocabulary is goal-instance-specific.- Parameters:
data (Any)
- applies: pydantic.StrictBool#
Whether the label applies to the dataset.
Truedecisions become tags on the dataset;Falsedecisions are recorded in the tool-use log but not persisted on the dataset itself.Strictly typed to reject pydantic’s default truthy-string coercion — the historical achieve-tool contract required a JSON boolean, not a boolean-coerced string or integer.
- confidence: float = None#
Subjective confidence in the decision, from 0.0 (no confidence) to 1.0 (certain). Recorded but not used to gate persistence.
- justification: str = None#
Brief reasoning for the decision, citing concrete observations from the dataset. Required even when
appliesisFalseso the deliberation is captured.
- label: str#
The vocabulary label this decision concerns. Must match one of the goal’s
label_vocabularykeys (enforced by the handler against the declaring goal).