Which agent should I use?
| I want to… | Use this agent |
|---|---|
| Create a new use case from a business requirement | use-case-builder |
| Add a feature, change a trigger, or refactor an existing use case | use-case-modifier |
| Build a single workflow JSON file (not a full use case) | n8n-workflow-builder |
| Deploy, test, and fix a use case end-to-end | use-case-tester |
use-case-builder
The main architect agent. Give it a business goal and it designs and creates a complete use case from scratch. What it does:- Understands your goal — extracts the core business intent from your description. You don’t need to specify triggers, placeholders, or implementation details — the agent decides those.
- Reads platform documentation — always reads the use-case guide, config patterns, and Codika nodes guide. Reads trigger-specific and integration guides based on the architecture it designs.
- Researches similar use cases — searches the workspace for reference implementations and plan examples.
- Presents an architecture plan — shows you the proposed workflows, triggers, integrations, and deployment parameters before building anything.
- Creates the folder structure — scaffolds the use case with
config.ts,version.json, and the workflows directory. - Delegates workflow creation — invokes the
n8n-workflow-builderagent for each workflow, providing it with the full specification. - Validates everything — runs
codika verify use-caseto catch issues before you deploy.
The builder handles all implementation decisions — trigger types, credential scopes, placeholder patterns, sub-workflow extraction. Describe the what, not the how.
use-case-modifier
Modifies, extends, or refactors existing use cases. Reads the current architecture before making any changes. What it does:- Reads the entire use case — config.ts, all workflow JSON files, project.json. Summarizes the current architecture for your confirmation.
- Reads relevant documentation — always reads use-case-guide.md and config-patterns.md. Reads additional guides based on the modification (e.g., sub-workflow guide if extracting logic).
- Plans modifications — specifies which files will be modified, created, or deleted. Includes a risk assessment for breaking changes.
- Makes targeted edits — modifies existing workflow JSON with surgical edits. Delegates new workflow creation to
n8n-workflow-builder. Updates config.ts to reflect all changes. - Validates thoroughly — checks that existing workflows still pass validation after changes.
n8n-workflow-builder
Builds individual n8n workflow JSON files. Called by the other agents, but can also be invoked directly for single-workflow tasks. What it does:- Reads documentation — trigger-specific guide, Codika nodes guide, and any relevant integration guides.
- Researches similar workflows — searches existing use cases for reference implementations.
- Builds the workflow JSON — creates a complete, valid n8n workflow with correct node types, connections, placeholder usage, credential configuration, and node positioning.
- Validates before output — runs through a 20+ item checklist covering trigger types, Codika patterns, placeholder suffixes, connection integrity, and more.
- Credentials go on the model node (e.g.,
lmChatAnthropic), never onchainLlmoragent - Placeholder suffixes are the type name reversed:
FLEXCRED→_DERCXELF - Every IF node must have both branches connected
- Sub-workflows must have at least 1 input parameter
- No hardcoded IDs or secrets — everything uses placeholders
- Node positioning follows standard spacing (200px horizontal, 150px vertical)
use-case-tester
Tests and debugs use cases through automated deploy-trigger-inspect-fix loops. What it does:- Verifies prerequisites — checks the use case folder exists and passes validation.
- Deploys — uses
codika deploy use-caseto push to the platform. - Triggers each workflow — constructs test payloads from
inputSchemadefinitions and fires HTTP-triggered workflows. For schedule-triggered workflows, checks for manual trigger URLs. - Inspects results — on success, verifies output matches
outputSchema. On failure, fetches the node-by-node execution trace withcodika get execution --deep --slim. - Diagnoses failures — maps error patterns to root causes using a built-in diagnostic table covering 10+ common failure types.
- Fixes issues — edits workflow JSON or config.ts directly. For complex rewrites, delegates to
n8n-workflow-builder. - Re-validates and redeploys — runs verify before each redeployment.
- Repeats — up to 5 iterations. If still failing, escalates with a clear diagnosis of what’s wrong and what was tried.
- Sub-workflows first (no external dependencies)
- Independent parent workflows
- Workflow chains (parent → sub-workflow)
- Edge cases (empty inputs, missing optional fields, error paths)
| Error pattern | Root cause |
|---|---|
| credential not found | Wrong placeholder suffix or missing integrationUid in config.ts |
| Cannot read properties | Incorrect expression referencing a previous node |
| Codika Init failed | Missing MEMSECRT placeholder or wrong webhook path |
| resultData key mismatch | Output doesn’t match outputSchema definition |
| Workflow not found | Broken SUBWKFL placeholder reference |
| AI returns unstructured | Should use chainLlm instead of agent for structured output |
After 5 failed iterations, the tester doesn’t silently give up. It presents a clear diagnosis of what’s still failing, what it tried, and what the user should investigate (e.g., missing credentials, external API issues).
How agents delegate to each other
codika plugin for platform operations:
- use-case-builder →
codika:init-use-case,codika:verify-use-case - use-case-modifier →
codika:verify-use-case - use-case-tester →
codika:deploy-use-case,codika:trigger-workflow,codika:list-executions,codika:get-execution,codika:verify-use-case