LoomCycle Agent Definition
AI-generatedSummary
Manages versioned loomcycle agent definitions via POST /v1/_agentdef. Operations are create, fork, get, list versions, promote, retire and verify. The node sends the selected operation plus its fields and returns the server's response under result.
Inputs
- operation (required) — One of create, fork, get, list, promote, retire, verify. Sent as
op. The node's default is list. - name (required) — Agent definition name. Shown for get, list, create, retire and verify.
- defId (required) — Required for promote. Optional for retire: leave it empty to retire the active version of
name. Sent as def_id. - parentDefId (required) — Fork only. The def_id of the row to fork. Fields not in the overlay are inherited from it.
- defDescription — Create and fork. A description of this version, used for lineage audit.
- agentProvider — Create and fork. Choose anthropic, code-js, deepseek, gemini, ollama or openai, or leave it unset. A chosen value overrides
providerin the overlay. - code — Create and fork, only when the provider is code-js. Inline JavaScript sent as overlay.code_body. If empty, loomcycle falls back to agent_code/
/index.js on the host. The host needs LOOMCYCLE_CODE_AGENTS_ENABLED=1. - overlay — Create and fork. A JSON object of content fields such as model, max_iterations, allowed_tools and system_prompt. Fork merges it onto the parent. An empty object is omitted. Invalid JSON is passed through as the raw string rather than raising an error.
- promote — Create and fork. If true, the new version becomes active immediately. Default false.
- contentSha256 (required) — Verify only. A local content hash, for example from
loomcycle hash agent <path>, compared with the deployed active row.
Output shape
One output item per input item, shaped as { result:
Create returns a
deduplicatedflag in the response when the content is byte-identical to an existing version. The node does not document the exact verify and list shapes. Errors such as auth failure, not found, invalid argument or substrate refusal are mapped to n8n API errors. With Continue On Fail enabled, the item carries { error } instead. The credentialloomCycleApisupplies the base URL and bearer token.
Examples
Example 1: Deploy a new agent version and make it live
Operation=Create, Name=support-bot, Provider=Anthropic, Overlay={"model":"claude-sonnet-4","system_prompt":"..."}, Promote to Active=true
Example 2: Check whether the deployed agent matches a local file
Operation=Verify, Name=support-bot, Content SHA256=<hash from loomcycle hash agent>
Example 3: Roll back by promoting an older version
Operation=List Versions to find the def_id, then Operation=Promote with Def ID set to that value