← All posts

Guides

AI Helper's agentic tool-calling workflow explained

A chat that only answers in text is useful. A chat that can inspect the page, write code into a live TEMP window, and save a finished rule for you is something else. AI Helper does the second thing through an agentic tool-calling workflow. Here is how it works.

What "agentic" means here

When you send a message, the model does not have to answer in one shot. It can decide it needs information — call a tool to get it — read the result, and continue. That cycle of think → act → observe → think is the agentic loop. In AI Helper the loop runs up to 8 steps per turn, then the model must give you a final answer. The cap keeps a turn bounded and predictable.

The tool protocol

Every provider has its own native function-calling format, and they do not match. To avoid three separate code paths, AI Helper uses one provider-independent text protocol. The model emits a tool call as a tagged block:

@@JZ_TOOL@@ {"tool": "query_page", "args": {"selector": ".cookie-banner"}} @@END@@

The extension parses that block, runs the tool, and feeds the result back into the conversation so the model can continue. Because it is just text, the exact same prompt and parsing logic work identically for OpenAI, Anthropic and Gemini — switch providers mid-chat and the workflow does not change.

The tools

AI Helper exposes a small, focused set of tools. They fall into three groups.

Inspection

Live testing

Persisting (with your confirmation)

Each of these three requires a separate, explicit user confirmation. The model cannot quietly write into your library — every folder, every group, every rule is a deliberate yes from you. Creating actions or action-bars is not part of this stage; the tools cover folders, groups and rules with CSS and JS.

The workflow the system prompt drives

The tools are only half the story — the system prompt tells the model how to use them in order:

  1. Ask for details — clarify what you actually want before touching anything.
  2. Inspect the page — use query_page to confirm the real structure instead of guessing.
  3. Test in a TEMP window — open a pane, set the code, let you see it live.
  4. Ask you to verify — "does the page look right now?"
  5. Persist only after you agree — and only then call a create tool, with its own confirmation.

This is the same path a careful human takes: look first, test second, save last.

A turn, step by step

Turn: "make the comments section collapsible"

step 1  query_page    .comments        -> 1 match, HTML returned
step 2  open_temp_pane  css            -> TEMP CSS window opens
step 3  set_temp_pane_code  ...        -> collapse CSS injected live
step 4  (text) "I added a collapse toggle - check the page."
        --- model stops, waits for you ---
You: "good, save it"
step 5  list_structure                 -> reads your folders/ids
step 6  create_rule  (confirm?)        -> you click confirm -> saved

Six steps used, two left in the budget. If a turn ever hits the 8-step cap, the model wraps up with what it has and tells you where things stand.

Tool-call chips

You are never guessing what the model did. Every tool call and its result render as a chip in the chat window — a compact card showing the tool name, its arguments, and a summary of what came back. Scroll the conversation and you can audit the entire turn: which selector was queried, what code went into which pane, which rule was created.

Why the text protocol matters to you

Provider-independent tooling is not just an implementation detail. It means you can pick a provider for cost or quality reasons and the agentic capability is identical. No "tool calling only works on provider X" caveats. Switch in the chat window mid-task and keep going.

See also

The agentic workflow is built into AI Helper today. Download JustZix, add an API key, and ask it to build something — then watch the chips.

Rate this post

No ratings yet — be the first.

Try it yourself

Install JustZix and paste any snippet from this article. Two minutes from zero to a working rule across all your devices.

Get JustZix

Features · How it works · Examples · Use cases