CLI / MVP

convoy validate

Parse every .cvy file in a folder, resolve references, and check every language rule. Needs no server unless a provider names a type that is not built in. Exits 3 on errors.

View .md
Text
convoy validate [--dir <path>] [--json] [--graph]

validate never contacts a model. It contacts convoyd only when a provider names a type that is not built in, to read that type’s schema. A swarm on the built-in types validates with no server at all.

What it does

  1. Loads every *.cvy file in the folder and merges them into one configuration.
  2. For providers whose type is not built in, asks convoyd (--server) to resolve the types, in one call. The server fetches a type it does not hold, but never runs provider code for this.
  3. Resolves references, builds the dependency graph, and checks every rule in Validation rules, including each provider’s attributes and each agent’s tools, settings, and model against its type.
  4. Prints each diagnostic with its source line, warnings first, then errors, separated by blank lines.
  5. Exits 3 if there is any error, otherwise prints validate: ok (N agents, M topics) and exits 0.

When the server is down

validate keeps each type’s manifest it receives in your user cache folder (convoy/providers/ under it), indexed by server, source, and constraint. When convoyd cannot be reached, it checks the swarm against the cached manifest and warns with TS017, naming the version and how old the copy is. With nothing cached, TS017 says the type was not checked, and the swarm still validates. The cache is a convenience: the server’s answer always wins, and convoy run is checked on the server regardless.

Terminal
$ convoy validate
Warning: Provider type checked against a cached copy (TS017)

  on providers.cvy line 2, in provider "fast":
   2:   source = "acme/acme"

No server could be reached, so provider "fast" was checked against the cached
manifest of acme/acme 1.4.2, cached 3 days ago. convoy run checks it on the server.

validate: ok (6 agents, 4 topics)

Some checks need the server and cannot run here: whether convoyd has a default overseer (overseer_missing), whether its environment has the provider keys (missing_env), and the server’s price for the overseer model when it comes from server flags (unpriced_model). Those surface on convoy run.

Flags

FlagMeaning
--jsonPrint {"valid": bool, "diagnostics": [...]} on stdout
--graphPrint the dependency graph in DOT format and exit 0 if there are no errors

Each JSON diagnostic has severity, code, summary, detail, and range (file, start and end with line and column).

Examples

Terminal
$ convoy validate
validate: ok (6 agents, 4 topics)

A warning does not fail validation:

Terminal
$ convoy validate
main.cvy:31: warning: agent "writer" watches topics and keeps the default max_turns (50)

validate: ok (6 agents, 4 topics)

An error does:

Terminal
$ convoy validate
main.cvy:44: error: agent "critic" watches topic "reviews", which is not declared
  did you mean topic "review"?

main.cvy:19: error: references form a cycle: agent.writer -> agent.critic -> agent.writer
$ echo $?
3

Render the graph:

Terminal
$ convoy validate --graph | dot -Tsvg > swarm.svg

Machine-readable output:

Terminal
$ convoy validate --json
{"valid":false,"diagnostics":[{"severity":"error","code":"TS020","summary":"undeclared topic","detail":"agent \"critic\" watches topic \"reviews\"","range":{"file":"main.cvy","start":{"line":44,"column":12},"end":{"line":44,"column":31}}}]}

Exit codes

CodeCause
0No errors (warnings allowed)
3At least one error

API endpoint

POST /v1/providers:resolve, only for provider types that are not built in.

Last updated 2026-11-05
esc
    ↑↓ to move · ↵ to open
    Menu
    Get started
    IntroductionInstallQuickstartYour first swarm
    Concepts
    Swarms and runsAgents and turnsTopics and the boardThe overseerSpawning agentsBudgets and limits
    DSL
    Language rulesswarmprovidertopicagentReferences and functionsValidation rules
    Providers
    Provider typesUsing a provider typeWriting a provider type
    CLI
    Overviewconvoy goalconvoy validateconvoy runconvoy statusconvoy watchconvoy sayconvoy stopconvoy uiconvoy provider
    Runtime
    convoydControllerMessage boardRunnerSwarm tools (MCP)Web UIDurability
    Architecture
    OverviewRepository layoutSeams and contractsHTTP API
    Examples
    OverviewWriter and criticResearch teamCode teamPaperBench replicationCommit0 libraryVending-BenchSWE-Lancer bountyτ²-bench loop
    Inspiration
    What we borrowedThe harness landscape