Tools
In ORS, tools are the actions that agents can take. Every interaction with an environment happens through tool calls - this is the fundamental principle of ORS.Core Principle: Actions are Tools
The only way agents interact with environments is by calling tools.This design choice: -Leverages existing function calling support from LLM providers -Provides a clear, structured interface -Makes agent actions explicit and traceable -Enables type-safe interactions with JSON Schema
What is a Tool?
A tool is a function that:- Has a name and description
- Optionally defines input parameters (via JSON Schema)
- Returns a
ToolOutputwith content, reward, and finished flag
submit-Submit an answer to a problembash-Execute a bash commandread_file-Read a file’s contentsweb_search-Search the webpython-Execute Python code
Tool Specification
Tools are advertised via theGET /{env_name}/tools endpoint:
Tool Spec Fields
name (string, required):
-Tool identifier used in tool calls
-Should be descriptive (e.g., bash, not b)
-Convention: lowercase with underscores
description (string, required):
-Human-readable explanation of what the tool does
-Used by LLMs to decide when to call the tool
-Should be clear and specific
input_schema (object, optional):
-JSON Schema defining tool parameters
-If omitted, tool takes no parameters
-Enables validation and type checking
JSON Schema for Parameters
Theinput_schema follows JSON Schema specification:
string,number,booleanobject(nested parameters)array(lists of values)null
required-Mandatory fieldsdefault-Default valuesenum-Allowed valuesdescription-Field documentationexamples-Example values
Tool Output
Every tool call returns aToolOutput:
Example Outputs
Successful completion:Key Fields
blocks: The content returned by the tool
-Always an array (even for single text output)
-Can be text, images, or both
-This is what the agent observes as next state
reward: Feedback for RL training
-Optional (can be null)
-Typically 0.0 for steps, 1.0 for success, 0.0/-1.0 for failure
-See Rewards for design patterns
finished: Episode termination signal
-Required boolean field
-When true, episode is complete
-Agent should stop calling tools and cleanup session
metadata: Optional structured data
-Not shown to agent (in typical RL setup)
-Used for logging, debugging, analysis
-Can include execution time, resource usage, etc.
Tool Design Patterns
Pattern 1: Parameterless Tools
Tools that don’t need input:Pattern 2: Simple Parameter Tools
Tools with basic parameters:Pattern 3: Complex Parameter Tools
Tools with rich parameters:Pattern 4: Enum Parameters
Tools with constrained choices:Tool Categories
Observation Tools
Tools that let agents observe environment state:bash-Execute read-only commandsread_file-Read file contentslist_files-List directory contentsget_status-Check task status
finished: false
-Reward typically 0.0
-Return information in blocks
Action Tools
Tools that modify environment state:bash-Execute commands with side effectswrite_file-Modify filessubmit-Submit solutionreset-Reset environment
finished: true (if task completes)
-May have non-zero reward
-Represent meaningful progress
Termination Tools
Tools that end the episode:submit-Submit final answergive_up-Abandon taskend_episode-Explicitly end
finished: true
-Have final reward (success/failure)
-No tool calls after this
Multi-Modal Tools
Tools can return images and text:Tool Calling Flow
Best Practices
1. Clear Tool Names
2. Comprehensive Descriptions
3. Validate Tool Inputs
4. Provide Informative Outputs
5. Use finished Correctly
Tool Security
Input Validation
Always validate tool inputs: -Check types match schema -Validate ranges and constraints -Sanitize strings (prevent injection attacks) -Reject malformed inputsCommand Injection
Be careful with bash tools:Resource Limits
Prevent resource exhaustion: -Set timeouts on tool execution -Limit output size -Rate limit tool calls -Sandbox execution environmentsNext Steps
Tasks & Splits
Organize problems for training and evaluation
Rewards
Design reward signals for RL
Implementing a Server
Build an ORS server with custom tools
HTTP API
See how tools are listed and called
Key Takeaway: Tools are the agent’s interface to the environment. Design them carefully with clear names, comprehensive descriptions, proper validation, and informative outputs. The quality of your tools directly impacts agent performance.

