Skip to content
Roboto
Esc
↑↓navigate↵open⌘Jpreview
On this page

roboto.ai.agent.resolver

Module Contents

AgentResolutionError

exception roboto.ai.agent.resolver.AgentResolutionError#View Source

Bases: ValueError

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

UnknownAgentVariablesError

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

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]

Attributes

UnknownAgentVariablesError.names

names #

UnresolvedAgentVariablesError

exception roboto.ai.agent.resolver.UnresolvedAgentVariablesError(names)#View Source

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]

Attributes

UnresolvedAgentVariablesError.names

names #

resolve_agent()

roboto.ai.agent.resolver.resolve_agent(agent, values)#View Source

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.

Parameters

values dict[str, str]

Raises

values contains keys not declared on the agent (typically a stale invoke form).

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.

Was this page helpful?