roboto.ai.agent.resolver#
Module Contents#
- exception roboto.ai.agent.resolver.AgentResolutionError#
Bases:
ValueErrorBase class for resolver-raised errors. Routes map subclasses to 4xx.
- exception roboto.ai.agent.resolver.UnknownAgentVariablesError(names)#
Bases:
AgentResolutionErrorCaller supplied values for variables the agent no longer declares — almost always a stale invoke form. Mapped to 400 so the UI can refetch.
- Parameters:
names (list[str])
- names#
- exception roboto.ai.agent.resolver.UnresolvedAgentVariablesError(names)#
Bases:
AgentResolutionErrorRequired variables had no supplied value and no default. Mapped to 400 with the names so the invoke page can highlight the empty inputs.
- Parameters:
names (list[str])
- names#
- roboto.ai.agent.resolver.resolve_agent(agent, values)#
Substitute
valuesintoagent.request_templateand return a fully-validatedStartAgentThreadRequest.Walks the body’s JSON form swapping every
{{name}}occurrence in a string leaf. Embedded substitution is supported. Dict keys are never touched — placeholder syntax in keys is rejected at save time.- Raises:
UnknownAgentVariablesError –
valuescontains keys not declared on the agent (typically a stale invoke form).UnresolvedAgentVariablesError – a required variable has neither a supplied value nor a default; carries the offending names.
pydantic.ValidationError – the substituted body failed
StartAgentThreadRequestvalidation — e.g. a resolved value doesn’t match a field-level regex or enum.
- Parameters:
values (dict[str, str])
- Return type: