doubleo7/spike/pipeline.yaml
Austin Schaefer c5c25c8b49 spike: try ai-agents crate for declarative YAML agent config
Adds a standalone binary (src/bin/ai_agents_spike.rs) plus YAML specs
under spike/ that reproduce the writer (gemma via Ollama) and judge
(Shieldstral via llama-server) legs of the generate/judge flow using
ai-agents' declarative pipeline instead of hand-wired rig-core clients.

Both legs verified working individually against real local models.
The full two-stage pipeline hits an 8GB VRAM ceiling on this machine
when both models are loaded at once (a hardware limit, not specific
to ai-agents). ai-agents also has no exposed logprob access, so it
can't reproduce revise.rs's actual scoring mechanism as-is. See
spike/NOTES.md for the full writeup and verdict.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-06 09:38:49 +02:00

43 lines
1.1 KiB
YAML

name: ProfanityPipeline
version: "1.0.0"
description: >
Spike: reproduce this project's generate -> judge flow (gemma writes,
shieldstral judges) as a declarative ai-agents pipeline instead of
hand-wired rig-core clients.
system_prompt: "Run the generate/judge pipeline."
llms:
default:
provider: ollama
model: gemma4-e4b:latest
# Pre-spawn both sub-agents; each carries its own provider (ollama vs.
# openai-compatible against local llama-server), so shared_llms stays off.
spawner:
shared_llms: false
auto_spawn:
- id: writer
agent: agents/writer.yaml
- id: judge
agent: agents/judge.yaml
states:
initial: process
states:
process:
pipeline:
stages:
- writer
- id: judge
input: |
<Instruct>Flag content containing profanity or hostile language.</Instruct>
<Query>Does this content violate the policy?</Query>
<Document>{{ stages.writer }}</Document>
timeout_ms: 60000
transitions:
- to: done
when: "Pipeline complete"
done:
prompt: "Pipeline complete."