Agent workflows
Agent integration
Use the Parchment CLI as a stable interface for AI agents, coding assistants, and external automation.
The CLI is the preferred documented automation surface for most non-visual workflows. It gives agents stable command names, explicit auth requirements, predictable output modes, and a machine-readable manifest when needed.
The Purveyors web app also imports CLI modules directly for chat tools, which keeps browser, terminal, and agent behavior aligned on shared domain logic.
Recommended agent patterns
- For shell-based automation, authenticate once, then call purvey commands with JSON or CSV output that suits the surrounding workflow.
- For code-side integrations, import stable subpaths such as @purveyors/cli/catalog, @purveyors/cli/inventory, @purveyors/cli/roast, @purveyors/cli/sales, @purveyors/cli/tasting, @purveyors/cli/manifest, @purveyors/cli/artisan, or @purveyors/cli/ai instead of screen-scraping CLI help text.
- Use purvey context first when a model needs dense onboarding text. Use purvey manifest for the preferred machine-readable contract, or purvey context --json when an existing caller needs compatibility-parity output.
- Prefer the CLI or its shared modules over coupling to deprecated /api/tools/* endpoints or private workspace route payloads.
How the web app uses the CLI
- The app imports CLI modules for catalog, inventory, roast, sales, and tasting operations inside chat tool execution. The CLI package also publishes manifest, Artisan, and AI helper subpaths for agent and integration surfaces.
- Read tools execute shared CLI functions directly. Write tools stay user-confirmed through proposal cards and constrained execution routes.
- This architecture keeps terminal, browser, and agent workflows aligned on the same domain rules and reduces drift between docs and implementation.
Agent bootstrap sequence
purvey auth login --headless
purvey manifest --pretty
purvey catalog search --origin "Ethiopia" --json