---
sidebar:
  hidden: true
title: roboto.ai.agent.resolver
---
## Module Contents

### AgentResolutionError

```python
exception roboto.ai.agent.resolver.AgentResolutionError
```

`from roboto.ai.agent import AgentResolutionError`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/agent/resolver.py#L12-L13)

Bases: `ValueError`

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

### UnknownAgentVariablesError

```python
exception roboto.ai.agent.resolver.UnknownAgentVariablesError(names: list[str])
```

`from roboto.ai.agent import UnknownAgentVariablesError`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/agent/resolver.py#L25-L31)

Bases: [`AgentResolutionError`](/reference/python-sdk/roboto/ai/agent/resolver#roboto.ai.agent.resolver.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**

### UnresolvedAgentVariablesError

```python
exception roboto.ai.agent.resolver.UnresolvedAgentVariablesError(names: list[str])
```

`from roboto.ai.agent import UnresolvedAgentVariablesError`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/agent/resolver.py#L16-L22)

Bases: [`AgentResolutionError`](/reference/python-sdk/roboto/ai/agent/resolver#roboto.ai.agent.resolver.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**

### resolve_agent()

```python
def roboto.ai.agent.resolver.resolve_agent(
    agent: roboto.ai.agent.record.AgentRecord,
    values: dict[str, str],
) -> roboto.ai.agent_thread.record.StartAgentThreadRequest
```

`from roboto.ai.agent import resolve_agent`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/ai/agent/resolver.py#L34-L57)

Substitute `values` into `agent.request_template` and return a fully-validated [`StartAgentThreadRequest`](/reference/python-sdk/roboto/ai/agent_thread/record#roboto.ai.agent_thread.record.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**

- **agent** (`roboto.ai.agent.record.AgentRecord`)
- **values** (`dict[str, str]`)

**Raises**

- [`UnknownAgentVariablesError`](/reference/python-sdk/roboto/ai/agent/resolver#roboto.ai.agent.resolver.UnknownAgentVariablesError): `values` contains keys not declared on the agent (typically a stale invoke form).
- [`UnresolvedAgentVariablesError`](/reference/python-sdk/roboto/ai/agent/resolver#roboto.ai.agent.resolver.UnresolvedAgentVariablesError): a required variable has neither a supplied value nor a default; carries the offending names.
- `pydantic.ValidationError`: the substituted body failed [`StartAgentThreadRequest`](/reference/python-sdk/roboto/ai/agent_thread/record#roboto.ai.agent_thread.record.StartAgentThreadRequest) validation — e.g. a resolved value doesn't match a field-level regex or enum.

**Returns**

- `roboto.ai.agent_thread.record.StartAgentThreadRequest`
