AgentForesight-7B

AgentForesight-7B is a model for online auditing of multi-agent systems. It examines an execution trajectory as it unfolds and decides whether to continue or flag the earliest decisive error. When it raises an alarm, it identifies the step, the responsible agent, and a short reason.

The model is based on Qwen/Qwen2.5-7B-Instruct and trained with boundary-pair preference optimization (BPPO) followed by group relative policy optimization (GRPO). The checkpoint is provided in Hugging Face Transformers format with its tokenizer and chat template.

Usage

The GitHub repository contains the auditor prompt and an inference runner that presents each trajectory prefix to the model in order. The model weights are downloaded automatically when the runner starts.

git clone https://github.com/ZBox1005/AgentForesight.git
cd AgentForesight
pip install -r requirements.txt accelerate
python -c "from huggingface_hub import snapshot_download; snapshot_download('ZBox008003/AFTraj', repo_type='dataset', local_dir='data/AFTraj')"
python -m inference.infer_local \
  --model-path ZBox008003/AgentForesight-7B \
  --data-dir data/AFTraj \
  --output-dir outputs/agentforesight \
  --max-trajs 1

The runner writes per-trajectory predictions to outputs/agentforesight/per_sample.jsonl and summary metrics to outputs/agentforesight/results.json. Remove --max-trajs 1 to process more trajectories. To evaluate the paper split, add --paper-test-split --macro-domain.

The model's answer is SAFE when no decisive error is visible. Otherwise, it returns the first error step, the responsible agent, and a brief explanation. See the repository README for the input format and further examples.

License

The model weights are released under Apache-2.0. The code in the GitHub repository is MIT licensed, and AFTraj-2K is available under CC BY 4.0.

Citation

@article{zhang2026agentforesight,
  title={AgentForesight: Online Auditing for Early Failure Prediction in Multi-Agent Systems},
  author={Zhang, Boxuan and Zhu, Jianing and Shi, Zeru and Liu, Dongfang and Tang, Ruixiang},
  journal={arXiv preprint arXiv:2605.08715},
  year={2026}
}
Downloads last month
536
Safetensors
Model size
8B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for ZBox008003/AgentForesight-7B

Base model

Qwen/Qwen2.5-7B
Finetuned
(3,258)
this model
Quantizations
1 model

Dataset used to train ZBox008003/AgentForesight-7B

Paper for ZBox008003/AgentForesight-7B