nemo_voice_agent.evaluation.tools.tau2_telecom_tools
nemo_voice_agent.evaluation.tools.tau2_telecom_tools
Tau2-telecom agent-side LLM tool ports.
Mirrors upstream TelecomTools. Tools operate on the agent-side
TelecomDB dict stored in shared_state["db"]. Reads return data;
writes mutate state["db"] and append an entry to
state["actions"] via WriteScenarioTool._record_action.
Conventions match tau2_airline_tools / tau2_retail_tools:
_Tau2InvokeMixin handles sync invoke + async _execute,
_Tau2TelecomAgentReadTool / _Tau2TelecomAgentWriteTool are
the base classes, and every tool declares a snake_case name
class attribute that drives the registry key + LLM-visible function
name + gold-replay dispatch key (matching how upstream policy.md
references tools).
Module Contents
Classes
Functions
Data
TAU2_TELECOM_AGENT_ACTION_TYPES
TAU2_TELECOM_AGENT_TOOL_NAME_TO_CLASS
API
Bases: _Tau2TelecomAgentWriteTool
Mirrors upstream TelecomTools._apply_one_time_charge.
Finds an existing DRAFT bill for the customer, or creates one.
Appends a charge line item and updates total_due. Does NOT
mint a stable bill_id when creating — upstream uses uuid4().hex[:8],
which is non-deterministic; we use the same shape so the hash
comparison sees an extra-bill structural change but not a
deterministic ID match. Scenarios that exercise refuel_data
should not depend on the new bill_id text.
Bases: _Tau2TelecomAgentWriteTool
Emit <exit> only after the transfer result has been delivered.
Provides sync invoke(**kwargs) + async _execute(**kwargs) routing.
Same shape as _Tau2InvokeMixin in airline / retail / user-side
telecom files. Subclasses implement _do_work(p).
Run the tool and return its result (pure — never delivers).
StandardSchemaTool.__call__ owns delivery and applies the
empty-result normalization centrally, so a falsy result (e.g. an
empty match list) can’t be masked as the literal “COMPLETED”.
Bases: _Tau2InvokeMixin, StandardSchemaTool
Base for telecom agent-side read-only tools.
Return a JSON-safe shallow copy of a customer dict for tool output.
Same shape as upstream’s Customer schema (already dict, just defensive
copy so the caller can’t accidentally mutate state["db"] through
the result).
Resolve a line + verify it belongs to the customer. Raises ValueError on miss.
Return today as a date object.
scenario_today (when supplied) is the scenario’s authored anchor
date — used for tasks whose timing assumptions depend on a fixed
“now” (e.g., bill due dates relative to a current month). Falls
back to today when not supplied.