---
sidebar_position: 6
title: Editing node prompts
---

# Editing node prompts

Every node in an agent has a **prompt** — the instructions handed to the
coding agent when that step runs. In the graph editor (both the deploy modal
and a deployed agent's **Overview** tab) each prompt is tagged with a badge:

| Badge | What it means |
|---|---|
| <span style={{color:'#34d399',fontWeight:600}}>EDITABLE</span> | The prompt is a stored text template. You can change it right here. |
| <span style={{color:'#d4b483',fontWeight:600}}>READ-ONLY</span> | The prompt is generated by the node's code at runtime. It can't be edited in the UI. |

The `!` next to the badge explains the same thing on hover.

## Editable prompts

A prompt is editable when the node declares it as a plain text template (a
string, optionally with `{{variables}}`).

The graph shown in the marketplace **deploy modal is a read-only preview** —
you pick the name and model there, not edit prompts. You edit editable
prompts **after you deploy**:

- Open the deployed agent's **Overview** tab.
- Click the node, edit the prompt, and save.
- The change applies to the next run **live — no redeploy needed**.

This is the right choice when you want non-developers to tune wording,
tone, or rules without touching code.

## Read-only prompts

A prompt is read-only when the node builds it **in code** — a function that
assembles the text from state, fetched context, or conditionals at runtime.
There's no fixed string to edit, so the editor shows a rendered preview only.

To change a read-only prompt you edit the agent's source and redeploy. You
don't need to leave your AI coding agent to do it — the
[Zibby MCP](../packages/mcp-cli) drives the whole loop from chat:

1. **Download the agent** — pull the deployed sources back to your machine.

   ```bash
   zibby agent download <uuid>
   ```

   Or, from an MCP-aware agent (Claude Code / Cursor / Codex / Gemini),
   ask it to call `zibby_download_agent`.

2. **Edit the node's code** — open the node file under
   `.zibby/workflows/<name>/nodes/` and change how the prompt is built. Your
   coding agent can do this directly.

3. **Redeploy to update** — ship the change back to the same agent.

   ```bash
   zibby agent deploy <name>
   ```

   Or have the agent call `zibby_deploy_agent`. The deployed agent updates in
   place; its UUID and trigger config stay the same.

:::tip Want it editable instead?
If a prompt would be better tuned by non-developers, convert the node from a
function prompt to a **string template**. Once it's a stored template, the
badge flips to **Editable** and it gains live-update from Overview.
:::

## Why the split exists

Function prompts exist for a reason: some nodes need to assemble instructions
from things only known at runtime — the linked ticket, the diff, prior
reviews, whether an integration is connected. A fixed text box can't express
that logic, so those nodes keep their prompt in code. Simpler, static prompts
stay as editable templates so anyone can adjust them.
