1. Testing Pre-define Demo
AgentJet provides a complete feature set for tuning agents. You can try starting training an agent right away by running a demo:
2. Minimum Example
Let's begin with the simplest example: a math agent with a tool call.
train_math_agent.py
from ajet import AgentJetJob
# refer to `https://modelscope.github.io/AgentJet/en/tune_your_first_agent/` on how to write your own workflow
from tutorial.example_math_agent.math_agent_simplify import MathToolWorkflow
model_path = "YOUR_MODEL_PATH"
job = AgentJetJob(n_gpu=8, algorithm='grpo', model=model_path)
job.set_workflow(MathToolWorkflow)
job.set_data(type="hf", dataset_path='openai/gsm8k')
# [Optional] Save yaml file for manual adjustment
# job.dump_job_as_yaml('saved_experiments/math.yaml')
# [Optional] Load yaml file from manual adjustment
# job.load_job_from_yaml('saved_experiments/math.yaml')
# Start training
tuned_model = job.tune()
CLI Alternative
The code above is equivalent to running in terminal:
3. Compare with Community Training Curves
4. Explore Example Gallery
Explore our rich library of examples to kickstart your journey:
Math Agent
Training a math agent that can write Python code to solve mathematical problems.
AppWorld Agent
Creating an AppWorld agent using AgentScope and training it.
Werewolves Game
Developing Werewolves RPG agents and training them.
Learning to Ask
Learning to ask questions like a doctor.
Countdown Game
Writing and solving a countdown game with RL.
Frozen Lake
Solving a frozen lake walking puzzle.