Examples & recipes
Starting points you can copy and adapt. The first half is workflow JSON — the init_params / step_configs / steps shape from workflows & steps. The second half is agent recipes you run in plain language from Claude Code or any MCP client.
Workflow JSON examples
Eight common shapes, smallest first. Two are shown in full below; the rest follow the same pattern, where you pick an activity, point its config at an init_params path, and list it in steps.
| Example | Key activity | What it shows |
|---|---|---|
| Hello World / echo | echo | The minimal workflow: return an input unchanged. |
| LLM chat | litellm_chat | One completion against any provider. |
| Text-to-image | replicate_text2image | Generate an image from a prompt. |
| Image evaluation | simple_judge | Grade a generated image against a rubric. |
| Batch processing | litellm_batch | Run many prompts in one step. |
| Multi-model comparison | list_emit_await | Fan one prompt across several models and compare. |
| Document translation | litellm_chat | Read a file, translate it, save the result. |
| Image-to-video | Replicate | Animate a still into a short clip. |
Echo: the minimal workflow
Pass a message in via init_params and a single step returns it. Useful for confirming a collection and token are wired up end to end.
{
"init_params": { "message": "Hello, Jetty" },
"step_configs": {
"echo": { "activity": "echo", "text_path": "init_params.message" }
},
"steps": ["echo"]
}LLM chat
One completion. The prompt_path points at a value in init_params, so you can change the prompt at run time without editing the workflow.
{
"init_params": { "user_prompt": "Summarize the theory of relativity in 3 bullets" },
"step_configs": {
"chat": {
"activity": "litellm_chat",
"model": "gpt-4",
"prompt_path": "init_params.user_prompt"
}
},
"steps": ["chat"]
}Agent recipes
With the MCP server or the Claude Code plugin installed, you describe the outcome instead of writing JSON by hand. Each recipe below works as a /jetty … command or as plain natural language.
- Create & run a task: “Create a task that summarizes a URL with gpt-4 and run it.” The agent builds the workflow JSON, creates the task, and kicks off the run.
- Compare models: “Run this prompt across gpt-4, claude, and gemini and show me the differences.”
- Generate & evaluate: “Generate three images for this brief and grade each against my rubric.” Pairs a generation step with
simple_judge. - Batch process: “Translate every row in this CSV to French.” Fans out over the list.
- Debug a failing run: “Why did my last run fail?” The agent pulls the trajectory, finds the failing step, and proposes a fix.
Next: the building blocks behind these in workflows & steps and the full step library. New to Jetty? Start with the quickstart, or wire it into an app with the SDK.