Closed-loop simulation for full-duplex voice agents面向全双工语音智能体的闭环仿真环境
InteractionGymTo train your voice agent.训练你的语音智能体
Simulated users that hear your agent and react, on one reproducible clock. Use it to evaluate, to generate rollouts, and to train with online RL.
模拟用户听得见你的智能体并做出反应,一切运行在同一个可复现的时钟上。可用于评测、生成 rollout,以及在线强化学习训练。
git clone https://github.com/williamLyh/InteractionGym && cd InteractionGym && uv sync—
—
One environment, from evaluation to training
同一个环境,从评测到训练
Users that answer, interrupt, backchannel, pause and talk to others, with voices, noise and tools that take time.
用户会回答、打断、附和、停顿、和旁人说话;有音色、环境噪声,以及需要时间的工具调用。
Run benchmarks open loop (replayed) and closed loop (a user that reacts) from the same start. Every user turn gets a timed score.
同一个开头,分别跑开环(回放)和闭环(会反应的用户)。每个用户回合都有带时间的分数。
Seeded episodes, faster than real time, in parallel. Fork an episode into branches from the same state for group rollouts.
可设种子、快于实时、大规模并行。可以从同一状态把一局分叉成多条分支,用于分组 rollout。
Scores are rewards in [0, 1], stamped with time and turn, so credit goes to the moment that earned it.
分数即奖励,范围 [0, 1],带时间和回合编号,奖励可以归到对应的时刻。
A small kernel. Everything else is a plugin.
内核很小,其余都是插件
Change one row for one experiment.
为一次实验改一行配置。
A benchmark or a training setup, written as YAML.
一个 benchmark 或一套训练配置,用 YAML 写成。
Built in, or from your own package.
内置,或来自你自己的包。
Simulated clock, streams, trajectory format.
模拟时钟、数据流、轨迹格式。
Users, behaviours, agents, model backends, tools, tasks, scorers and drivers are all plugins. Any role can be the one under test, and every episode records the full configuration that produced it.
用户、行为、智能体、模型后端、工具、任务、评分器和运行方式都是插件。任何角色都可以作为被评测方;每一局都会记录生成它的完整配置。
Plug in tool environments and procedures
接入工具环境与业务流程
Tool environments
工具环境
Python functions, an API or an existing benchmark become tools through one adapter. Calls take simulated time, and the world state forks with the episode.
Python 函数、API 或现有 benchmark,都通过一个适配器变成工具。调用需要模拟时间,世界状态随对话一起分叉。
SOP policies
SOP 业务流程
Write a procedure once. The agent reads it in the format you choose, and the call is judged against the tree.
流程只写一次。智能体以你选择的格式读取它,通话结束后按流程树评判。
Serving推理服务
- vLLM-Omni full-duplex全双工
- vLLM
- OpenAI-compatible APIsOpenAI 兼容接口
Hosted models托管模型
- OpenAI Realtime
- OpenAI chat and speechOpenAI 对话与语音
Agents智能体
- Full-duplex models全双工模型
- ASR → LLM → TTS
- Your own plugin自定义插件
Benchmarksbenchmark
- Full-Duplex-Bench
- Audio MultiChallenge
- Easy Turn · HumDial
One file sets up the whole conversation
一份配置,定义整场对话
role/*who takes part参与者source/*what a simulated role says模拟角色说什么behaviour/*noise, asides, listening噪声、旁白、倾听backend/*LLM, TTS, ASR callsLLM、TTS、ASR 调用agent/*the policy under test被评测的策略tool/*tools and their world工具及其世界状态task/*where episodes come from对话任务来源scorer/*scores and rewards分数与奖励sink/*files, viewer pages输出文件、查看页面driver/*concurrency, resume, A/B arms并发、续跑、A/B 分组
Each row of the file picks one plugin and sets its config. Rows refer to each other by id. ig plugins <kind> lists every plugin with its fields.
文件里每一行选一个插件并写它的配置,行之间用 id 互相引用。ig plugins <类型> 列出所有插件及其配置项。
# my_run.yml · run it with: ig run my_run.yml --seeds 0,1,2
- extends: core # kernel limits, scorers, sinks, driver
- insert:
# ── models ──────────────────────────────────────────
- id: user_llm
plugin: backend/chat
config: {base_url: "${IG_LLM_URL}", model: Qwen3.8-27B}
- id: tts
plugin: backend/tts
config: {base_url: "${IG_TTS_URL}"}
# ── the simulated user ──────────────────────────────
- id: lines # what the user says
plugin: source/llm
config: {llm: user_llm}
- id: noise # what else happens around it
plugin: behaviour/noise
- id: asides
plugin: behaviour/asides
- id: user
plugin: role/user
config:
source: lines
listener: user_llm # listen, backchannel or cut in
voice: {tts: tts}
behaviours: [noise, asides]
# ── the agent under test ────────────────────────────
- id: agent
plugin: agent/vllm_omni
config: {url: "${IG_AGENT_URL}", clock: input}
# ── tasks and scoring ───────────────────────────────
- id: tasks
plugin: task/jsonl
config: {path: tasks.jsonl}
- id: timing
plugin: scorer/timing
# ── change one row of a lower layer ───────────────────
- id: driver
config: {concurrency: 16}
uv run ig run my_run.yml --seeds 0,1,2 # episodes.jsonl + viewer pages
uv run ig run my_run.yml --set agent.clock=realtime # change one setting
uv run ig run my_run.yml --dump-config # the resolved configuration
uv run ig run minimal # a built-in bundle, no GPU
@misc{interactiongym2026,
title = {InteractionGym: Closed-Loop Environments for Full-Duplex Spoken Agents},
author = {Liu, Yinhong},
year = {2026},
url = {https://github.com/williamLyh/InteractionGym}
}