Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
b4017d5
feat(agents): RemoteAgent — thin proxy server for user-hosted remote …
adil-a Jul 28, 2026
33837c0
refactor(remote_agent): tools_mode enum, review-thread cleanups
adil-a Jul 28, 2026
47ac9a9
docs: add Drive a Remote Agent page
adil-a Jul 28, 2026
ee78705
fix: docs corrections, 0.0.0.0 advertise warning, debug-knob parity
adil-a Jul 29, 2026
5b446d3
docs: fix step numbering in remote_agent flow diagram
adil-a Jul 29, 2026
68dcaa0
docs: expand when to use tools_mode refuse; drop follow-up promise fr…
adil-a Jul 29, 2026
ef6b635
docs: reword off-host warning; a new feature has no classic mistakes yet
adil-a Jul 29, 2026
3f6cf45
docs: correct redirect claim; 307/308 preserve the POST body, 301/302…
adil-a Jul 29, 2026
08376e0
docs: explain reused-rollout-files gotcha in plain terms
adil-a Jul 29, 2026
6406e50
docs: drop num_samples_in_parallel/concurrency stacking gotcha
adil-a Jul 29, 2026
2a4abb2
docs: scope proxy claim to env-var-configured proxies
adil-a Jul 29, 2026
1fdc6d4
ci: satisfy ruff-format and allowlist test-fixture credentials for se…
adil-a Jul 29, 2026
97d019b
refactor!: Gym drives the tool loop; resources server no longer expos…
adil-a Jul 29, 2026
9a0bf2c
chore: align remote_agent.yaml with the loop architecture (drop tools…
adil-a Jul 29, 2026
4105a08
docs: rewrite remote_agent docs for the Gym-driven loop; explicit use…
adil-a Jul 29, 2026
8990b94
docs: runnable quickstart — counter-env service, as-run config, expec…
adil-a Jul 30, 2026
4442f97
docs: external agent_base_url in quickstart; fix four audit imprecisions
adil-a Jul 30, 2026
2ddb865
docs: label the quickstart regex as the toy stand-in for the agent's …
adil-a Jul 30, 2026
797ea4d
docs: Claude-CLI quickstart (self-contained, execution-verified); two…
adil-a Jul 30, 2026
275ea0b
docs: note claude -p tool defaults and internal multi-step in the qui…
adil-a Jul 30, 2026
5c9d446
docs: split quickstart run commands into per-terminal blocks
adil-a Jul 30, 2026
97280de
style: strip provenance and narration comments from remote_agent app.py
adil-a Jul 30, 2026
f66c1db
docs: show the service's own model and tools in the flow diagram
adil-a Jul 30, 2026
c0162c1
docs: name the service contract as OpenAI /v1/responses-compliant in …
adil-a Jul 30, 2026
1502281
docs: reframe as a composition of Responses-compliant agents per review
adil-a Jul 30, 2026
a6f9214
Merge branch 'main' into remote-agent
adil-a Jul 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions responses_api_agents/remote_agent/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Remote Agent

A thin agent server that brokers rollouts to an agent service you host yourself — in your own
repo, on your own infrastructure. Your service implements one endpoint, `POST /v1/responses`:
it receives the task's `responses_create_params`, runs its own agent loop (its own model and
tools, however many turns it needs), and returns one finished Responses API trajectory.

Gym keeps everything else on its side: this server seeds the session, holds the session
cookies, verifies the trajectory on the resources server (`verifier_metadata` never leaves
Gym), and reports the verify response — so your rollouts land in the standard artifacts and
work with `gym eval profile`, aggregation, and (when your service routes its model calls
through a Gym model server) token-id capture for training.

## Contract for your service

- `POST {agent_base_url}/v1/responses` with the row's `responses_create_params` as the JSON body.
- Return a single finished Responses API object: the last output item is an assistant message,
no dangling tool calls, `usage` populated (`{input_tokens, output_tokens, total_tokens}`).
- Failures on Gym's side never crash a collection run: they are recorded as reward-0 rows in
the failures sidecar and retried on resume.

## Gym-hosted tools (optional)

With `forward_session: true`, each request to your service carries two headers:
`X-NeMo-Gym-Resources-Server-Url` and `X-NeMo-Gym-Session-Cookie`. Echo the cookie on every
tool call you make against that URL and stateful environments work end to end. If your service
runs on a different machine, set `advertised_resources_url` to an externally reachable URL —
the default resolves to the resources server's bind address, which is typically a loopback
address only valid on the Gym host. Without
forwarding, tasks that declare tools are refused up front (instead of silently scoring 0)
unless you set `assume_remote_tools: true` because your service implements the declared tools
itself.

## Run

```bash
gym env start --resources-server <your_env> # plus this agent's config
gym eval run --no-serve +agent_name=remote_agent +input_jsonl_fpath=... +output_jsonl_fpath=...
```
Empty file.
427 changes: 427 additions & 0 deletions responses_api_agents/remote_agent/app.py

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions responses_api_agents/remote_agent/configs/remote_agent.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
remote_agent:
responses_api_agents:
remote_agent:
entrypoint: app.py
agent_base_url: ???
resources_server:
type: resources_servers
name: ???
concurrency: 32
remote_responses_timeout_secs: 1800.0
run_timeout_secs: 2100.0
forward_session: false
assume_remote_tools: false
1 change: 1 addition & 0 deletions responses_api_agents/remote_agent/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-e nemo-gym[dev] @ ../../
Empty file.
Loading
Loading