Skip to main content
The environment is the interface your agent uses to discover and call tools at runtime.

Methods

MethodDescription
async alist_tools(tool_server=None)Returns tool definitions (all servers, or a specific one)
async acall_tool(tool_server, tool_name, parameters)Invokes a tool and returns a ToolCallResult
list_tool_namespaces()Returns list[ToolNamespace] describing available tool servers and their transports
list_tools(tool_server=None)Deprecated (removal in 0.4.0) — sync wrapper around alist_tools()
call_tool(tool_server, tool_name, parameters)Deprecated (removal in 0.4.0) — sync wrapper around acall_tool()
Since BaseAgent.setup() and run() are synchronous, the deprecated sync wrappers (list_tools, call_tool) are still usable from agent code. They run the async methods internally via a compatibility shim.

UnifiedToolEnvironment

SimLab ships UnifiedToolEnvironment, which implements BaseEnvironment over HTTP and MCP transports against the Tool Server Protocol.
from simlab.agents import UnifiedToolEnvironment

env = UnifiedToolEnvironment(
    tool_servers={
        "email": "https://<environment-url>/email",
        "calendar": "https://<environment-url>/calendar",
    },
    timeout_seconds=30.0,
)

tools = env.list_tools()
result = env.call_tool("email", "send_email", {"to": "...", "subject": "...", "body": "..."})