AgentJet provides a complete feature set for tuning agents. You can try starting training an agent right away:

ajet --conf tutorial/example_math_agent/math_agent.yaml

Minimum Example

Let's begin with the simplest example: a math agent with a tool call.

Getting Started Flow
  1. Set up Environment Check out the [installation guide](./installation.md) to set up the training environment.
  2. Define Your Workflow Write an Agent class (e.g., `MathToolWorkflow`) that inherits from the base Workflow class.
  3. 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:

ajet --conf ./saved_experiments/math.yaml


Explore Examples

Explore our rich library of examples to kickstart your journey:



Next Steps