feat: Gymnasium style base environment#1072
Merged
Conversation
## Summary
- Align `docs/resources-server/gymnasium-api.md` with the existing docs
style guide patterns
## Changes
- Add back navigation button and `---` horizontal rule separators
between sections (matches all other doc pages)
- Add cross-references to related docs (`{doc}` links to single-step
tutorial, multi-step tutorial, LLM-as-judge)
- Add `:::{tip}` directive pointing readers to the standard
`SimpleResourcesServer` tutorials
- Fix `_extract_text` → `extract_text` to match the actual export from
`resources_servers.base_gymnasium`
- Fix typo: "initial the environment" → "initialize the environment"
- Fix hyphenation: "non agentic" → "non-agentic"
- Fix double dash `--` → em-dash `—` in Examples section
- Add GitHub source link for blackjack example (matches other doc pages)
- Fix typo "Gymansium" → "Gymnasium" in `gymnasium_agent/README.md`
## Test plan
- [ ] Verify doc builds without broken references (`{doc}` and `{ref}`
links)
- [ ] Visual check that section separators and back button render
correctly
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Signed-off-by: Lawrence Lane <llane@nvidia.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This was referenced Apr 17, 2026
cmunley1
commented
Apr 17, 2026
Signed-off-by: cmunley1 <cmunley@nvidia.com>
# Conflicts: # README.md
…arse stricter, validate max steps, more tests Signed-off-by: cmunley1 <cmunley@nvidia.com>
Signed-off-by: cmunley1 <cmunley@nvidia.com>
Signed-off-by: cmunley1 <cmunley@nvidia.com> # Conflicts: # README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#1030
Gymnasium-style
step()/reset()API implemented as a base resources server, with a simple compatible agent to drive the agent-environment interaction in this context, and an example blackjack resources server extending the base class.resources_servers/base_gymnasium/hasGymnasiumServerbase class. Meant to be subclassed, implementstep()and optionallyreset(), use withgymnasium_agent. Reset is used to init state or provide an additional initial message. Step handles verification, multistep logic, and stopping logic.The base class handles
/resetand/stependpoints, session IDs, and the HTTP layer.responses_api_agents/gymnasium_agent/drives the loop: calls/reset, then alternates between model calls and/stepuntil terminated or truncated. Handles token ids, usage, cookiesExamples
blackjack_env- multi-step game,<action>tags, statefulRemoved multi-turn examples for follow up PR.
Docs
docs/resources-server/gymnasium-api.mdcovers usage and examples.Impact on existing environments
Nothing existing changed.
example_gymnasium+gymnasium_agentis a simpler way to write environments. It hides the HTTP endpoints, session management, and request/response types. Users just implementstep(). Existing resources servers + agents path still works as before.