Aigency icon

Aigency

Interact with Aigency API

Overview

The node interacts with the Aigency API, providing various operations to manage user-related data such as messages, subscriptions, capabilities, memories, and more. Specifically, the "Get Memories" operation retrieves a list of memory records associated with a specified user.

This node is useful in scenarios where you want to programmatically access or manipulate user data stored in the Aigency platform. For example, you might use it to fetch recent memories for a user to display in a dashboard, analyze user behavior, or integrate with other systems.

Practical example:

  • Retrieve the last 50 memories of a user (by User ID) starting from an offset of 0 to show recent activity.
  • Paginate through memories by adjusting the limit and offset parameters.

Properties

Name Meaning
User ID The numeric identifier of the user whose memories are being accessed.
Limit Maximum number of memory records to return. Must be at least 1.
Offset Number of memory records to skip before starting to collect the result set (for paging).

Output

The output is a JSON array where each item contains the result field holding the response from the Aigency API for the "Get Memories" operation. This typically includes an array of memory objects related to the specified user.

Example structure of one output item:

{
  "result": [
    {
      "memoryId": "string",
      "content": "string",
      "timestamp": "string",
      ...
    },
    ...
  ]
}

No binary data output is produced by this operation.

Dependencies

  • Requires an API key credential and API URL endpoint for the Aigency service.
  • These credentials can be configured either in the n8n credentials interface or via environment variables named AIGENCY_API_KEY and AIGENCY_API_URL.
  • The node makes HTTP POST requests to the Aigency API using JSON-RPC protocol.

Troubleshooting

  • Missing Credentials: If neither credentials nor environment variables are set, the node will throw an error indicating missing credentials. Ensure that the API key and URL are properly configured.
  • API Errors: If the API returns an error, the node will either throw an error or continue on fail depending on the node's configuration. Check the error message for details such as invalid user ID or rate limiting.
  • Invalid Parameters: Providing invalid values for User ID, Limit, or Offset may cause errors or unexpected results. Make sure User ID is a valid number, Limit is at least 1, and Offset is non-negative.
  • Network Issues: Connectivity problems to the API URL will cause request failures. Verify network access and API availability.

Links and References

Discussion