This episode covers a release pipeline designed specifically for agents: testing agent behavior inside CI, safely deploying code and model configuration with a blue-green pattern, and versioning agent profiles and tools so every release can be traced and rolled back.

In episode 18 you made an adaptive and reflective agent — one that can change its own strategy based on feedback. But remember our closing message: any change must be tested in a small group and must be rollback-able. The question now is, how do you test that change automatically, repeatedly, and safely before it reaches real users?
The answer is a CI/CD and release pipeline designed specifically for agents. Agents are unique compared to ordinary applications: their output is non-deterministic, their dependencies include model configuration and prompts, and "deploying" often means changing behavior, not just swapping code. Episode 19 covers three foundations of that pipeline: behavior testing in CI, safe deployment, and traceable versioning. Here is the roadmap for this episode:
A conventional pipeline tests with deterministic expectations: the same input must produce the same output. Agents are not like that — the same model can answer differently to the same question, and tool output changes all the time. This is not a bug; it is their nature. So the testing strategy must shift:
bun install --frozen-lockfile
bun run lint
bun run eval --suite regressions
bun run eval --suite safety --model gpt-4o-miniThe safety test here is not picking the model because it is cheap, but because a smaller model fails more often on edge cases — so it is a more sensitive problem detector. If the safety suite passes on the small model, it will very likely also pass on the big model.
An eval harness is the code that runs the agent against test scenarios and produces a score. It must be runnable both locally and in CI so the results are consistent. Here is a simple harness shape using the suite you already saw in episode 18:
import { HermesAgent, evaluateSuite } from "@hermes/sdk";
const agent = new HermesAgent({ profile: process.env.AGENT_PROFILE });
const result = await evaluateSuite(agent, {
cases: loadCases("./eval/cases/"),
scoring: {
taskCompletion: 0.5,
toolDiscipline: 0.3,
latency: 0.2,
},
});
if (result.totalScore < 0.85) {
process.exit(1);
}Run this harness in CI as a gate: if the score is below the threshold, the pipeline stops and there is no deploy. The minimum threshold should be raised gradually as the test dataset grows — so "passing CI" does not become an overgrown shrub with ever-declining quality.
Once CI passes, it is time to deploy. The agent's peculiarity: what changes is not only code, but also the model configuration — which model is used, temperature, top-p, the system prompt, the tool list. This configuration must be deployed as a versioned artifact, not changed manually on the server.
version: 1.4.0
model:
id: gpt-4o
temperature: 0.3
max_tokens: 2048
profile: ./profiles/support.ts
tools:
- web-search
- db-readonly
- escalate-human
memory:
ttl_days: 30Deploying model configuration carries the same risk as deploying code: a new version can lower quality. That is why you use the blue-green or canary pattern, rather than switching off the old version at once. Hermes deployment orchestration already supports both paths at the same time:
hermes deploy --env production --version 1.4.0 --canary 10%
hermes promote --env production --version 1.4.0The first command sends the new version to 10 percent of traffic; the second only promotes it fully once it is confirmed healthy. If a problem appears along the way, hermes rollback --env production returns traffic to version 1.3.9 within seconds.
Warning
Never change the prompt or the tool list directly on a production server. Changes not recorded in version control cannot be rolled back, cannot be audited, and almost always become a source of mystery later.
To be rollback-able, every part that affects behavior must have a version. In Hermes, there are three artifacts that must be versioned: the profile (persona and system prompt), the tool set (tool list and permissions), and the model config. The three are tied into one release tag, so restoring a version means restoring the behavior completely.
hermes tag --profile support@1.4.0 --tools @hermes/tools@2.1.3 --config 1.4.0For tracing history, use ordinary semver — agent releases follow the feat:, fix:, and breaking: pattern. Because agents are non-deterministic, add one special convention: every release stores its evaluation record (dataset, scores, models) as an attachment. That way, when a regression happens, you can answer two key questions: what changed, and how bad the change is.
Episode 19 turned the agent release process from "deploy code and pray" into a provable pipeline: behavior is tested in CI with an eval harness that produces scores, deployment uses a canary pattern that protects traffic, and every part — profile, tools, model config — is versioned and bound into a release that can be rolled back.
Key takeaways:
In the next episode 20 we raise observability to production scale: success metrics, dashboards for agent activity and tool usage, and alerts that wake you up when actions fail or behavior changes suspiciously. See you there!