Skip to content

Agent Pipeline

Every task in Nova flows through a configurable pipeline of specialized agents. The default pipeline — called the Quartet — runs four agents in sequence, with a fifth (Decision) triggered only on failure.

Context Agent -> curates relevant code, docs, prior task history
Task Agent -> produces the actual output (code, config, answer)
Guardrail Agent -> checks for prompt injection, PII, credential leaks, spec drift
Code Review -> pass / needs_refactor / reject (loops back to Task, max 3 iterations)
| blocked + rejected
Decision Agent -> ADR artifact + human escalation
AgentRoleModel class
ContextGathers relevant code, documentation, and prior task history. Detects ambiguous requests and can pause with clarification questions before the expensive Task Agent runs.Standard
TaskProduces the actual output — code, configuration, answers, or any artifact the user requested.Standard
GuardrailLightweight safety check: prompt injection detection, PII scanning, credential leak detection, specification drift analysis.Haiku-class (fast, cheap)
Code ReviewReviews the Task Agent’s output. Verdicts: pass, needs_refactor (loops back to Task, max 3 iterations), or reject (escalates to Decision).Standard
DecisionTriggered only on rejection. Produces an Architecture Decision Record (ADR) artifact and escalates to human review.Standard

After the main pipeline completes, these agents run in parallel, on a best-effort basis (non-blocking — failures don’t affect the task result):

  • Documentation Agent — generates or updates docs for the task output
  • Diagramming Agent — creates architectural or flow diagrams
  • Security Review Agent — deeper security analysis beyond the guardrail check
  • Memory Extraction Agent — extracts key facts and patterns for long-term memory storage

The pipeline is driven by a Redis task queue:

ParameterValue
Dispatch mechanismRedis BRPOP — long tasks don’t block the HTTP layer
Heartbeat interval30 seconds
Stale task timeout150 seconds (reaper reclaims abandoned tasks)
CheckpointsPipeline state is checkpointed between stages for recovery

Tasks move through 11 states:

submitted -> queued -> context_running -> task_running -> guardrail_running
-> review_running -> pending_human_review -> completing -> complete

Additional terminal/special states: failed, cancelled, clarification_needed.

  • pending_human_review pauses the pipeline — the task waits without failing
  • clarification_needed — Context Agent detected ambiguity and paused with questions. The user answers via POST /clarify, and the pipeline resumes from its checkpoint with enriched input
  • Tasks can be cancelled from the dashboard at any state

A pod is a named pipeline configuration that determines which agents run and with what settings. Nova ships with five default pods:

PodAgentsUse case
Quartet (system default)Context, Task, Guardrail, Code ReviewAll code and configuration tasks
Quick ReplyTask onlyFast answers, low-stakes queries
ResearchContext, Task (with web search tools)Information gathering
Code GenerationFull Quartet + git toolsProduction code, auto-commit on pass
AnalysisContext, Task (read-only tools)Codebase audit, no write operations

Every agent is fully configurable. Settings are stored in the database and editable through the dashboard UI:

Per-agent settings:

  • name, role, model, temperature, max_tokens, timeout_seconds, max_retries
  • system_prompt override, task_description
  • allowed_tools[] — which MCP tools the agent can invoke
  • on_failure behavior
  • run_condition — controls when the agent executes: always, never, on_flag, has_tag, or compound conditions (and, or)
  • output_schema (JSON schema for structured output), artifact_type

Per-pod settings:

  • name, description, enabled/disabled, default_model
  • max_cost_usd, max_execution_seconds
  • require_human_review, escalation_threshold
  • routing_keywords[], routing_regex, priority, fallback_pod_id