Buckets:
| <meta charset="utf-8" /><meta name="hf:doc:metadata" content="{"title":"Agent World Model","local":"agent-world-model","sections":[{"title":"Quick Start","local":"quick-start","sections":[{"title":"1. Start the Server","local":"1-start-the-server","sections":[],"depth":3},{"title":"2. Connect with the Client","local":"2-connect-with-the-client","sections":[],"depth":3}],"depth":2},{"title":"Environment Details","local":"environment-details","sections":[{"title":"Actions","local":"actions","sections":[],"depth":3},{"title":"Observation Fields","local":"observation-fields","sections":[],"depth":3},{"title":"Reward Types and Values","local":"reward-types-and-values","sections":[],"depth":3}],"depth":2},{"title":"Session Artifacts","local":"session-artifacts","sections":[],"depth":2},{"title":"Verifier Modes","local":"verifier-modes","sections":[{"title":"Code Mode (Default, no LLM needed)","local":"code-mode-default-no-llm-needed","sections":[],"depth":3},{"title":"SQL Mode (code-augmented LLM-as-a-Judge)","local":"sql-mode-code-augmented-llm-as-a-judge","sections":[],"depth":3}],"depth":2},{"title":"Listing Scenarios & Tasks","local":"listing-scenarios--tasks","sections":[],"depth":2},{"title":"Server Monitoring","local":"server-monitoring","sections":[],"depth":2},{"title":"Full Agent Interaction Example","local":"full-agent-interaction-example","sections":[],"depth":2},{"title":"Large-Scale RL Training","local":"large-scale-rl-training","sections":[{"title":"Simulated Stress Test","local":"simulated-stress-test","sections":[],"depth":3}],"depth":2},{"title":"AWM Server Configuration","local":"awm-server-configuration","sections":[],"depth":2},{"title":"Warning","local":"warning","sections":[],"depth":2},{"title":"Citation","local":"citation","sections":[],"depth":2}],"depth":1}"> | |
| <link href="/docs/openenv/pr_813/en/_app/immutable/assets/0.e3b0c442.css" rel="modulepreload"> | |
| <link rel="modulepreload" href="/docs/openenv/pr_813/en/_app/immutable/entry/start.9c9d6cdf.js"> | |
| <link rel="modulepreload" href="/docs/openenv/pr_813/en/_app/immutable/chunks/scheduler.2b22cead.js"> | |
| <link rel="modulepreload" href="/docs/openenv/pr_813/en/_app/immutable/chunks/singletons.b9e7e2c8.js"> | |
| <link rel="modulepreload" href="/docs/openenv/pr_813/en/_app/immutable/chunks/paths.4b396019.js"> | |
| <link rel="modulepreload" href="/docs/openenv/pr_813/en/_app/immutable/entry/app.b8b7485a.js"> | |
| <link rel="modulepreload" href="/docs/openenv/pr_813/en/_app/immutable/chunks/preload-helper.b21f837c.js"> | |
| <link rel="modulepreload" href="/docs/openenv/pr_813/en/_app/immutable/chunks/index.1a0e8013.js"> | |
| <link rel="modulepreload" href="/docs/openenv/pr_813/en/_app/immutable/nodes/0.93b1c108.js"> | |
| <link rel="modulepreload" href="/docs/openenv/pr_813/en/_app/immutable/chunks/each.e59479a4.js"> | |
| <link rel="modulepreload" href="/docs/openenv/pr_813/en/_app/immutable/nodes/4.b3d6c109.js"> | |
| <link rel="modulepreload" href="/docs/openenv/pr_813/en/_app/immutable/chunks/MermaidChart.svelte_svelte_type_style_lang.f5f19e58.js"> | |
| <link rel="modulepreload" href="/docs/openenv/pr_813/en/_app/immutable/chunks/CodeBlock.640a2a71.js"><!-- HEAD_svelte-u9bgzb_START --><meta name="hf:doc:metadata" content="{"title":"Agent World Model","local":"agent-world-model","sections":[{"title":"Quick Start","local":"quick-start","sections":[{"title":"1. Start the Server","local":"1-start-the-server","sections":[],"depth":3},{"title":"2. Connect with the Client","local":"2-connect-with-the-client","sections":[],"depth":3}],"depth":2},{"title":"Environment Details","local":"environment-details","sections":[{"title":"Actions","local":"actions","sections":[],"depth":3},{"title":"Observation Fields","local":"observation-fields","sections":[],"depth":3},{"title":"Reward Types and Values","local":"reward-types-and-values","sections":[],"depth":3}],"depth":2},{"title":"Session Artifacts","local":"session-artifacts","sections":[],"depth":2},{"title":"Verifier Modes","local":"verifier-modes","sections":[{"title":"Code Mode (Default, no LLM needed)","local":"code-mode-default-no-llm-needed","sections":[],"depth":3},{"title":"SQL Mode (code-augmented LLM-as-a-Judge)","local":"sql-mode-code-augmented-llm-as-a-judge","sections":[],"depth":3}],"depth":2},{"title":"Listing Scenarios & Tasks","local":"listing-scenarios--tasks","sections":[],"depth":2},{"title":"Server Monitoring","local":"server-monitoring","sections":[],"depth":2},{"title":"Full Agent Interaction Example","local":"full-agent-interaction-example","sections":[],"depth":2},{"title":"Large-Scale RL Training","local":"large-scale-rl-training","sections":[{"title":"Simulated Stress Test","local":"simulated-stress-test","sections":[],"depth":3}],"depth":2},{"title":"AWM Server Configuration","local":"awm-server-configuration","sections":[],"depth":2},{"title":"Warning","local":"warning","sections":[],"depth":2},{"title":"Citation","local":"citation","sections":[],"depth":2}],"depth":1}"><!-- HEAD_svelte-u9bgzb_END --> <p></p> <div class="items-center shrink-0 min-w-[100px] max-sm:min-w-[50px] justify-end ml-auto flex" style="float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"><div class="inline-flex rounded-md max-sm:rounded-sm"><button class="inline-flex items-center gap-1 h-7 max-sm:h-7 px-2 max-sm:px-1.5 text-sm font-medium text-gray-800 border border-r-0 rounded-l-md max-sm:rounded-l-sm border-gray-200 bg-white hover:shadow-inner dark:border-gray-850 dark:bg-gray-950 dark:text-gray-200 dark:hover:bg-gray-800" aria-live="polite"><span class="inline-flex items-center justify-center rounded-md p-0.5 max-sm:p-0 hover:text-gray-800 dark:hover:text-gray-200"><svg class="sm:size-3.5 size-3" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg></span> <span>Copy page</span></button> <button class="inline-flex items-center justify-center w-6 max-sm:w-5 h-7 max-sm:h-7 disabled:pointer-events-none text-sm text-gray-500 hover:text-gray-700 dark:hover:text-white rounded-r-md max-sm:rounded-r-sm border border-l transition border-gray-200 bg-white hover:shadow-inner dark:border-gray-850 dark:bg-gray-950 dark:text-gray-200 dark:hover:bg-gray-800" aria-haspopup="menu" aria-expanded="false" aria-label="Open copy menu"><svg class="transition-transform text-gray-400 overflow-visible sm:size-3.5 size-3 rotate-0" width="1em" height="1em" viewBox="0 0 12 7" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L6 6L11 1" stroke="currentColor"></path></svg></button></div> </div> <h1 class="relative group"><a id="agent-world-model" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#agent-world-model"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Agent World Model</span></h1> <p data-svelte-h="svelte-17lxrjs">AgentWorldModel-1K is a synthetic agentic environment suite containing <strong>1,000 tool-use environments</strong> with <strong>10,000 tasks</strong> for large-scale RL training. Each environment is a fully functional MCP server with tools, database state, and verification logic.</p> <h2 class="relative group"><a id="quick-start" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#quick-start"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Quick Start</span></h2> <p data-svelte-h="svelte-1p6r28c">You can interact with the AWM environments at Huggingface Space : <a href="https://huggingface.co/spaces/ChilleD/agent_world_model_env" rel="nofollow">ChilleD/agent_world_model_env</a> 🤗.</p> <h3 class="relative group"><a id="1-start-the-server" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#1-start-the-server"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>1. Start the Server</span></h3> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class="language-bash "><!-- HTML_TAG_START --><span class="hljs-comment"># From the OpenEnv root directory</span> | |
| PYTHONPATH=src:envs uv run uvicorn envs.agent_world_model_env.server.app:app --host 0.0.0.0 --port 8899<!-- HTML_TAG_END --></pre></div> <h3 class="relative group"><a id="2-connect-with-the-client" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#2-connect-with-the-client"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>2. Connect with the Client</span></h3> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class="language-python "><!-- HTML_TAG_START --><span class="hljs-keyword">import</span> asyncio | |
| <span class="hljs-keyword">from</span> agent_world_model_env <span class="hljs-keyword">import</span> AWMEnv | |
| <span class="hljs-keyword">from</span> openenv.core.env_server.mcp_types <span class="hljs-keyword">import</span> CallToolAction, ListToolsAction | |
| <span class="hljs-keyword">async</span> <span class="hljs-keyword">def</span> <span class="hljs-title function_">main</span>(): | |
| <span class="hljs-keyword">async</span> <span class="hljs-keyword">with</span> AWMEnv(base_url=<span class="hljs-string">"http://localhost:8899"</span>) <span class="hljs-keyword">as</span> env: | |
| <span class="hljs-comment"># Reset to a scenario with a specific task</span> | |
| result = <span class="hljs-keyword">await</span> env.reset(scenario=<span class="hljs-string">"e_commerce_33"</span>, task_idx=<span class="hljs-number">0</span>) | |
| <span class="hljs-built_in">print</span>(<span class="hljs-string">f"Task: <span class="hljs-subst">{result.observation.task}</span>"</span>) | |
| <span class="hljs-built_in">print</span>(<span class="hljs-string">f"Tools available: <span class="hljs-subst">{result.observation.num_tools}</span>"</span>) | |
| <span class="hljs-built_in">print</span>(<span class="hljs-string">f"Verifier support: <span class="hljs-subst">{result.observation.has_verifier}</span>"</span>) <span class="hljs-comment"># {sql: True, code: True}</span> | |
| <span class="hljs-comment"># List available tools</span> | |
| tools = <span class="hljs-keyword">await</span> env.list_tools() | |
| <span class="hljs-keyword">for</span> tool <span class="hljs-keyword">in</span> tools[:<span class="hljs-number">3</span>]: | |
| <span class="hljs-built_in">print</span>(<span class="hljs-string">f" - <span class="hljs-subst">{tool.name}</span>: <span class="hljs-subst">{tool.description}</span>"</span>) | |
| <span class="hljs-comment"># Call a tool</span> | |
| obs = <span class="hljs-keyword">await</span> env.call_tool(<span class="hljs-string">"search_products"</span>, query=<span class="hljs-string">"headphones"</span>) | |
| <span class="hljs-built_in">print</span>(<span class="hljs-string">f"Result: <span class="hljs-subst">{obs.tool_result}</span>"</span>) | |
| <span class="hljs-comment"># Run verification (can be called multiple times with different modes)</span> | |
| result = <span class="hljs-keyword">await</span> env.step(CallToolAction( | |
| tool_name=<span class="hljs-string">"verify"</span>, | |
| arguments={<span class="hljs-string">"verifier_mode"</span>: <span class="hljs-string">"code"</span>, <span class="hljs-string">"final_answer"</span>: <span class="hljs-string">"optional answer"</span>} | |
| )) | |
| <span class="hljs-built_in">print</span>(<span class="hljs-string">f"Reward type: <span class="hljs-subst">{result.observation.reward_type}</span>"</span>) | |
| <span class="hljs-built_in">print</span>(<span class="hljs-string">f"Reward: <span class="hljs-subst">{result.reward}</span>"</span>) | |
| <span class="hljs-built_in">print</span>(<span class="hljs-string">f"Verify result: <span class="hljs-subst">{result.observation.verify_result}</span>"</span>) | |
| <span class="hljs-comment"># End episode (destroys subprocess; set keep_session=True to preserve files)</span> | |
| result = <span class="hljs-keyword">await</span> env.step(CallToolAction(tool_name=<span class="hljs-string">"done"</span>, arguments={<span class="hljs-string">"keep_session"</span>: <span class="hljs-literal">False</span>})) | |
| <span class="hljs-built_in">print</span>(<span class="hljs-string">f"Episode done: <span class="hljs-subst">{result.done}</span>"</span>) | |
| asyncio.run(main())<!-- HTML_TAG_END --></pre></div> <h2 class="relative group"><a id="environment-details" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#environment-details"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Environment Details</span></h2> <h3 class="relative group"><a id="actions" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#actions"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Actions</span></h3> <p data-svelte-h="svelte-1fxezv8">AWM supports two action types:</p> <table data-svelte-h="svelte-1396cg1"><thead><tr><th>Action</th> <th>Description</th></tr></thead> <tbody><tr><td><code>ListToolsAction()</code></td> <td>List all available MCP tools for the current scenario</td></tr> <tr><td><code>CallToolAction(tool_name, arguments)</code></td> <td>Call a specific tool with arguments</td></tr></tbody></table> <p data-svelte-h="svelte-1d6sepr">Special tool names:</p> <ul data-svelte-h="svelte-1htijkg"><li><code>"verify"</code> - Run verifier with <code>{verifier_mode: "sql"|"code", final_answer: "optional"}</code> arguments</li> <li><code>"done"</code> - End the episode and destroy subprocess (does NOT run verifier)</li> <li><code>"__list_scenarios__"</code> - List all 1,000 available scenarios and their tasks</li></ul> <h3 class="relative group"><a id="observation-fields" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#observation-fields"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Observation Fields</span></h3> <table data-svelte-h="svelte-181esnc"><thead><tr><th>Field</th> <th>Type</th> <th>Description</th></tr></thead> <tbody><tr><td><code>reward</code></td> <td>float</td> <td>Reward value based on reward_type and config</td></tr> <tr><td><code>reward_type</code></td> <td>str</td> <td>Outcome classification (see below)</td></tr> <tr><td><code>scenario</code></td> <td>str</td> <td>Current scenario name</td></tr> <tr><td><code>task</code></td> <td>str</td> <td>Task description in natural language</td></tr> <tr><td><code>task_idx</code></td> <td>int</td> <td>Task index (0-9)</td></tr> <tr><td><code>has_verifier</code></td> <td>dict/None</td> <td>Verifier support: <code>{sql: bool, code: bool}</code> or None</td></tr> <tr><td><code>num_tools</code></td> <td>int</td> <td>Number of tools available</td></tr> <tr><td><code>tool_name</code></td> <td>str</td> <td>Name of the tool called</td></tr> <tr><td><code>tool_result</code></td> <td>Any</td> <td>Result from the tool call</td></tr> <tr><td><code>error</code></td> <td>str</td> <td>Error message if any</td></tr> <tr><td><code>verify_result</code></td> <td>dict</td> <td>Verification output after calling verify</td></tr> <tr><td><code>trajectory_path</code></td> <td>str</td> <td>Path to saved trajectory JSON (after <code>done</code>)</td></tr> <tr><td><code>session_dir</code></td> <td>str</td> <td>Path to session directory (only if <code>keep_session=True</code>)</td></tr></tbody></table> <h3 class="relative group"><a id="reward-types-and-values" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#reward-types-and-values"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Reward Types and Values</span></h3> <p data-svelte-h="svelte-bnrvhc">Default reward configuration:</p> <table data-svelte-h="svelte-1l3h4e8"><thead><tr><th>Type</th> <th>Reward</th> <th>Description</th></tr></thead> <tbody><tr><td><code>complete</code></td> <td>1.0</td> <td>Task completed successfully (verifier passed)</td></tr> <tr><td><code>incomplete</code></td> <td>0.1</td> <td>Task not completed (verifier failed)</td></tr> <tr><td><code>format_error</code></td> <td>-1.0</td> <td>Format error (maps from tool_not_found, invalid_args)</td></tr> <tr><td><code>tool_not_found</code></td> <td>-1.0</td> <td>Tool name not recognized</td></tr> <tr><td><code>invalid_args</code></td> <td>-1.0</td> <td>Tool arguments invalid</td></tr> <tr><td>Other types</td> <td>0.0</td> <td>server_error, timeout, etc.</td></tr></tbody></table> <p data-svelte-h="svelte-1q2lxpm">You can customize rewards at reset:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class="language-python "><!-- HTML_TAG_START -->result = <span class="hljs-keyword">await</span> env.reset( | |
| scenario=<span class="hljs-string">"e_commerce_33"</span>, | |
| task_idx=<span class="hljs-number">0</span>, | |
| reward_config={<span class="hljs-string">"complete"</span>: <span class="hljs-number">1.0</span>, <span class="hljs-string">"incomplete"</span>: <span class="hljs-number">0.0</span>, <span class="hljs-string">"format_error"</span>: <span class="hljs-number">0.0</span>} | |
| )<!-- HTML_TAG_END --></pre></div> <h2 class="relative group"><a id="session-artifacts" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#session-artifacts"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Session Artifacts</span></h2> <p data-svelte-h="svelte-u97iah">When calling <code>done(keep_session=True)</code>, the session directory is preserved with:</p> <table data-svelte-h="svelte-qnnb5q"><thead><tr><th>File</th> <th>Description</th></tr></thead> <tbody><tr><td><code>trajectory.json</code></td> <td>Full episode trajectory (scenario, task, steps, each action/result)</td></tr> <tr><td><code>{scenario}.db</code></td> <td>SQLite database after agent interaction (final state)</td></tr> <tr><td><code>{scenario}_initial.db</code></td> <td>SQLite database snapshot before agent interaction</td></tr> <tr><td><code>server.py</code></td> <td>Patched Python code for the launched environment</td></tr> <tr><td><code>server.log</code></td> <td>Launched environment uvicorn logs (startup + HTTP requests)</td></tr></tbody></table> <p data-svelte-h="svelte-lpdbik">When <code>keep_session=False</code> (default), all files are cleaned up after the episode.</p> <h2 class="relative group"><a id="verifier-modes" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#verifier-modes"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Verifier Modes</span></h2> <p data-svelte-h="svelte-1vtucz4">AWM supports two verification modes, selected when calling the <code>verify</code> tool:</p> <h3 class="relative group"><a id="code-mode-default-no-llm-needed" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#code-mode-default-no-llm-needed"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Code Mode (Default, no LLM needed)</span></h3> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class="language-python "><!-- HTML_TAG_START -->result = <span class="hljs-keyword">await</span> env.step(CallToolAction( | |
| tool_name=<span class="hljs-string">"verify"</span>, | |
| arguments={<span class="hljs-string">"verifier_mode"</span>: <span class="hljs-string">"code"</span>, <span class="hljs-string">"final_answer"</span>: <span class="hljs-string">"optional answer"</span>} | |
| ))<!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-100eohf">Executes a Python verifier function that compares initial and final database states. Deterministic and does not require LLM.</p> <h3 class="relative group"><a id="sql-mode-code-augmented-llm-as-a-judge" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#sql-mode-code-augmented-llm-as-a-judge"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>SQL Mode (code-augmented LLM-as-a-Judge)</span></h3> <p data-svelte-h="svelte-2ss3jc">This mode is recommended for judge performance. You need to set the LLM credentials via environment variables before using this mode.</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class="language-python "><!-- HTML_TAG_START --><span class="hljs-comment"># Set LLM credentials via environment variables</span> | |
| <span class="hljs-comment"># OPENENV_AWM_LLM_BASE_URL, OPENENV_AWM_LLM_API_KEY, OPENENV_AWM_LLM_MODEL</span> | |
| result = <span class="hljs-keyword">await</span> env.step(CallToolAction( | |
| tool_name=<span class="hljs-string">"verify"</span>, | |
| arguments={<span class="hljs-string">"verifier_mode"</span>: <span class="hljs-string">"sql"</span>} | |
| ))<!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-vxswv9">Runs SQL queries to extract state changes, then uses an LLM judge to determine success.</p> <h2 class="relative group"><a id="listing-scenarios--tasks" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#listing-scenarios--tasks"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Listing Scenarios & Tasks</span></h2> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class="language-python "><!-- HTML_TAG_START --><span class="hljs-keyword">async</span> <span class="hljs-keyword">with</span> AWMEnv(base_url=<span class="hljs-string">"http://localhost:8899"</span>) <span class="hljs-keyword">as</span> env: | |
| <span class="hljs-comment"># List all 1,000 scenarios</span> | |
| result = <span class="hljs-keyword">await</span> env.step(CallToolAction(tool_name=<span class="hljs-string">"__list_scenarios__"</span>, arguments={})) | |
| <span class="hljs-built_in">print</span>(<span class="hljs-string">f"Total scenarios: <span class="hljs-subst">{result.observation.total}</span>"</span>) | |
| <span class="hljs-keyword">for</span> scenario <span class="hljs-keyword">in</span> result.observation.scenarios[:<span class="hljs-number">5</span>]: | |
| <span class="hljs-built_in">print</span>(<span class="hljs-string">f" - <span class="hljs-subst">{scenario[<span class="hljs-string">'name'</span>]}</span>: <span class="hljs-subst">{scenario[<span class="hljs-string">'num_tasks'</span>]}</span> tasks"</span>) | |
| <span class="hljs-built_in">print</span>(<span class="hljs-string">f" Sample task: <span class="hljs-subst">{scenario[<span class="hljs-string">'tasks'</span>][<span class="hljs-number">0</span>][:<span class="hljs-number">80</span>]}</span>..."</span>)<!-- HTML_TAG_END --></pre></div> <h2 class="relative group"><a id="server-monitoring" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#server-monitoring"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Server Monitoring</span></h2> <p data-svelte-h="svelte-d2ypcg">The server exposes a <code>/stats</code> endpoint for monitoring active sessions:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class="language-bash "><!-- HTML_TAG_START -->curl http://localhost:8899/stats<!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-gqamzt">Returns: <code>total_sessions</code>, <code>max_idle_time_config</code>, <code>cleanup_interval_config</code>, <code>scenarios</code> breakdown, and <code>max_idle_s</code>.</p> <p data-svelte-h="svelte-1tgdpf3">A background cleanup daemon automatically kills sessions idle longer than <code>MAX_IDLE_TIME</code> (default 600s) when total sessions exceed <code>ALLOWED_IDLE_SESSIONS</code> (default 3000).</p> <h2 class="relative group"><a id="full-agent-interaction-example" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#full-agent-interaction-example"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Full Agent Interaction Example</span></h2> <p data-svelte-h="svelte-1hhlrce">See <a href="../../examples/agent_world_model/example_usage.py"><code>examples/agent_world_model/example_usage.py</code></a> for a complete example of an LLM-powered agent that:</p> <ol data-svelte-h="svelte-sahtzr"><li>Discovers available tools via <code>list_tools</code></li> <li>Iteratively calls tools to accomplish the task</li> <li>Runs verification via <code>verify</code> tool (can use “sql” or “code” mode)</li> <li>Ends episode via <code>done</code> action with <code>keep_session=True</code> to inspect artifacts</li></ol> <p data-svelte-h="svelte-1viw3ys">The example supports both a local server and the public Hugging Face Space, set <code>AWM_BASE_URL=https://chilled-agent-world-model-env.hf.space</code> (may be slow) to try without local setup.</p> <h2 class="relative group"><a id="large-scale-rl-training" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#large-scale-rl-training"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Large-Scale RL Training</span></h2> <p data-svelte-h="svelte-dyf6v">AWM is designed for large-scale agentic RL. A single server supports thousands of concurrent WebSocket sessions, each with its own isolated environment subprocess.</p> <h3 class="relative group"><a id="simulated-stress-test" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#simulated-stress-test"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Simulated Stress Test</span></h3> <p data-svelte-h="svelte-1p5ov40">A stress test simulating large-scale RL is included:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class="language-bash "><!-- HTML_TAG_START --><span class="hljs-comment"># after server started, then in another terminal:</span> | |
| PYTHONPATH=src:envs uv run python examples/agent_world_model/example_stress_test.py \ | |
| --scale 1024 --concurrency 64 --min-turns 3 --max-turns 20 \ | |
| --think-min 3.0 --think-max 30.0<!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-1r1irno">This launches 1024 parallel episodes, each with 3-20 multi-turn tool interactions and 3-30s simulated LLM rollout time per turn.</p> <h2 class="relative group"><a id="awm-server-configuration" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#awm-server-configuration"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>AWM Server Configuration</span></h2> <p data-svelte-h="svelte-iykpvl">Server configuration is in <code>server/config.py</code>, overridable via environment variables:</p> <table data-svelte-h="svelte-hc75ky"><thead><tr><th>Config</th> <th>Default</th> <th>Env Var</th> <th>Description</th></tr></thead> <tbody><tr><td><code>MAX_CONCURRENT_ENVS</code></td> <td>10000</td> <td>—</td> <td>Max WebSocket sessions</td></tr> <tr><td><code>READY_TIMEOUT</code></td> <td>180s</td> <td><code>OPENENV_AWM_READY_TIMEOUT</code></td> <td>Subprocess startup timeout</td></tr> <tr><td><code>MAX_PORT_RETRIES</code></td> <td>5</td> <td><code>OPENENV_AWM_MAX_PORT_RETRIES</code></td> <td>Port-retry attempts on startup failure</td></tr> <tr><td><code>RETRY_READY_TIMEOUT</code></td> <td>30s</td> <td><code>OPENENV_AWM_RETRY_READY_TIMEOUT</code></td> <td>Shorter timeout for retry attempts</td></tr> <tr><td><code>READY_POLL_INTERVAL</code></td> <td>0.5s</td> <td>—</td> <td>Polling interval during startup check</td></tr> <tr><td><code>MAX_IDLE_TIME</code></td> <td>600s</td> <td><code>OPENENV_AWM_MAX_IDLE_TIME</code></td> <td>Idle session cleanup threshold</td></tr> <tr><td><code>ALLOWED_IDLE_SESSIONS</code></td> <td>3000</td> <td><code>OPENENV_AWM_ALLOWED_IDLE_SESSIONS</code></td> <td>Session count before idle cleanup triggers</td></tr> <tr><td><code>CLEANUP_INTERVAL</code></td> <td>5s</td> <td><code>OPENENV_AWM_CLEANUP_INTERVAL</code></td> <td>Cleanup daemon scan interval</td></tr></tbody></table> <h2 class="relative group"><a id="warning" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#warning"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Warning</span></h2> <p data-svelte-h="svelte-ul7lbf">AWM treats verifier code and scenario code from the curated <a href="https://huggingface.co/datasets/Snowflake/AgentWorldModel-1K" rel="nofollow">AgentWorldModel-1K</a> dataset as <strong>trusted</strong>. Verifier code (<code>server/_verifier_runner.py</code>) is run in a subprocess sandbox (rlimits, restricted builtins, import allowlist); scenario subprocesses run without per-process sandboxing and rely on the container as the outer isolation boundary. The codes are synthetically generated and carefully curated, however, there is no guarantee of absolute safety. We recommend only academic research use.</p> <h2 class="relative group"><a id="citation" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#citation"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Citation</span></h2> <p data-svelte-h="svelte-1q56mmn">More details can be found at:</p> <table data-svelte-h="svelte-15yibf0"><thead><tr><th>Resource</th> <th>Link</th></tr></thead> <tbody><tr><td>Hugging Face Space</td> <td><a href="https://huggingface.co/spaces/ChilleD/agent_world_model_env" rel="nofollow">ChilleD/agent_world_model_env</a></td></tr> <tr><td>Paper</td> <td><a href="https://arxiv.org/abs/2602.10090" rel="nofollow">arxiv.org/abs/2602.10090</a></td></tr> <tr><td>Synthesis Pipeline Code</td> <td><a href="https://github.com/Snowflake-Labs/agent-world-model" rel="nofollow">Snowflake-Labs/agent-world-model</a></td></tr> <tr><td>AgentWorldModel-1K</td> <td><a href="https://huggingface.co/datasets/Snowflake/AgentWorldModel-1K" rel="nofollow">Snowflake/AgentWorldModel-1K</a></td></tr> <tr><td>Arctic-AWM-4B</td> <td><a href="https://huggingface.co/Snowflake/Arctic-AWM-4B" rel="nofollow">Snowflake/Arctic-AWM-4B</a></td></tr> <tr><td>Arctic-AWM-8B</td> <td><a href="https://huggingface.co/Snowflake/Arctic-AWM-8B" rel="nofollow">Snowflake/Arctic-AWM-8B</a></td></tr> <tr><td>Arctic-AWM-14B</td> <td><a href="https://huggingface.co/Snowflake/Arctic-AWM-14B" rel="nofollow">Snowflake/Arctic-AWM-14B</a></td></tr></tbody></table> <p data-svelte-h="svelte-cvqvus">If you find this work useful, please kindly cite:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class="language-bibtex "><!-- HTML_TAG_START --><span class="hljs-comment">@article{wang2026agentworldmodelinfinity,</span> | |
| title={Agent World Model: Infinity Synthetic Environments for Agentic Reinforcement Learning}, | |
| author={Zhaoyang Wang <span class="hljs-keyword">and</span> Canwen Xu <span class="hljs-keyword">and</span> Boyi Liu <span class="hljs-keyword">and</span> Yite Wang <span class="hljs-keyword">and</span> Siwei Han <span class="hljs-keyword">and</span> Zhewei Yao <span class="hljs-keyword">and</span> Huaxiu Yao <span class="hljs-keyword">and</span> Yuxiong He}, | |
| year={<span class="hljs-number">2026</span>}, | |
| eprint={<span class="hljs-number">2602</span>.<span class="hljs-number">10090</span>}, | |
| archivePrefix={arXiv}, | |
| primaryClass={cs.AI}, | |
| url={https:<span class="hljs-comment">//arxiv.org/abs/2602.10090},</span> | |
| }<!-- HTML_TAG_END --></pre></div> <a class="!text-gray-400 !no-underline text-sm flex items-center not-prose mt-4" href="https://github.com/huggingface/openenv/blob/main/docs/source/environments/agent_world_model.md" target="_blank"><svg class="mr-1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M31,16l-7,7l-1.41-1.41L28.17,16l-5.58-5.59L24,9l7,7z"></path><path d="M1,16l7-7l1.41,1.41L3.83,16l5.58,5.59L8,23l-7-7z"></path><path d="M12.419,25.484L17.639,6.552l1.932,0.518L14.351,26.002z"></path></svg> <span data-svelte-h="svelte-zjs2n5"><span class="underline">Update</span> on GitHub</span></a> <p></p> | |
| <script> | |
| { | |
| __sveltekit_1l28dw0 = { | |
| assets: "/docs/openenv/pr_813/en", | |
| base: "/docs/openenv/pr_813/en", | |
| env: {} | |
| }; | |
| const element = document.currentScript.parentElement; | |
| const data = [null,null]; | |
| Promise.all([ | |
| import("/docs/openenv/pr_813/en/_app/immutable/entry/start.9c9d6cdf.js"), | |
| import("/docs/openenv/pr_813/en/_app/immutable/entry/app.b8b7485a.js") | |
| ]).then(([kit, app]) => { | |
| kit.start(app, element, { | |
| node_ids: [0, 4], | |
| data, | |
| form: null, | |
| error: null | |
| }); | |
| }); | |
| } | |
| </script> | |
Xet Storage Details
- Size:
- 61.7 kB
- Xet hash:
- 9aa278c9d95b5528c245d8ad57e13dcc7f657735e4bdebe68fb32cf2d5c65c2a
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.