AgentJet provides a complete feature set for tuning agents. You can try starting training an agent right away:
Minimum Example
Let's begin with the simplest example: a math agent with a tool call.
Getting Started Flow
- Set up Environment Check out the [installation guide](./installation.md) to set up the training environment.
- Define Your Workflow Write an Agent class (e.g., `MathToolWorkflow`) that inherits from the base Workflow class.
- Configure and Run Use the `AgentJetJob` API to configure and start training.
Code Example
train_math_agent.py
from ajet import AgentJetJob
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:
Explore Examples
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.