Buckets:

download
raw
28 kB
<meta charset="utf-8" /><meta name="hf:doc:metadata" content="{&quot;title&quot;:&quot;Calendar Environment&quot;,&quot;local&quot;:&quot;calendar-environment&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;Server Setup&quot;,&quot;local&quot;:&quot;server-setup&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;Docker (Recommended)&quot;,&quot;local&quot;:&quot;docker-recommended&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;Without Docker&quot;,&quot;local&quot;:&quot;without-docker&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3}],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Quick Start&quot;,&quot;local&quot;:&quot;quick-start&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Tools&quot;,&quot;local&quot;:&quot;tools&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Reward&quot;,&quot;local&quot;:&quot;reward&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Scenario Benchmark&quot;,&quot;local&quot;:&quot;scenario-benchmark&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2}],&quot;depth&quot;:1}"/>
<link href="/docs/openenv/main/en/_app/immutable/entry/start.D7897gYC.js" rel="modulepreload">
<link href="/docs/openenv/main/en/_app/immutable/chunks/CIuctm9a.js" rel="modulepreload">
<link href="/docs/openenv/main/en/_app/immutable/chunks/CkB8YxkR.js" rel="modulepreload">
<link href="/docs/openenv/main/en/_app/immutable/entry/app.DEcMydco.js" rel="modulepreload">
<link href="/docs/openenv/main/en/_app/immutable/chunks/DSBQ3IWM.js" rel="modulepreload">
<link href="/docs/openenv/main/en/_app/immutable/chunks/Cs50_Xpk.js" rel="modulepreload">
<link href="/docs/openenv/main/en/_app/immutable/chunks/DsnmJJEf.js" rel="modulepreload">
<link href="/docs/openenv/main/en/_app/immutable/chunks/BJRjUCyW.js" rel="modulepreload">
<link href="/docs/openenv/main/en/_app/immutable/nodes/0.r69jlE9K.js" rel="modulepreload">
<link href="/docs/openenv/main/en/_app/immutable/nodes/2.PpB8VKHH.js" rel="modulepreload">
<link href="/docs/openenv/main/en/_app/immutable/chunks/D52I3jXE.js" rel="modulepreload">
<!--1wrq41y--><meta name="hf:doc:metadata" content="{&quot;title&quot;:&quot;Calendar Environment&quot;,&quot;local&quot;:&quot;calendar-environment&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;Server Setup&quot;,&quot;local&quot;:&quot;server-setup&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;Docker (Recommended)&quot;,&quot;local&quot;:&quot;docker-recommended&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;Without Docker&quot;,&quot;local&quot;:&quot;without-docker&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3}],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Quick Start&quot;,&quot;local&quot;:&quot;quick-start&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Tools&quot;,&quot;local&quot;:&quot;tools&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Reward&quot;,&quot;local&quot;:&quot;reward&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Scenario Benchmark&quot;,&quot;local&quot;:&quot;scenario-benchmark&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2}],&quot;depth&quot;:1}"/><!---->
<link href="/docs/openenv/main/en/_app/immutable/assets/0.tn0RQdqM.css" rel="modulepreload"> <!--[--><!--[0--><!--[--><!--[0--><!--[--><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> <!--[-1--><!--]--></div><!----> <!--[0--><h1 class="relative group"><a id="calendar-environment" 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="#calendar-environment"><span><svg 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>Calendar Environment</span></h1><!--]--><!----> <p>A simulated Google Calendar with multiple users, calendars and events, exposed as 37 MCP tools through the OpenEnv <code>reset</code>/<code>step</code>/<code>state</code> interface. Each episode runs against a SQLite database that you seed with SQL, and task completion is checked with SQL queries on that database.</p> <!--[1--><h2 class="relative group"><a id="server-setup" 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-setup"><span><svg 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 Setup</span></h2><!--]--><!----> <!--[2--><h3 class="relative group"><a id="docker-recommended" 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="#docker-recommended"><span><svg 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>Docker (Recommended)</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 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 "><!----><span class="hljs-built_in">cd</span> envs/calendar_env
docker build -t calendar-env:latest .
docker run --<span class="hljs-built_in">rm</span> -p 8004:8004 calendar-env:latest
curl http://localhost:8004/health <span class="hljs-comment"># {&quot;status&quot;:&quot;healthy&quot;,&quot;service&quot;:&quot;calendar-env&quot;}</span><!----></pre></div><!----> <!--[2--><h3 class="relative group"><a id="without-docker" 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="#without-docker"><span><svg 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>Without Docker</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 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 "><!----><span class="hljs-built_in">cd</span> envs/calendar_env
pip install -r requirements.txt
uvicorn server.app:app --host 0.0.0.0 --port 8004<!----></pre></div><!----> <p>The tools call the server’s own REST API at <code>http://localhost:$API_PORT</code> (default <code>8004</code>). If you serve on another port, set <code>API_PORT</code> to match.</p> <!--[1--><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 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><code>CalendarEnv</code> is an HTTP client. Every request carries the database ID (<code>x-database-id</code>) and the acting user’s access token (<code>x-access-token</code>). The tokens are the <code>static_token</code> values of the seeded users.</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 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 "><!----><span class="hljs-keyword">from</span> calendar_env <span class="hljs-keyword">import</span> CalendarEnv
<span class="hljs-comment"># Alice&#x27;s token from the seeded demo users (server/data/multi_user_sample.py), not a real credential.</span>
ALICE_TOKEN = <span class="hljs-string">&quot;ya29.A0ARrdaM-k9Vq7GzY2pL4mQf8sN1xT0bR3uHcJWv5yKzP6eF2.qwErTyUIopASDfGhJkLzXcVbNm12_34-56&quot;</span>
<span class="hljs-keyword">with</span> CalendarEnv(base_url=<span class="hljs-string">&quot;http://localhost:8004&quot;</span>, database_id=<span class="hljs-string">&quot;demo&quot;</span>, access_token=ALICE_TOKEN) <span class="hljs-keyword">as</span> env:
<span class="hljs-comment"># Reset the database and seed it with the built-in sample data (4 users)</span>
env.reset(sql_content=env.get_sample_sql())
tools = env.list_tools()
<span class="hljs-built_in">print</span>(<span class="hljs-built_in">len</span>(tools)) <span class="hljs-comment"># 37</span>
obs = env.call_tool(<span class="hljs-string">&quot;create_event&quot;</span>, {
<span class="hljs-string">&quot;calendarId&quot;</span>: <span class="hljs-string">&quot;alice-primary&quot;</span>,
<span class="hljs-string">&quot;summary&quot;</span>: <span class="hljs-string">&quot;Team sync&quot;</span>,
<span class="hljs-string">&quot;start&quot;</span>: {<span class="hljs-string">&quot;dateTime&quot;</span>: <span class="hljs-string">&quot;2026-10-09T10:00:00Z&quot;</span>},
<span class="hljs-string">&quot;end&quot;</span>: {<span class="hljs-string">&quot;dateTime&quot;</span>: <span class="hljs-string">&quot;2026-10-09T10:30:00Z&quot;</span>},
})
<span class="hljs-built_in">print</span>(obs.success, obs.reward) <span class="hljs-comment"># True 1.0</span>
<span class="hljs-comment"># Check the outcome with SQL</span>
state = env.state(verify_queries=[<span class="hljs-string">&quot;SELECT COUNT(*) AS n FROM events WHERE summary = &#x27;Team sync&#x27;&quot;</span>])
<span class="hljs-built_in">print</span>(state[<span class="hljs-string">&quot;verification_results&quot;</span>][<span class="hljs-number">0</span>][<span class="hljs-string">&quot;result&quot;</span>]) <span class="hljs-comment"># [{&#x27;n&#x27;: 1}]</span><!----></pre></div><!----> <p><code>reset(sql_content=...)</code> (or <code>reset_with_sql_file(path)</code>) resets the database to a clean state and runs the SQL. <code>step()</code> takes a <code>CalendarAction</code> with <code>action_type="ListToolsAction"</code> or <code>action_type="ToolCallAction"</code> plus <code>tool_name</code> and <code>arguments</code>. <code>list_tools()</code> and <code>call_tool()</code> wrap it.</p> <!--[1--><h2 class="relative group"><a id="tools" 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="#tools"><span><svg 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>Tools</span></h2><!--]--><!----> <p>The tools follow the Google Calendar API v3:</p> <table><thead><tr><th>Group</th><th>Tools</th></tr></thead><tbody><tr><td>Events</td><td><code>list_events</code>, <code>get_event</code>, <code>create_event</code>, <code>update_event</code>, <code>patch_event</code>, <code>delete_event</code>, <code>move_event</code>, <code>quick_add_event</code>, <code>import_event</code>, <code>get_event_instances</code>, <code>watch_events</code></td></tr><tr><td>Calendars</td><td><code>create_calendar</code>, <code>get_calendar</code>, <code>update_calendar</code>, <code>patch_calendar</code>, <code>delete_calendar</code>, <code>clear_calendar</code></td></tr><tr><td>Calendar list</td><td><code>get_calendar_list</code>, <code>get_calendar_from_list</code>, <code>add_calendar_to_list</code>, <code>update_calendar_in_list</code>, <code>replace_calendar_in_list</code>, <code>remove_calendar_from_list</code>, <code>watch_calendar_list</code></td></tr><tr><td>Access control</td><td><code>list_acl_rules</code>, <code>get_acl_rule</code>, <code>insert_acl_rule</code>, <code>update_acl_rule</code>, <code>patch_acl_rule</code>, <code>delete_acl_rule</code>, <code>watch_acl</code></td></tr><tr><td>Settings</td><td><code>get_settings</code>, <code>list_settings</code>, <code>watch_settings</code></td></tr><tr><td>Other</td><td><code>get_colors</code>, <code>query_freebusy</code>, <code>get_user_by_email</code></td></tr></tbody></table> <p><code>list_tools()</code> returns each tool’s name, description and JSON input schema.</p> <!--[1--><h2 class="relative group"><a id="reward" 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"><span><svg 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</span></h2><!--]--><!----> <p>Each step returns a shaped reward:</p> <table><thead><tr><th>Outcome</th><th>Reward</th></tr></thead><tbody><tr><td><code>ListToolsAction</code></td><td>+0.1</td></tr><tr><td>Tool call with a 2xx status</td><td>+1.0</td></tr><tr><td>Tool call that succeeds without a status code</td><td>+0.5</td></tr><tr><td>Tool result with an <code>error</code> key or a 4xx/5xx status</td><td>-0.5</td></tr><tr><td>Unknown tool</td><td>-0.5</td></tr><tr><td>Missing <code>tool_name</code>, invalid access token or tool execution failure</td><td>-1.0</td></tr></tbody></table> <p>Episodes never end on their own (<code>done</code> is always <code>False</code>). Task success is measured separately, by running SQL checks on the database through <code>state(verify_queries=[...])</code>.</p> <!--[1--><h2 class="relative group"><a id="scenario-benchmark" 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="#scenario-benchmark"><span><svg 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>Scenario Benchmark</span></h2><!--]--><!----> <p><code>client.py</code> also runs an LLM agent on a scenario and verifies the result. Set the model’s API key (<code>llm_api_key</code> in the config, or <code>OPENAI_API_KEY</code>, <code>ANTHROPIC_API_KEY</code>, <code>GOOGLE_API_KEY</code>), then:</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 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 "><!---->python client.py --scenario scenario_config.json<!----></pre></div><!----> <p>The results (tool calls, verifier outcomes) go to <code>response_output/</code>. The main fields of <code>scenario_config.json</code>:</p> <ul><li><code>llm_provider</code> (<code>openai</code>, <code>anthropic</code> or <code>google</code>), <code>llm_model</code>, <code>llm_api_key</code></li> <li><code>user_prompt</code>, <code>system_prompt</code>: the task and the agent’s instructions</li> <li><code>context</code>: request headers for the acting user, such as <code>x-access-token</code></li> <li><code>seed_database_file</code>: SQL file to seed the database</li> <li><code>verifiers</code>: checks run after the agent finishes. <code>database_state</code> compares a SQL query result with an expected value (<code>equals</code>, <code>greater_than</code>, <code>less_than</code>, <code>contains</code>), <code>response_check</code> asks an LLM to judge a SQL result, and <code>tool_execution</code> checks that the expected tools were called.</li> <li><code>expected_tools</code>: tools the agent should use</li></ul> <p>For interactive evaluation, see the <a href="https://github.com/huggingface/OpenEnv/blob/main/envs/calendar_env/client_notebooks/OpenEnv_and_mcp_Single_Gym_Client_Meta_Turing.ipynb" rel="nofollow">notebook</a>.</p> <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/calendar.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><span class="underline">Update</span> on GitHub</span></a><!----> <p></p><!--]--><!----><!--]--><!--]--><!--]--> <!--[-1--><!--]--><!--]-->
<script>
{
__sveltekit_z3ymrf = {
base: "/docs/openenv/main/en",
assets: "/docs/openenv/main/en"
};
const element = document.currentScript.parentElement;
Promise.all([
import("/docs/openenv/main/en/_app/immutable/entry/start.D7897gYC.js"),
import("/docs/openenv/main/en/_app/immutable/entry/app.DEcMydco.js")
]).then(([kit, app]) => {
kit.start(app, element, {
node_ids: [0, 2],
data: [null,null],
form: null,
error: null
});
});
}
</script>

Xet Storage Details

Size:
28 kB
·
Xet hash:
ec2bea5c32a28c177e9cdb4ee3b5d7d2f0252c74a793a245b252fc4db7eb466d

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.