Tuning Engines
The Tuning Engines server lets you fine-tune open-source LLMs/SLMs on your GitHub repos and manage the full ML lifecycle via CLI or MCP tools.
Training Jobs
Create fine-tuning jobs using agents like Cody (code autocomplete) or SIERA (bug-fix specialist) on GitHub repos
Estimate costs before submission; monitor live status including GPU usage and estimated charges
List, view, cancel, and retry failed jobs from checkpoints
Validate S3 credentials before submitting jobs with S3 export
Models
List, view, and delete trained/imported models
Import from or export to S3; check import/export status
Browse supported base models (Qwen, Llama, DeepSeek, Mistral, CodeLlama, StarCoder, Gemma, Phi — 1B to 72B parameters)
Use LoRA, QLoRA, or full fine-tuning; iteratively fine-tune previously trained models
Datasets
Create, list, view, and delete datasets sourced from S3 for training or evaluation
Evaluations
Create, list, cancel, and monitor evaluations against datasets using evaluators like code execution, similarity, or LLM judge
Estimate evaluation costs and view detailed scores/metrics
Inference
List available inference models, view API usage stats, and retrieve JWT tokens for direct API access
Agents
List and view details of available specialized training agents
Account & Billing
Check balance, view transaction history, add credits, and manage account details
Configuration
Set API key, override API URL, and view current config
Allows the server to use GitHub repositories as the data source for fine-tuning LLMs and SLMs, enabling the creation of specialized agents like 'Cody' for code autocomplete and 'SIERA' for bug-fix specialization.
Tuning Engines CLI & MCP Server
Own your sovereign AI model. Domain-specific fine-tuning of open-source LLMs and SLMs with total control and zero infrastructure hassle.
Tuning Engines provides specialized tuning agents to tailor top open models to your needs — fast, predictable, fully delivered. Fine-tune Qwen, Llama, DeepSeek, Mistral, Gemma, Phi, StarCoder, and CodeLlama models from 1B to 72B parameters on your data via CLI or any MCP-compatible AI assistant. LoRA, QLoRA, and full fine-tuning supported. GPU provisioning, training orchestration, and model delivery fully managed.
Training Agents
Tuning Engines uses specialized agents that control how your data is analyzed and converted into training data. Each agent produces a different kind of domain-specific fine-tuned model optimized for its use case. Current agents focus on code, with more coming for customer support, data extraction, security review, ops, and other domains.
Cody (code_repo) — Code Autocomplete Agent
Cody fine-tunes on your GitHub repo using QLoRA (4-bit quantized LoRA) via the Axolotl framework (HuggingFace Transformers + PEFT). It learns your codebase's patterns, naming conventions, and project structure to produce a fast, lightweight adapter optimized for real-time completions.
Best for: code autocomplete, inline suggestions, tab-complete, code style matching, pattern completion.
te jobs create --agent code_repo \
--base-model Qwen/Qwen2.5-Coder-7B-Instruct \
--repo-url https://github.com/your-org/your-repo \
--output-name my-cody-modelSIERA (sera_code_repo) — Bug-Fix Specialist
SIERA (Synthetic Intelligent Error Resolution Agent) uses the Open Coding Agents approach from AllenAI to generate targeted bug-fix training data from your repository. It synthesizes realistic error scenarios and their resolutions, then fine-tunes a model that learns your team's debugging style, error handling conventions, and fix patterns.
Best for: debugging, error resolution, patch generation, root cause analysis, fix suggestions.
te jobs create --agent sera_code_repo \
--quality-tier high \
--base-model Qwen/Qwen2.5-Coder-7B-Instruct \
--repo-url https://github.com/your-org/your-repo \
--output-name my-siera-modelQuality tiers (SIERA only):
low— Faster, fewer synthetic pairs (default)high— Deeper analysis, more training data, better results
Coming Soon
Agent | Persona | What it does |
Resolve | Mira | Fine-tunes on support tickets, macros, and KB articles for automated ticket resolution |
Extractor | Flux | Trains for strict schema extraction from docs, PDFs, and business text |
Guard | Aegis | Security-focused code reviewer that catches risky patterns and proposes safer fixes |
OpsPilot | Atlas | Incident response agent trained on runbooks, postmortems, and on-call notes |
Related MCP server: vLLM MCP Server
Supported Base Models
Size | Models |
3B |
|
7B |
|
13-15B |
|
32-34B |
|
70-72B |
|
Quick Start
npm install -g tuningengines-cli
# Or run without installing after the next npm release is published
npx -y tuningengines-cli auth status
# Sign up or log in (opens browser — works for new accounts too)
te auth login
# Add credits (opens browser to billing page)
te billing add-credits
# Estimate cost before training
te jobs estimate --base-model Qwen/Qwen2.5-Coder-7B-Instruct
# Train Cody on your repo
te jobs create --agent code_repo \
--base-model Qwen/Qwen2.5-Coder-7B-Instruct \
--repo-url https://github.com/your-org/your-repo \
--output-name my-model
# Monitor training
te jobs status <job-id> --watch
# View your trained models
te models listMCP Server Setup
The CLI includes a built-in MCP server with 35+ tools. Any AI assistant that supports MCP can fine-tune models, manage training jobs, run evaluations, check inference usage, and manage datasets through natural language.
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"tuning-engines": {
"command": "npx",
"args": ["-y", "tuningengines-cli", "mcp", "serve"],
"env": {
"TE_API_KEY": "te_your_key_here"
}
}
}
}Claude Code
claude mcp add tuning-engines -- npx -y tuningengines-cli mcp serveVS Code / Cursor / Windsurf
Add to your MCP settings (.vscode/mcp.json or equivalent):
{
"servers": {
"tuning-engines": {
"command": "npx",
"args": ["-y", "tuningengines-cli", "mcp", "serve"],
"env": {
"TE_API_KEY": "te_your_key_here"
}
}
}
}What the AI assistant can do
When connected, your AI assistant can:
"Fine-tune Qwen 7B on my-org/my-repo using the SIERA agent with high quality"
"How much would it cost to train a 32B model for 3 epochs on this repo?"
"Check the status of my latest training job"
"List my trained models"
"Export my model to s3://my-bucket/models/"
"Show my account balance"
"Train a bug-fix specialist on this repo" (auto-selects SIERA)
"Create an autocomplete model for this codebase" (auto-selects Cody)
The create_job tool description includes full agent details and model lists, so AI assistants automatically select the right agent and model based on what you ask for.
Agent Runtime SDK: LangGraph and Temporal
Use the CLI/MCP package when you want npx tools for assistants. Use the
Python SDK when you want your own app to run durable agent workflows while
Tuning Engines remains the governed control plane for models, agents, skills,
MCP tools, RBAC, AGT policy, audit, usage, and token economics.
Install directly from this repo:
pip install "tuning-agents[langgraph] @ git+https://github.com/cerebrixos-org/tuning-engines-cli.git#subdirectory=packages/tuning-agents"
pip install "tuning-agents[temporal] @ git+https://github.com/cerebrixos-org/tuning-engines-cli.git#subdirectory=packages/tuning-agents"LangGraph example:
from langgraph.checkpoint.memory import InMemorySaver
from tuning_agents import TuningClient
from tuning_agents.langgraph import create_tuning_langgraph_agent, invoke_with_trace
client = TuningClient(api_key="te_your_key_here")
agent = create_tuning_langgraph_agent(
client,
model="llama-3.3-70b-fp8",
agent_names=["billing-escalation"],
checkpointer=InMemorySaver(),
interrupt_before=["tools"],
)
result = invoke_with_trace(
client,
agent,
[{"role": "user", "content": "Triage this ticket and escalate if needed."}],
thread_id="ticket-123",
)
client.flush_trace(name="ticket-triage", runtime="langgraph", status="succeeded")Temporal example:
from tuning_agents.temporal import (
agent_message_activity,
chat_completion_activity,
define_temporal_workflow,
mcp_tool_activity,
)
TuningAgentWorkflow = define_temporal_workflow()
# Register TuningAgentWorkflow plus the three activities in your Temporal worker.The SDK captures runtime events from LangGraph/Temporal and posts them to
POST /api/v1/traces. The Rails app pairs that with existing inference usage,
request capture, policy, audit, and billing logs.
CLI Commands
Authentication
Command | Description |
| Sign up or log in via browser |
| Clear saved credentials |
| Show current auth status (email, balance) |
Training Jobs
Command | Description |
| List all training jobs |
| Show job details |
| Submit a training job ( |
| Live status ( |
| Cancel a running job |
| Retry from last checkpoint |
| Cost estimate before submitting |
| Pre-validate S3 credentials |
Models
Command | Description |
| List your trained models |
| Show model details |
| List supported base models |
| Import a model from S3 |
| Export a model to S3 |
| Delete a model |
| Check import/export status |
Datasets
Command | Description |
| List all datasets |
| Show dataset details |
| Create a dataset from S3 ( |
| Delete a dataset |
| Check import/processing status |
Evaluations
Command | Description |
| List all evaluations |
| Show evaluation details and scores |
| Run an evaluation ( |
| Cancel a running evaluation |
| Live evaluation progress |
| List available evaluators |
| Cost estimate for an evaluation |
Inference
Command | Description |
| List available inference models |
| Show inference API usage stats |
| Get a JWT for direct API access |
Agents
Command | Description |
| List available agents |
| Show agent details and capabilities |
Tenant Admin Automation
These commands require an API token for a tenant owner or tenant admin. They are designed for CI smoke tests and end-to-end product checks. Secret fields can be sent on create/update where the server supports them, but responses never print stored provider keys, AWS secrets, or invitation tokens.
Command | Description |
| List supported tenant resource names |
| List resources such as |
| Show one tenant resource |
| Create a tenant resource from JSON |
| Update a tenant resource from JSON |
| Delete a tenant resource; inference keys are revoked |
| Dry-run an AGT YAML governance policy |
| List tenant members, pending invitations, and allowed domains |
| Invite a user by email; the invite token is emailed and never printed |
| Assign an inference role to a member |
| Disable a member |
| Re-enable a member |
| Remove a member |
| Cancel a pending invitation |
| Replace allowed email domains |
| Show inference capture settings |
| Update inference capture settings |
Billing & Account
Command | Description |
| Balance and transaction history |
| Open browser to add credits |
| Account info |
Configuration
Command | Description |
| Set API key manually |
| Override API URL |
| Show current config |
All commands support --json for machine-readable output.
MCP Tools Reference
Training Jobs
Tool | Description |
| Fine-tune an LLM on a GitHub repo. Supports agent selection (Cody, SIERA), quality tier, base model, epochs, S3 export. |
| Cost estimate before training. Returns cost range, balance, sufficiency check. |
| List training jobs with status filter |
| Full job details including agent, model, GPU usage, cost, retry info |
| Live status with GPU minutes, charges, delivery progress |
| Cancel a running/queued job |
| Retry a failed job from its last checkpoint |
| Test S3 credentials before submitting a job |
Models
Tool | Description |
| List trained and imported models |
| Model details (status, size, base model, training job) |
| Delete a model from cloud storage |
| Import a model from S3 |
| Export a model to S3 |
| Import/export progress |
| Available base models with GPU hours per epoch |
Marketplace
Tool | Description |
| Browse pre-built models and datasets |
| Details of a marketplace item |
| Export marketplace item to S3 |
| Check marketplace export progress |
Datasets
Tool | Description |
| List datasets for training and evaluation |
| Dataset details and status |
| Create a dataset from S3 |
| Delete a dataset |
| Check dataset import/processing status |
Evaluations
Tool | Description |
| List model evaluations |
| Evaluation details, scores, and metrics |
| Run an evaluation against a dataset |
| Cancel a running evaluation |
| Live evaluation progress |
| Available evaluators (code_execution, similarity, llm_judge, etc.) |
| Cost estimate for an evaluation |
Inference
Tool | Description |
| Models available for inference |
| Inference API usage statistics |
| Get JWT token for direct API access |
Agents
Tool | Description |
| List available agents |
| Agent details and capabilities |
Account
Tool | Description |
| Account balance and recent transactions |
| Account details |
Environment Variables
Variable | Description |
| API key (overrides config file) |
| API URL (default: |
Inference Smoke Testing
Use te-inference-smoke to exercise inference behavior as a tenant admin and, optionally, real tenant users. The default run is read-only. Set TE_SMOKE_MUTATE=1 to create temporary inference roles, keys, policies, guardrails, MCP servers, agents, and skills, then test permission permutations and clean them up.
If you only have an sk-te-* inference key, set TE_INFERENCE_KEY for
proxy-only checks. Full role/user/policy permutations require a tenant-admin
app API key that starts with te_.
TE_API_URL=https://app.tuningengines.com \
TE_ADMIN_API_KEY=te_admin_key_here \
TE_USER_API_KEY=te_user_key_here \
npx -y --package tuningengines-cli@latest te-inference-smokeFor actual proxy model calls, enable live calls explicitly:
TE_API_URL=https://app.tuningengines.com \
TE_INFERENCE_BASE=https://api.tuningengines.com/v1 \
TE_ADMIN_API_KEY=te_admin_key_here \
TE_SMOKE_MUTATE=1 \
TE_SMOKE_LIVE_CALLS=1 \
TE_SMOKE_CREATE_MODEL_DEPLOYMENT=1 \
TE_SMOKE_ALLOWED_MODEL=llama-3.1-8b-fast \
TE_SMOKE_DENIED_MODEL=llama-3.3-70b-fp8 \
TE_SMOKE_AGENT_URL=https://httpbin.org/post \
npx -y --package tuningengines-cli@latest te-inference-smokeTE_SMOKE_CREATE_MODEL_DEPLOYMENT=1 is useful for disposable tenants that do
not already have an enabled model. By default the runner treats a provider
authentication failure on an allowed model as proof that Tuning Engines RBAC
allowed the request through to the provider. Set
TE_SMOKE_ALLOW_PROVIDER_AUTH_FAILURE=0 when the tenant has real provider
credentials and the allowed call must return 200.
To test multiple tenant users, provide their API tokens:
TE_SMOKE_USERS_JSON='[
{"email":"member1@example.com","api_key":"te_user_key_1"},
{"email":"member2@example.com","api_key":"te_user_key_2"}
]' \
TE_ADMIN_API_KEY=te_admin_key_here \
TE_SMOKE_MUTATE=1 \
npx -y --package tuningengines-cli@latest te-inference-smokePreview coverage:
npx -y --package tuningengines-cli@latest te-inference-smoke --listEach run writes a masked JSON report under te-smoke-results/, or to
TE_SMOKE_REPORT when that env var is set.
Authentication
te auth login uses a secure device authorization flow (same pattern as gh auth login):
CLI generates a device code and opens your browser
Sign up or log in (email/password, Google, or GitHub)
Click "Authorize" to grant CLI access
Token flows back automatically — no copy-paste
Works for both new sign-ups and existing accounts. Token saved to ~/.tuningengines/config.json with 0600 permissions.
Links
License
MIT
Maintenance
Appeared in Searches
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/cerebrixos-org/tuning-engines-cli'
If you have feedback or need assistance with the MCP directory API, please join our Discord server