Add workflows command for reusable deep research templates#70
Merged
Conversation
Workflows are versioned, templated deep research starting points: a saved prompt, research strategy, report format, deliverables, and recommended mode with typed variables. Fill in the variables and run one to start a normal deep research task - same auth, billing, and lifecycle. New `valyu workflows` command: - list / get / versions discover curated and org-owned templates - preview resolve a template against params (no credits spent) - run run a template, with optional mode/version overrides and --watch - create / update / delete manage org-owned templates from JSON definitions Adds the matching client methods and types, a SKILL reference, README section, and client tests. Bumps the CLI to 1.1.0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new
valyu workflowscommand for reusable, versioned deep research templates. A workflow is a saved prompt, research strategy, report format, deliverables, and recommended mode with typed{variables}. Fill in the variables and run one to start a normal deep research task - same auth, billing, and lifecycle as a freeform task.Two scopes: curated Valyu templates available to everyone (read-only), and org templates each organization creates and versions privately.
Command surface
runreuses the existing deepresearch watch loop, so--watchstreams progress andvalyu deepresearch status/watch <id>track it like any other task.Implementation
src/commands/workflows/index.ts- the new command (8 subcommands).src/lib/client.ts- workflow client methods + types; adds a PATCH helper to the request layer.src/cli.ts- registers the command and adds a top-level example.src/commands/deepresearch/index.ts- exportswatchResearchfor reuse byworkflows run.skills/valyu-cli/references/workflows.md.Testing
pnpm build/pnpm typecheck/pnpm testall pass (45 tests, 9 new covering the workflow client methods, query-string building, PATCH/DELETE verbs, and run-override behaviour).get/versions/previewresponse shapes, and ran a real workflow (fast mode) end-to-end which created a task with the expected workflow linkage, then cancelled it.Notes for reviewers
--param key=valueare coerced to number/boolean when they look like one;--params-file(or--params-file -for stdin) preserves exact JSON for awkward values.org/name) slugs.runonly forwards overrides (mode,version,webhook,alert-email) when explicitly provided, so a template's own recommended mode and output formats apply by default.Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.