Zum Hauptinhalt springen

Building tools

Author reusable workspace tools — prompt, template, or code — complete with their input/output JSON Schema interfaces. These scenarios use the tool functions.

Higento builds tools in small, verifiable steps: create minimal → fill in the body → define the interface → read back the draft. Edits stage a draft version you deploy in chat.


Author a prompt tool end-to-end

Goal — Create a prompt (llm_tool), give it a body and an input schema, and verify the draft.

Example prompt

"Create a prompt tool note_classifier that labels a note as urgent or normal. Its input should be a single note string. Then show me the finished draft."

Functions used

  1. tool-create — creates the llm_tool (minimal).
  2. tool-update — fills in the prompt body and description.
  3. tool-update-interface — sets the inwards schema, e.g. {"type":"object","properties":{"note":{"type":"string"}},"required":["note"]}.
  4. tool-read — reads the draft (with toolVersionId) to verify.

What you get — A prompt tool with a defined input contract, staged as a draft. Deploy it, then link it to agents with agent-link-tool.


Build a code tool with a structured result

Goal — Create a Python code_tool and define the structured output it returns.

Example prompt

"Create a code tool invoice_totals that takes a list of line items and returns the subtotal, tax, and total. Define its artifact schema."

Functions used

  1. tool-createtype: code_tool with a Python body (async def handler(event: dict) -> dict:).
  2. tool-update-interface — sets the artifact schema (for code tools, artifact is the editable interface, not inwards).
  3. tool-read — verifies the draft body and artifact schema.

What you get — A code tool whose Python handler is validated and whose structured output is described by the artifact schema.

Interface rules by type: llm_tool and template_tool edit inwards; code_tool edits artifact. The outwards interface is platform-fixed and can't be edited via Higento.


Update an existing tool's logic

Goal — Change a tool's body and keep its interface in sync.

Example prompt

"Update note_classifier to also detect spam, and add a spam boolean to its output."

Functions used

  1. folder-list — finds the tool id.
  2. tool-update — updates the body/prompt.
  3. tool-update-interface — updates the relevant schema for the new field.
  4. tool-read — confirms the draft.

What you get — An updated draft version; deploy it to publish.