When to Use
- Reusable logic - Encapsulate common workflows (email parsing, data validation) and call them from multiple places
- Complex sub-processes - Break large workflows into manageable pieces
- Team collaboration - Different team members can own different agents
- Versioning - Update a shared agent without modifying every workflow that uses it
- Separation of concerns - Keep workflows focused on one responsibility
Example: Lead Qualification Pipeline
A main workflow that uses specialized agents for each step:Enrich the lead
Call Agent: Lead Enrichment AgentThis agent looks up company info, social profiles, and tech stack.
Score the lead
Call Agent: Lead Scoring AgentThis agent applies your scoring model and returns a score.
Example: Document Processing Hub
A central workflow that routes documents to specialized processors:Example: Approval Workflow
Use agents to encapsulate approval processes: Main workflow:Passing Data
Input Data
Pass data to the agent as a JSON object:Receiving Results
The called agent’s output becomes available as{{call_agent_1.result}}:
Design Patterns
Microservices Pattern
Break your automation into small, focused agents:| Agent | Responsibility |
|---|---|
| Email Parser | Extract data from emails |
| Sentiment Analyzer | Determine sentiment of text |
| CRM Updater | Handle all CRM operations |
| Notifier | Send notifications across channels |
Facade Pattern
Create a simplified agent that orchestrates complex operations: Customer Onboarding Agent (called by main workflow):Chain of Responsibility
Pass data through a series of processing agents:Async Execution
SetwaitForCompletion: false for fire-and-forget scenarios:
Async calls return immediately with an
executionId. You won’t get the result in the current workflow - use webhooks or variables for callbacks.Error Handling
When a called agent fails, the Call Agent node captures the error:{{call_agent_1.status}} to handle failures gracefully.
Tips
Settings
Display name shown on the canvas.
Unique identifier for referencing outputs.
The ID of the CogniAgent application to call. Select from a dropdown of available agents in your workspace.
Data to pass to the called agent. This becomes the agent’s starting input.
Whether to wait for the agent to complete before continuing:
- true - Wait and get the results
- false - Fire and forget (async execution)
Maximum time to wait for completion (in milliseconds). Default is 5 minutes.
Outputs
The output data returned by the called agent (from its final node or explicit return).
Unique identifier for this execution of the called agent.
Execution status:
completed, failed, or timeout.How long the agent took to execute (in milliseconds).
Related Nodes
Ask AI
For simple AI tasks, an Ask AI node may be sufficient without a full agent.
Execute Code
For data processing, code might be simpler than an agent.
