Build, Instrument, and Evaluate an Agent Plugin with Telvine
A complete Telvine workflow from a downloadable plugin example to telemetry, native Promptfoo evals, version comparison, and release checks.
Start with the downloadable lifecycle example. Extract it as promptfoo-plugin. It contains a manifest, a Skill, a native Promptfoo suite, and a synthetic provider. The provider demonstrates adapter plumbing offline; replace it with your actual plugin harness before making a quality or performance claim.
Build and inspect
npm i -g @telvine/cli
telvine login
telvine publish ./promptfoo-plugin --dry-run
telvine publish ./promptfoo-plugin
Expected evidence: a plugin version, component inventory, discovered Skill, imported outcomes suite, and returned plugin ID. Keep generated keys in secret configuration. Publishing neither installs the plugin nor executes the suite.
Instrument the real harness
Wrap actual Skill execution with skill.invocation.start, skill.invocation.end, and skill.invocation.error. Observe non-Skill behaviour with plugin.component.invoked and plugin.component.error. Use the envelope in the event schema and authentication in onboarding. Emit durations in milliseconds and coarse error classes. Do not emit prompts, files, connector payloads, tool arguments, or outputs. Verify with synthetic success and failure runs before deployment.
Expected evidence: version-attributed runtime observations, including coverage. The example's stub has no production instrumentation and must not be presented as production adoption.
Run the baseline
Install a pinned Promptfoo version in your environment and make its executable available on PATH. Substitute its actual version and the returned plugin ID:
telvine eval run ./promptfoo-plugin --suite outcomes \
--plugin-id plg_YOUR_PLUGIN --version 0.1.0 \
--trials 3 --engine-version YOUR_PINNED_PROMPTFOO_VERSION
Expected evidence: completed run IDs, coverage, pass rates, and gate reasons. Full exports stay local; Telvine receives metadata-only results. Passing the shipped synthetic provider proves adapter wiring only.
Compare a candidate
Replace the provider with a real harness before establishing the baseline. Keep the provider and suite unchanged for the candidate comparison; change the tested plugin implementation. Update the manifest version to 0.2.0, publish, and use the matching baseline run ID:
telvine publish ./promptfoo-plugin
telvine eval run ./promptfoo-plugin --suite outcomes \
--plugin-id plg_YOUR_PLUGIN --version 0.2.0 \
--trials 3 --engine-version YOUR_PINNED_PROMPTFOO_VERSION \
--baseline-run-id evr_YOUR_BASELINE
Enable gate_policy.require_baseline and configure max_regressions in suite.json before registering the comparison suite and running its baseline. Compare like-for-like variants; each provider/prompt combination has its own evidence.
Inspect release eligibility
Read GET /v1/plugins/PLUGIN_ID/versions/VERSION/release-evidence through an authenticated Telvine client. Review every regression/holdout suite, missing trials, and blocked gate reasons. Stable promotion requires passing evidence; production latency remains a separate review signal. Use the detailed eval guide for authentication and promotion operations, and the performance guide to interpret observed metrics.