nemo_gym.server_runtime.episode_tools
nemo_gym.server_runtime.episode_tools
Tools that an Environment Server serves to the agent for one episode.
Module Contents
Classes
Functions
Data
API
The tools of one episode.
specs is fixed for the episode. call runs one tool by name; the server checks the name against
specs first. It raises ToolArgumentsError for arguments the tool does not accept.
Bases: ValueError
The agent sent arguments that the tool does not accept. The message is shown to the agent.
Bases: BaseModel
One tool call of an episode, in the order the server ran it.
Bases: BaseModel
What one tool call returns to the agent. is_error marks an error the agent should see and handle.
Bases: BaseModel
One tool as the agent sees it.
Declare this tool to the model, for an agent that calls it over direct HTTP.
The parameters are the full schema, with its $defs. The declaration is not strict, because a strict
schema must make every property required.
An EpisodeToolset built from the @episode_tool methods of one object, such as an episode’s state.
Each method takes one Pydantic model of arguments and returns a ToolResult, a Pydantic model or a JSON
value. The tool’s name is the method’s name, and its parameters are the model’s JSON schema.
The arguments model and spec of each @episode_tool method of a class.
They depend only on the class, so each class builds them once, not once for each episode.
Mark an async method as a tool for TypedToolset. Its docstring is the tool’s description.