Documentation menu

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.

ExampleKey activityWhat it shows
Hello World / echoechoThe minimal workflow: return an input unchanged.
LLM chatlitellm_chatOne completion against any provider.
Text-to-imagereplicate_text2imageGenerate an image from a prompt.
Image evaluationsimple_judgeGrade a generated image against a rubric.
Batch processinglitellm_batchRun many prompts in one step.
Multi-model comparisonlist_emit_awaitFan one prompt across several models and compare.
Document translationlitellm_chatRead a file, translate it, save the result.
Image-to-videoReplicateAnimate 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.