curl --request POST \
--url 'http://localhost:8000/training' \
--header "Authorization: Bearer $STATESET_AGENTS_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"agent_config": {
"enable_planning": false,
"max_new_tokens": 256,
"model_name": "gpt2",
"temperature": 0.7
},
"environment_scenarios": [
{
"id": "customer_support",
"topic": "support",
"user_responses": [
"I need help",
"Thank you"
]
}
],
"num_episodes": 50,
"profile": "balanced",
"resume_from_checkpoint": "./outputs/checkpoint-100",
"reward_config": {
"helpfulness_weight": 0.7,
"safety_weight": 0.3
},
"training_config_overrides": {
"continual_strategy": "replay_lwf",
"replay_ratio": 0.3
}
}'
{
"training_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "pending",
"estimated_time": 1.5,
"message": "Two-person tent, green — replacement for damaged pole set."
}
Start Training
Start a new training job with the specified configuration.
POST
/
training
curl --request POST \
--url 'http://localhost:8000/training' \
--header "Authorization: Bearer $STATESET_AGENTS_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"agent_config": {
"enable_planning": false,
"max_new_tokens": 256,
"model_name": "gpt2",
"temperature": 0.7
},
"environment_scenarios": [
{
"id": "customer_support",
"topic": "support",
"user_responses": [
"I need help",
"Thank you"
]
}
],
"num_episodes": 50,
"profile": "balanced",
"resume_from_checkpoint": "./outputs/checkpoint-100",
"reward_config": {
"helpfulness_weight": 0.7,
"safety_weight": 0.3
},
"training_config_overrides": {
"continual_strategy": "replay_lwf",
"replay_ratio": 0.3
}
}'
{
"training_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "pending",
"estimated_time": 1.5,
"message": "Two-person tent, green — replacement for damaged pole set."
}
Start a new training job with the specified configuration.
Request body
TrainingRequest
Response
TrainingResponse
Status codes
| Code | Meaning |
|---|---|
200 | Successful response |
202 | Training started successfully |
400 | Invalid configuration |
401 | Authentication required |
403 | Insufficient permissions |
422 | Validation Error |
429 | Rate limit exceeded |
500 | Internal server error |
curl --request POST \
--url 'http://localhost:8000/training' \
--header "Authorization: Bearer $STATESET_AGENTS_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"agent_config": {
"enable_planning": false,
"max_new_tokens": 256,
"model_name": "gpt2",
"temperature": 0.7
},
"environment_scenarios": [
{
"id": "customer_support",
"topic": "support",
"user_responses": [
"I need help",
"Thank you"
]
}
],
"num_episodes": 50,
"profile": "balanced",
"resume_from_checkpoint": "./outputs/checkpoint-100",
"reward_config": {
"helpfulness_weight": 0.7,
"safety_weight": 0.3
},
"training_config_overrides": {
"continual_strategy": "replay_lwf",
"replay_ratio": 0.3
}
}'
{
"training_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "pending",
"estimated_time": 1.5,
"message": "Two-person tent, green — replacement for damaged pole set."
}
Last modified on August 31, 2026