API Triggers empower developers to programmatically activate Relevance AI agents, creating powerful automation workflows that integrate seamlessly with your existing systems and applications.
API Triggers allow you to initiate agent tasks directly through the Relevance AI API, enabling programmatic control over when and how your agents are activated. This capability is particularly valuable for developers and technical teams who want to incorporate AI agents into their applications, services, or automated workflows.With API Triggers, you can build sophisticated systems where your agents respond to events in your custom applications, process data from proprietary systems, or execute tasks based on complex business logic that you define.
API Triggers function by exposing endpoints in the Relevance AI API that allow you to:
Initiate a new conversation with an agent
Send messages to an existing conversation
Provide context and data for the agent to process
Receive responses and actions taken by the agent
When triggering an agent via API, the response is not returned directly. Instead, the result must be sent to a specified destination, such as uploading the final output to Google Sheets.
You’ll need to generate an API key (Authorization Token) to authenticate your requests. Make sure to save your API key somewhere safe. Once generated, you won’t be able to view it again. However, you can regenerate one at any time.
To find your Agent ID, you can ask your agent directly in the chat (“What is your agent ID?”). Or, you can check the URL. When your agent is open, look at the URL in your browser. The agent ID is the second long code after the region code in the URL structure: Example: https://app.relevanceai.com/agents/{region}/{project_id}/{agent_id}/edit
Webhook Triggers - Use webhooks to trigger your agents from third-party services that support outbound webhooks.Integration Triggers - Connect your agents to popular third-party services using our prebuilt integration triggers.
What programming languages can I use with API Triggers?
You can use any programming language capable of making HTTP requests. Our examples use Python, but the API is language-agnostic.
Are there rate limits for API Triggers?
Yes, API usage is subject to rate limits based on your subscription plan. Please refer to your plan details for specific limitations.
Can I use API Triggers with serverless functions?
Absolutely! API Triggers work well with serverless architectures like AWS Lambda, Google Cloud Functions, or Azure Functions.
How secure are API Triggers?
API Triggers use industry-standard authentication and encryption. All API requests must be authenticated with your API key, and all data is transmitted over HTTPS.