DeepSeek Harness 插件

tuning-engines-cli

Tuning Engines CLI, MCP server, and Python agent runtime adapters for governed model, agent, skill, and MCP workflows. Fine-tune open-source LLMs, run inference, manage datasets/evaluations, and(英文原文)

跳到安装方式

来源信息

GitHub 仓库
cerebrixos-org/tuning-engines-cli
最近更新
2026年8月18日
分类
自动化与任务
GitHub stars
5
载体类型
plugin
目录证据
上游声明已找到 dsh.bundle
证据路径
package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-20

该证据由上游目录提供。本站没有安装、运行或安全审核这个插件。

安装

默认先复制一段 Prompt,让 Agent 读 GitHub 仓库和源码;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读 GitHub 仓库和源码。

请先不要安装或执行任何命令。阅读这个插件的 GitHub 仓库、README 和关键源码,然后用清楚、直接的方式回答以下问题,帮助我判断它是否适合我的需求:

1. 这个插件是什么,解决什么问题;
2. 适合哪些用户和典型使用场景;
3. 安装后如何使用,并给出一个最小使用示例;
4. 有哪些已知限制,以及隐私、安全、兼容性或维护风险;
5. 给出“推荐 / 有条件推荐 / 不推荐”的明确建议和理由。

请区分仓库明确说明、根据源码推断和未知信息。证据不足时请明确说明,不要猜测或照抄 README。

GitHub:https://github.com/cerebrixos-org/tuning-engines-cli
插件名:tuning-engines-cli
作者:cerebrixos-org

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器3 个文件
README.md来源说明 · 只读预览

Tuning Engines CLI & MCP Server

![tuning-engines-cli MCP server](https://glama.ai/mcp/servers/cerebrixos-org/tuning-engines-cli)

![npm version](https://www.npmjs.com/package/tuningengines-cli) ![MCP Registry](https://registry.modelcontextprotocol.io) ![License: MIT](https://opensource.org/licenses/MIT)

Govern every AI workflow through one API.

Tuning Engines is a governed AI runtime for model, agent, skill, and MCP workflows. Route inference through one OpenAI-compatible API, apply RBAC and traffic policies, request approvals for high-risk actions, inspect traces and usage, and connect durable orchestration frameworks such as LangGraph and Temporal. The same CLI and MCP server also manage domain-specific fine-tuning of open-source models.

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-model

SIERA (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-model

Quality tiers (SIERA only):

  • low — Faster, fewer synthetic pairs (default)
  • high — Deeper analysis, more training data, better results

Coming Soon

AgentPersonaWhat it does
ResolveMiraFine-tunes on support tickets, macros, and KB articles for automated ticket resolution
ExtractorFluxTrains for strict schema extraction from docs, PDFs, and business text
GuardAegisSecurity-focused code reviewer that catches risky patterns and proposes safer fixes
OpsPilotAtlasIncident response agent trained on runbooks, postmortems, and on-call notes

Supported Base Models

SizeModels
3BQwen/Qwen2.5-Coder-3B-Instruct
7Bcodellama/CodeLlama-7b-hf, deepseek-ai/deepseek-coder-7b-instruct-v1.5, Qwen/Qwen2.5-Coder-7B-Instruct
13-15Bcodellama/CodeLlama-13b-Instruct-hf, bigcode/starcoder2-15b, Qwen/Qwen2.5-Coder-14B-Instruct
32-34Bdeepseek-ai/deepseek-coder-33b-instruct, codellama/CodeLlama-34b-Instruct-hf, Qwen/Qwen2.5-Coder-32B-Instruct
70-72Bcodellama/CodeLlama-70b-Instruct-hf, meta-llama/Llama-3.1-70B-Instruct, Qwen/Qwen2.5-72B-Instruct

Quick Start

npm install -g tuningengines-cli

# Or run without installing
npx -y --package tuningengines-cli@latest te 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 list

# Create a governed orchestration starter
te orchestration init langgraph
te orchestration init temporal
te orchestration init inngest
te orchestration init triggerdev
te orchestration init hatchet
te orchestration init restate
te orchestration init dbos
te orchestration init dapr
te orchestration init prefect
te orchestration init dagster
te orchestration init airflow

MCP Server Setup

The CLI includes a built-in MCP server with 60+ tools. Any AI assistant that supports MCP can fine-tune models, manage training jobs, run evaluations, check inference usage, inspect traces, review approvals, and manage non-secret tenant registry metadata through natural language.

For security, the MCP server intentionally does not expose internal proxy routes. It also refuses MCP-side inference-key creation and raw secret-bearing mutation fields. Use the CLI or web UI for workflows that intentionally create one-time keys, submit raw provider secrets, validate S3 credentials, or import/export S3 assets with raw credentials.

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "tuning-engines": {
      "command": "npx",
      "args": ["-y", "--package", "tuningengines-cli@latest", "te", "mcp", "serve"],
      "env": {
        "TE_API_KEY": "te_your_key_here"
      }
    }
  }
}

Claude Code

claude mcp add tuning-engines -- npx -y --package tuningengines-cli@latest te mcp serve

Work Sessions and outcomes

Label the desired outcome for a project without interrupting your coding workflow:

te goal start "Fix flaky checkout retries"
te goal show
te goal complete --result succeeded

Install optional native telemetry hooks for Claude Code or Codex:

te guard claude-code install --mode observe --project .
te guard claude-code doctor
te guard claude-code doctor --probe
te guard codex install
te guard codex doctor

Claude Code writes project-local hooks into .claude/settings.local.json. On Windows, verify with dir .\.claude, type .\.claude\settings.local.json, then restart Claude Code from the same project root and review claude /hooks. doctor --probe is available in tuningengines-cli 0.4.20 and later; it runs synthetic hook events through the installed commands and checks that the trace is visible to Tuning Engines. Hook invocations also write a local redacted status log at .claude/tuning-engines-hook-status.jsonl. Codex project hooks require review and trust from /hooks. The installer pins hooks to the exact CLI executable that created them; te guard codex doctor reports that path, CLI version, native-event contract, required lifecycle hooks, and any conflicting te command found on PATH. Each Codex or Claude Code user prompt starts a new trace while retaining one stable Work Session for the native conversation. Tuning Engines sends pseudonymous session and transcript references by default, not transcript contents or local absolute paths.

Claude Code Plugin

The repository also ships a Claude Code plugin wrapper around the same MCP server. It keeps installation discoverable while preserving the same TE_API_KEY environment-variable boundary:

claude plugin marketplace add cerebrixos-org/tuning-engines-cli
claude plugin install tuning-engines@tuning-engines

The same plugin directory includes a Codex plugin manifest, marketplace entry, MCP server, and tenant-operations skill. It uses the Tuning Engines web app as the shared control-plane UI for traces, approvals, policies, cost, and review.

DeepSeek Harness Plugin

Install the native Harness bundle to capture turn, model-step, and tool lifecycle telemetry and optionally enforce TE governance before tool execution:

export TE_API_KEY="your-tenant-token-or-inference-key"
dsh plugin --profile default add tuningengines-cli

The adapter uses a disk-backed local spool, background batching, bounded retries, stable tool-call correlation, and metadata-only capture by default.

VS Code / Cursor / Windsurf

Add to your MCP settings (.vscode/mcp.json or equivalent):

{
  "servers": {
    "tuning-engines": {
      "command": "npx",
      "args": ["-y", "--package", "tuningengines-cli@latest", "te", "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.

Unified API Endpoint

Tuning Engines can be used anywhere a tool accepts an OpenAI-compatible API base URL. Point the client at:

https://api.tuningengines.com/v1

Use an inference key that starts with sk-te-... for live model calls, and use the model IDs shown by:

te inference models

This lets OpenCode, Temporal activities, LangGraph apps, OpenAI SDK clients, and other custom-provider clients route through the same Tuning Engines control plane for model RBAC, routing, fallbacks, guardrails, AGT policy, traces, usage metering, and cost attribution.

See [docs/unified-api-endpoint.md](docs/unified-api-endpoint.md) for copy-paste examples for OpenCode, Temporal, Python, JavaScript, and other OpenAI-compatible clients.

Agent Runtime SDK and Orchestration Starters

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.

OpenAI Agents SDK users can install the native model and trace integration:

pip install "tuning-engines[openai-agents]"

See [packages/tuning-agents/README.md](packages/tuning-agents/README.md#openai-agents-sdk) for setup. The OpenAI Agents runtime owns the loop; TE supplies the governed endpoint and receives metadata-only SDK traces through its background processor.

Install the published Python SDK:

pip install "tuning-engines[langgraph]"
pip install "tuning-engines[temporal]"

The package installs the tuning_agents Python module.

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 (
    TuningEnginesTemporalFeatures,
    create_tuning_engines_plugin,
    define_temporal_workflow,
)

plugin = create_tuning_engines_plugin(
    features=TuningEnginesTemporalFeatures(
        built_in_workflow=False,
        model_calls=True,
        skill_tools=True,
        mcp_tools=True,
        agents=True,
        approvals=True,
        traces=True,
        state_references=True,
        interventions=True,
        model_catalog=True,
        usage=True,
    )
)
TuningAgentWorkflow = define_temporal_workflow()
# Pass plugin to Client.connect(..., plugins=[plugin]) and register the workflow.

The SDK captures runtime events from LangGraph/Temporal and posts them to POST /api/v1/traces. Each event carries a run_id, request_id, and a normalized event type such as model.call, mcp.tool_call, agent.message, workflow.step, human.edit, action.finalized, outcome.recorded, or state.reference. The app pairs that with inference usage, request capture, policy decisions, approval requests, external state references, audit, and billing logs.

JavaScript/TypeScript users can also import lightweight tracing helpers from the npm package:

import { createOpenAIAgentsTraceAdapter } from "tuningengines-cli/adapters/openai-agents";
import { createClaudeAgentSdkTraceAdapter } from "tuningengines-cli/adapters/claude-agent-sdk";

Both helpers send redacted run, model, tool, handoff, error, goal, and outcome events to the existing trace API. goal_key, goal_status, and goal_score are normalized into the same success-signal analytics as outcome_key.

For decision traces, store redacted signals in metadata.decision, for example proposal_summary, changed_fields, change_summary, final_action, outcome_label, and reason_summary. Do not place raw prompts, provider keys, tenant secrets, or full customer data in trace metadata.

Generate a starter kit:

te orchestration init langgraph --dir ./lg-te-demo
te orchestration init temporal --dir ./temporal-te-demo
te orchestration init inngest --dir ./inngest-te-demo
te orchestration init triggerdev --dir ./trigger-te-demo
te orchestration init hatchet --dir ./hatchet-te-demo
te orchestration init restate --dir ./restate-te-demo
te orchestration init dbos --dir ./dbos-te-demo
te orchestration init dapr --dir ./dapr-te-demo
te orchestration init prefect --dir ./prefect-te-demo
te orchestration init dagster --dir ./dagster-te-demo
te orchestration init airflow --dir ./airflow-te-demo

LangGraph and Temporal starters use the Python runtime SDK. Inngest, Trigger.dev, and Hatchet starters generate TypeScript projects with a small self-contained Tuning Engines helper. Restate, DBOS, and Dapr starters use the same TypeScript helper. Prefect, Dagster, and Airflow starters generate Python workflow examples with a small helper module. All generated examples include governed model calls, trace flushing, registry manifests, policy context metadata, decision metadata, runtime state references, and approval retry patterns.

CLI Commands

Authentication

CommandDescription
te auth loginSign up or log in via browser
te auth logoutClear saved credentials
te auth statusShow current auth status (email, balance)

Training Jobs

CommandDescription
te jobs listList all training jobs
te jobs show <id>Show job details
te jobs createSubmit a training job (--agent, --quality-tier, --base-model, --repo-url, --output-name)
te jobs status <id>Live status (--watch for continuous polling)
te jobs cancel <id>Cancel a running job
te jobs retry <id>Retry from last checkpoint
te jobs estimateCost estimate before submitting
te jobs validate-s3Pre-validate S3 credentials

Models

CommandDescription
te models listList your trained models
te models show <id>Show model details
te models baseList supported base models
te models importImport a model from S3
te models export <id>Export a model to S3
te models delete <id>Delete a model
te models status <id>Check import/export status

Datasets

CommandDescription
te datasets listList all datasets
te datasets show <id>Show dataset details
te datasets createCreate a dataset from S3 (--name, --s3-url, --for-evaluation)
te datasets delete <id>Delete a dataset
te datasets status <id>Check import/processing status

Evaluations

CommandDescription
te evals listList all evaluations
te evals show <id>Show evaluation details and scores
te evals createRun an evaluation (--model, --dataset, --evaluators)
te evals cancel <id>Cancel a running evaluation
te evals status <id>Live evaluation progress
te evals evaluatorsList available evaluators
te evals estimateCost estimate for an evaluation

Inference

CommandDescription
te inference modelsList available inference models
te inference usageShow inference API usage stats
te inference jwtGet a JWT for direct API access
te inference tokenExchange an inference key (sk-te-...) for a short-lived inference JWT
te inference chat --data '<json>'Run an OpenAI-compatible chat completion
te inference responses --data '<json>'Run an OpenAI Responses request
te inference embeddings --data '<json>'Create embeddings
te inference messages --data '<json>'Run an Anthropic-compatible Messages request

Runtime Traces and Approvals

CommandDescription
te traces listList LangGraph, Temporal, and custom runtime traces
te traces show <run-id>Show one trace, including events, policy decisions, and approvals when linked
te traces ingest --data '<json>'Ingest or update a trace using a user API token or inference key
te outcomes listList observed outcomes, goals, evals, and workflow success signals
te outcomes record --run-id ... --key ... --label ...Record a success signal for a run
te outcomes map --outcome-key ... --criteria '<json>'Map unmapped events to an outcome key
te insights listList Insight Loop recommendations
te insights accept <id>Accept an insight as valid; does not change production
te insights apply <id>Apply or queue the approved action for an accepted insight
te doctor simulate --data '<json>'Simulate inference access, role, endpoint, policy, and resource checks
te policy-decisions listList AGT YAML policy decisions
te policy-decisions show <id>Show one policy decision with redacted context
te policy-templates listList curated AGT YAML policy templates
te policy-templates render <id> --params '<json>'Render disabled/shadow policy YAML from safe structured parameters
te policy-drafts generate --prompt '<text>'Generate an AI-assisted disabled/shadow draft for review and testing
te approvals list --status pendingList policy approval requests
te approvals show <id>Show approval detail and retry metadata
te approvals approve <id>Approve a pending request
te approvals deny <id>Deny a pending request
te interventions list/show/request/ack/complete/failManage runtime pause, resume, cancel, and replay requests
te state list/show/upsertManage safe external workflow-state and memory references
te registry sync --file tuning-registry.yml --dry-run/--applyDiff or app