Extend your MLOps workflow to AI agent development
Package an agent evaluator as a Polyaxon component, track candidate revisions and task metrics, and compare changes using existing MLOps workflows.
An ML team already knows how to connect a candidate model to its training data, parameters, evaluation, and deployment decision. An agent team needs a similar connection, but the candidate includes more than model weights. Its behavior also depends on instructions, retrieval, tools, and the rules that govern a task.
You can use Polyaxon's existing components, tracking, and comparison views for this work. Keep your agent framework inside the application, then give its evaluation runner the same explicit inputs and inspectable outputs as a training or validation job.
Identify what changes in an agent experiment
Consider a data-quality investigation agent. It inspects a failed validation report, queries a read-only metadata service, and writes an explanation for the pipeline owner.
The team wants to compare two retrieval strategies. Both candidates should use the same incident cases, model configuration, instructions, tool contracts, and scoring rubric. If one candidate also receives a different metadata snapshot, the result no longer isolates retrieval behavior.
Record an experiment manifest with the code revision, container digest, prompt revision, model identifier, inference settings, tool schema revision, retrieval configuration, and evaluation dataset revision. Include externally managed dependencies whose behavior cannot be fully pinned.
This manifest describes the conditions of the experiment. It does not promise bit-for-bit reproduction of a stochastic or provider-managed response.
Translate familiar MLOps artifacts
Several existing concepts transfer directly, with changes to their content:
| MLOps concept | Agent development equivalent |
|---|---|
| Candidate model configuration | Candidate application manifest |
| Evaluation dataset | Tasks, initial state, expected outcomes, and prohibited actions |
| Prediction records | Outputs, relevant tool events, and observed task results |
| Model metrics | Task quality, behavioral checks, latency, and complete-task cost |
| Data lineage | Source snapshots, retrieved evidence, prompts, and tool inputs |
| Deployment record | Application version plus permitted environment and authority |
Some boundaries need to remain separate. A saved evaluation report is an experiment artifact. A framework checkpoint is live execution state with its own consistency and recovery requirements. Storing both as files does not make their operational contracts interchangeable.
Wrap a useful unit of work
Choose a component boundary that produces a meaningful, inspectable output. For the investigation agent, one operation might process a partition of incident cases and emit a result record for each case.
The inner agent loop can remain inside the chosen framework. Splitting every model call into a separate infrastructure job would add startup and coordination work and may break the framework's state assumptions. Conversely, combining data preparation, all experiments, and final reporting into one opaque process makes individual failures harder to rerun.
A useful lifecycle workflow has distinct operations for preparing the evaluation snapshot, executing candidate configurations, scoring outputs, and collecting the comparison. Independent candidates can run in parallel when the available compute and external-service budgets allow it.
Package the evaluator as a component
Here is a component template for the investigation example. Build an image containing your agent_eval Python module, the polyaxon package, the agent's dependencies, and a sanitized evaluation fixture at /app/evaluation/import-incidents-v4.jsonl. The module and image name are application-specific examples, not Polyaxon-provided software. Its argument parser must implement the flags shown below.
version: 1.1
kind: component
name: evaluate-investigation-agent
inputs:
- name: retrieval_strategy
type: str
value: hybrid
isOptional: true
- name: context_budget
type: int
value: 4096
isOptional: true
run:
kind: job
container:
image: registry.example.com/team/agent-eval:release-17
command: [python3, -m, agent_eval]
args:
- "--cases=/app/evaluation/import-incidents-v4.jsonl"
- "--retrieval-strategy={{ retrieval_strategy }}"
- "--context-budget={{ context_budget }}"
resources:
requests:
cpu: "1"
memory: 2Gi
limits:
cpu: "2"
memory: 4GiThe input declarations make candidate configuration explicit in the component specification. The runner should record the fixture digest, prompt revision, tool schema revision, and provider model identifier with tracking.log_outputs, then log numeric results with tracking.log_metrics. Save case-level results with artifact logging. The tracking example shows those calls together.
For an API-backed model, supply credentials using a configured connection or Kubernetes Secret reference, not a component input. The CPU and memory values above describe the evaluation worker; a self-hosted model may need a separate serving workload with its own GPU allocation.
Save the component as evaluate-agent.yaml. After replacing the illustrative image, a team can register its definition using the documented component registration command:
polyaxon components register --version your-team/evaluate-agent:1.0 -f evaluate-agent.yamlPin the deployed image by digest for qualification and keep approved component versions from being overwritten. A version label is useful only if it continues to identify the definition that produced the comparison.
Make comparisons fair
Pair candidates on the same cases. Preserve case-level results so a reviewer can inspect where one version improved and where it regressed. Report unprocessed cases and execution failures explicitly; excluding them silently can favor an unreliable candidate.
Keep evaluator inputs consistent. If the evaluator needs the source evidence to assess a diagnosis, supply the corresponding snapshot for both candidates. If a rubric changes, rescore both outputs or identify the comparison as using different measurement procedures.
Repeated runs may be needed to estimate variability. Cache stable preparation work when appropriate, but make sure a repeated agent evaluation actually executes the calls intended for measurement. A cached successful response is evidence of reuse, not another independent success.
Use development cases for prompt and retrieval tuning. Reserve a separate qualification set so repeated inspection of failures does not turn the final evaluation into another development loop.
Reuse Polyaxon execution and tracking
Once the component exists, reuse it for the next retrieval change rather than copying the evaluation job. Team members can inspect the same typed inputs and compare its executions in the runs dashboard. Keep the code, container, and data revisions visible alongside the metrics.
Use a DAG for the preparation, execution, scoring, and collection dependencies. Grid search can enumerate a deliberately bounded set of configurations, such as retrieval strategy and context budget. Keep provider request limits in the application or shared service that manages those calls.
Log configuration and numeric results through tracking. Retain the manifest, case-level output records, and comparison report as artifacts. Link a candidate back to the actual source snapshots and fixture versions used.
A scored result might identify the case, candidate, accepted outcome, failure category, duration, and resource usage. Keep protected incident content in access-controlled storage rather than duplicating it into every metadata field.
Share infrastructure without merging responsibilities
The agent framework owns its dynamic control flow and continuation behavior. The application owns user authorization, tool policies, and business outcomes. Polyaxon supplies execution and experiment-management building blocks around that application.
Those responsibilities can be connected through explicit identifiers and versioned contracts. They should not be inferred from the fact that a workload completed successfully. An agent can exit normally after producing an incorrect diagnosis, and a replacement workload needs application support to resume unfinished work.
The runtime-layer guide covers the live execution boundary. The deployment checklist covers the evidence needed to launch.
Start the integration with one recurring decision: whether a proposed agent change should replace the current version. A reproducible path from candidate configuration to reviewed comparison gives the team something immediately useful, while creating infrastructure that can support additional agents later.