Text Generation
Transformers
Safetensors
qwen3
agent
tool-use
function-calling
reflection
reinforcement-learning
conversational
text-generation-inference
Instructions to use dongguanting/Agent-Reflex-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dongguanting/Agent-Reflex-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="dongguanting/Agent-Reflex-8B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("dongguanting/Agent-Reflex-8B") model = AutoModelForCausalLM.from_pretrained("dongguanting/Agent-Reflex-8B", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use dongguanting/Agent-Reflex-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dongguanting/Agent-Reflex-8B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dongguanting/Agent-Reflex-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/dongguanting/Agent-Reflex-8B
- SGLang
How to use dongguanting/Agent-Reflex-8B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "dongguanting/Agent-Reflex-8B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dongguanting/Agent-Reflex-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "dongguanting/Agent-Reflex-8B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dongguanting/Agent-Reflex-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use dongguanting/Agent-Reflex-8B with Docker Model Runner:
docker model run hf.co/dongguanting/Agent-Reflex-8B
|
Download README.md from dongguanting/Agent-Reflex-8B: direct link, hf CLI and curl.
- Browser
- Download file 3.34 kB
-
https://huggingface.co/dongguanting/Agent-Reflex-8B/resolve/main/README.md
- Command line
-
hf download hf://dongguanting/Agent-Reflex-8B/README.md
-
curl -L -o README.md https://huggingface.co/dongguanting/Agent-Reflex-8B/resolve/main/README.md
3.34 kB
| license: mit | |
| base_model: Qwen/Qwen3-8B | |
| library_name: transformers | |
| pipeline_tag: text-generation | |
| tags: | |
| - agent | |
| - tool-use | |
| - function-calling | |
| - reflection | |
| - reinforcement-learning | |
| - arxiv:2610.17953 | |
| datasets: | |
| - dongguanting/Agent-Reflex-SFT-54K | |
| - dongguanting/Agent-Reflex-RL-2K | |
| # Agent-Reflex-8B | |
| [](https://arxiv.org/abs/2610.17953) | |
| [](https://huggingface.co/papers/2610.17953) | |
| [](https://github.com/RUC-NLPIR/Agent-Reflex) | |
| [](https://huggingface.co/collections/dongguanting/agent-reflex) | |
| [](https://huggingface.co/datasets/dongguanting/Agent-Reflex-SFT-54K) | |
| [](https://huggingface.co/datasets/dongguanting/Agent-Reflex-RL-2K) | |
| **Paper:** [arXiv:2610.17953](https://arxiv.org/abs/2610.17953) · [Hugging Face Papers](https://huggingface.co/papers/2610.17953) | |
| Agent-Reflex-8B is Qwen3-8B trained with **Agent-Reflex**, a framework that elicits proactive reflection in tool-using agents: noticing noisy tool feedback and user corrections, and recovering from them. | |
| Training: Qwen3-8B → **ReSFT** (54,663 reflective trajectories, 5,127 steps) → **ORPO** (noisy agentic RL with skill-guided on-policy distillation). Skills are used only during training; the model runs skill-free. | |
| ## Results | |
| | Model | VitaBench | τ²-Bench | BFCL V4 | ACEBench | ToolSandbox | **Overall** | AgentNoiseBench | | |
| | --- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | | |
| | Qwen3-8B | 11.4 | 26.2 | 40.4 | 54.0 | 69.1 | 40.2 | 12.3 | | |
| | EnvScaler-8B | 15.8 | 37.9 | 47.6 | 72.5 | 80.5 | 50.9 | 18.2 | | |
| | Agent-World-8B | 14.5 | 54.6 | 51.4 | 72.0 | 75.6 | 53.6 | – | | |
| | **Agent-Reflex-8B** | **17.5** | **62.1** | **52.9** | **78.0** | **82.5** | **58.6** | **29.1** | | |
| Each benchmark is scored with its official metric. Overall is the unweighted mean of the five long-horizon tool-use benchmarks (Table 1 of the paper); AgentNoiseBench is the mean over its τ²-Bench and VitaBench noise settings (Table 2). | |
| ## Usage | |
| Serve with vLLM (native function calling, thinking on), as in our evaluation: | |
| ```bash | |
| vllm serve dongguanting/Agent-Reflex-8B --served-model-name Qwen/Qwen3-8B \ | |
| --tensor-parallel-size 8 --max-model-len 40960 \ | |
| --enable-auto-tool-choice --tool-call-parser hermes --reasoning-parser deepseek_r1 | |
| ``` | |
| The full evaluation suite (τ²-Bench, BFCL V4, ACEBench, VitaBench, AgentNoiseBench, ToolSandbox) is in the [GitHub repo](https://github.com/RUC-NLPIR/Agent-Reflex/tree/main/evaluation). | |
| ## Citation | |
| ```bibtex | |
| @misc{dong2026agentreflex, | |
| title={Agent-Reflex: Teaching Language Agents to Act Reflectively}, | |
| author={Guanting Dong and Xinyu Yang and Jiajie Jin and Yuyang Hu and Xiaoshuai Song and Yifei Chen and Xiaoxi Li and Jiejun Tan and Yutao Zhu and Tat-Seng Chua and Ji-Rong Wen and Zhicheng Dou}, | |
| year={2026}, | |
| eprint={2610.17953}, | |
| archivePrefix={arXiv}, | |
| primaryClass={cs.CL}, | |
| url={https://arxiv.org/abs/2610.17953}, | |
| } | |
| ``` | |