roboto.ai.agent.resolver#

Module Contents#

exception roboto.ai.agent.resolver.AgentResolutionError#

Bases: ValueError

Base class for resolver-raised errors. Routes map subclasses to 4xx.

exception roboto.ai.agent.resolver.UnknownAgentVariablesError(names)#

Bases: AgentResolutionError

Caller 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: AgentResolutionError

Required 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 values into agent.request_template and return a fully-validated StartAgentThreadRequest.

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:
  • UnknownAgentVariablesErrorvalues contains 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 StartAgentThreadRequest validation — e.g. a resolved value doesn’t match a field-level regex or enum.

Parameters:
Return type:

roboto.ai.agent_thread.record.StartAgentThreadRequest