Skip to content

Job Ai

job_ai — G6 AI job agent.

Cluster: Job Agents | Type: component | MCP Tools: 26

Overview

Domain-specialist job agent for AI/ML engineering tasks. Orchestrates model training runs, evaluation pipelines, data-preprocessing workflows, hyperparameter tuning, model deployment, and metrics analysis — giving AI teams a structured, safety-bounded JobAgentBlock interface over the full ML lifecycle.

When to use:

  • Running end-to-end ML experiments from data prep through model evaluation and deployment
  • Automating hyperparameter search and surfacing the best configuration from trial results
  • Generating structured metrics reports for model performance across test splits
  • Coordinating multi-stage ML pipelines within G6's resource-bounded execution model

Example:

from mvp.job_ai import JobAIBlock, JobAIInput

block = JobAIBlock()
result = block.infer(JobAIInput(
    task="Train a text-classification model on the customer-feedback dataset and report F1 by class",
    context={"dataset": "customer_feedback_v3", "model_type": "bert-base-uncased"},
))
# result.ok → True; result.value → JobAIOutput with result, artifacts, steps_taken

Works well with: job_framework, job_researcher, job_scientist

Deterministic Rule Layer And Recipes

job_ai runs deterministic local rule modules by default. External enrichment is optional; the core value does not depend on web search, debate, or LLM commentary.

Deterministic ai_rules modules:

  • bias_fairness: demographic parity, equalized odds, disparate impact, representation bias
  • data_preprocessing: data quality, leakage, imbalance, distribution-shift checks
  • explainability: model explanation and interpretability checks
  • hyperparameter_tuning: search-space and tuning guidance
  • mlops: deployment, drift, serving latency, and data-pipeline checks
  • model_architecture: parameter, FLOP, and memory estimates
  • model_evaluation: classification and regression metrics
  • nlp_metrics: ROUGE, token overlap, and hallucination-risk heuristics
  • responsible_ai: privacy and responsible-AI risk checks

Five named recipes are available through mvp.job_ai.ai_mcp.recipes: full_model_training, fairness_audit, drift_monitoring, dataset_curation, and hyperparameter_optimization.

from mvp.job_ai.ai_mcp.recipes import get_ai_recipe
from mvp.job_framework.recipes import run_recipe

recipe = get_ai_recipe("full_model_training")
result = run_recipe(recipe, initial_input={...})

Recipe execution may return a useful qualified-draft result with warning_card and evidence when optional enrichment or production integrations are unavailable.

Tracker And Capability Truth

Experiment tracking uses InMemoryTracker by default. The ExperimentTracker ABC is the extension point for MLflow, W&B, or another external tracker, but no external tracking backend is wired by default and no network tracking calls are made.

Call the MCP get_capabilities tool to inspect the active classifier mode, redacted LLM backend state, grounding availability, sensitive ops, recipes, tracker backend, SQLite store status, and deterministic rule modules.

The component uses only these completion states in its job_ai envelope: verified, qualified-draft, and blocked-escalated. Degraded-but-useful results use qualified-draft with a warning_card; failures use blocked-escalated.

Launch-Mode Behavior

Deterministic by default

job_ai is configured for pilot and launch use by default. It runs deterministic local checks for data readiness, model evaluation, training diagnostics, fairness, latency, canary health, and deployment evidence.

External enrichment is intentionally off by default. That means ordinary tool calls do not perform web search, debate deliberation, Bayesian enrichment, or LLM-generated professional analysis unless you opt in.

To enable richer but slower enrichment, set one of these environment variables before starting the MCP server or job runner:

G6_JOB_AI_ENRICHMENT=1
# or, for all job agents that honor the shared switch
G6_JOB_ENRICHMENT=1

Use enrichment mode when you explicitly want additional research, deliberation, or LLM commentary. Keep it disabled for first-run onboarding, CI, demos on unreliable networks, and privacy-sensitive pilot work.

Deployment Readiness Caveat

deploy_model does not deploy infrastructure by itself. It creates a deployment-readiness record and returns a status.

A model is only marked ready_for_deployment when all required launch evidence is present:

  • latencies_ms from an inference benchmark
  • canary metrics from a small supervised rollout
  • fairness_passed from a fairness review
  • model_card_complete, model_card, or model_card_url

If any evidence is missing, the response stays pending_review and includes readiness.evidence_gaps, readiness.deployment_blockers, and a plain-language summary.next_actions list.

Treat ready_for_deployment as permission to proceed with a supervised rollout, not as proof that the model is safe for unsupervised production use.

Public API

JobAIBlock(JobAgentBlock)

G6 AI job agent - Tier 1 block with MCP delegation.

Field Type Default
name str 'job_ai'
sector SectorClassification field(default_factory=lambda: _SECTOR)
toolkit ToolkitSpec \| None field(default_factory=lambda: JOB_TOOLKITS.get('ai'))
mcp_module str 'mvp.job_ai.ai_mcp.server'
agentic_planner object \| None None
capabilities ClassVar[set[type]] {Extensible, HumanLearnable, Collaborative, ProblemSolvable, KnowledgeGrounded, Memorable, AgentCommunicable, ExternallyAdaptable}

Methods:

infer(data: JobAIInput) -> Result[JobAIOutput]

JobAIInput(JobInput)

Input for the AI job agent.

JobAIOutput(JobOutput)

JobAIMCPBlock(AIBlock[MCPJobAIInput, MCPJobAIOutput, dict])

26-op MCP block for the AI job agent.

Field Type Default
name str 'job_ai_mcp'
state dict field(default_factory=dict)
db_path str ':memory:'
resource_bounds ResourceBounds field(default_factory=ResourceBounds)
usage ResourceUsage field(default_factory=ResourceUsage)

Methods:

infer(data: MCPJobAIInput) -> Result[MCPJobAIOutput]

MCPJobAIInput(BaseModel)

Input to JobAIMCPBlock - 26-op dispatch.

Field Type Default
op Literal['train_model', 'evaluate_model', 'preprocess_data', 'tune_hyperparams', 'deploy_model', 'analyze_metrics', 'evaluate_fairness', 'assess_drift', 'benchmark_inference', 'audit_dataset', 'create_proposal', 'review_deliverable', 'delegate_task', 'report_status', 'request_feedback', 'store_artifact', 'retrieve_artifact', 'list_artifacts', 'search_artifacts', 'archive', 'plan_sprint', 'track_progress', 'reflect_on_outcome', 'list_patterns', 'get_capabilities', 'info'] required
task str ''
context dict[str, Any] Field(default_factory=dict)
parameters dict[str, Any] Field(default_factory=dict)
artifact_id str ''
query str ''

MCPJobAIOutput(BaseModel)

Output from JobAIMCPBlock.

Field Type Default
op str required
result str ''
artifacts list[dict[str, Any]] Field(default_factory=list)
records list[dict[str, Any]] Field(default_factory=list)
message str ''
count int 0
found bool False
metadata dict[str, Any] Field(default_factory=dict)
degraded bool False
degradation_reason str \| None None
completion_state Literal['verified', 'qualified-draft', 'blocked-escalated'] 'qualified-draft'
warning_card dict[str, Any] Field(default_factory=dict)
human_review_required bool False
evidence dict[str, Any] Field(default_factory=dict)
request_id str ''
task_id str ''
run_id str ''

AIStore(JobStore)

SQLite store for the AI job agent.

Constructor:

Parameter Type Default
db_path str ':memory:'

Functions

assemble_review_text(output: Any) -> str

Collect the reviewable free text from a JobAIOutput (duck-typed).

assess_ai_output(output: Any, qa_block: Any | None = None, generate: Any | None = None) -> GroundedRunResult

Run grounded four-valued QA over an AI-agent output.

MCP Tools

Operation Source
train_model ai_mcp
evaluate_model ai_mcp
preprocess_data ai_mcp
tune_hyperparams ai_mcp
deploy_model ai_mcp
analyze_metrics ai_mcp
evaluate_fairness ai_mcp
assess_drift ai_mcp
benchmark_inference ai_mcp
audit_dataset ai_mcp
create_proposal ai_mcp
review_deliverable ai_mcp
delegate_task ai_mcp
report_status ai_mcp
request_feedback ai_mcp
store_artifact ai_mcp
retrieve_artifact ai_mcp
list_artifacts ai_mcp
search_artifacts ai_mcp
archive ai_mcp
plan_sprint ai_mcp
track_progress ai_mcp
reflect_on_outcome ai_mcp
list_patterns ai_mcp
get_capabilities ai_mcp
info ai_mcp