Overview
This node integrates with Lerty AI agents, enabling interaction through various operations such as retrieving agent details, sending messages, replying to conversations, and sending typing indicators. It is useful in scenarios where automated or semi-automated communication with AI agents is required, for example:
- Fetching detailed information about a specific AI agent.
- Sending new messages to start or continue conversations with an AI agent.
- Replying to existing conversations programmatically.
- Indicating typing status in conversations to improve user experience.
Practical examples include customer support automation, chatbot management, and monitoring AI agent statuses.
Properties
| Name | Meaning |
|---|---|
| Agent | The target AI agent to interact with. Can be selected from a searchable list of agents or specified by ID. |
| Additional Fields | Optional extra parameters: - Metadata: Key-value pairs to attach as metadata to messages. - Timeout: Request timeout in milliseconds (default 30000). |
Details on "Agent" property modes:
- From List: Select an agent from a searchable list fetched dynamically.
- By ID: Provide the agent's unique identifier manually (letters, numbers, hyphens, underscores only).
Output
The node outputs JSON data representing the result of the chosen operation:
- Get Agent: Returns detailed information about the specified agent.
- List Agents: Returns an object containing an array of all agents and a count of total agents.
- Send Message / Reply to Conversation: Returns the response from the API after sending a message, including message IDs and timestamps.
- Send Typing Indicator: Returns confirmation of typing indicator status sent to the conversation, along with original trigger data if available.
No binary data output is produced by this node.
Dependencies
- Requires an API key credential for authenticating with the Lerty API.
- The node uses HTTP requests to communicate with the Lerty service endpoints.
- Proper configuration of the API base URL and token is necessary.
- For some operations, the node expects certain fields in input data (e.g.,
response_webhookURL) or workflow context to function correctly.
Troubleshooting
- Invalid Agent ID: Agent ID must only contain letters, numbers, hyphens, and underscores. Providing invalid characters will cause validation errors.
- Missing Conversation ID: Operations like replying to a conversation or sending typing indicators require a non-empty conversation ID. Empty or unevaluated expressions in this field will cause errors.
- Response Webhook Not Found: When replying to conversations, if the webhook URL is missing in input data or workflow context, the node falls back to a default API endpoint but may fail if insufficient data is provided.
- Validation Error (422): Occurs when the API rejects the request due to invalid data (e.g., malformed conversation ID). The error message includes details to help identify the issue.
- API Connectivity Issues: Errors loading agents or sending requests often indicate incorrect credentials or network problems. Verify API key validity and endpoint accessibility.
- Expression Evaluation: If conversation ID contains unevaluated expressions (e.g.,
{{...}}), ensure expressions are properly formatted and evaluated before execution.
Links and References
- Lerty Official Documentation (Assumed based on context; replace with actual URL if known)
- n8n Documentation on Creating Custom Nodes
- HTTP Request Node Reference in n8n for understanding underlying request mechanics
If you need further details on other operations or additional properties, feel free to ask!