Overview
The Agent API allows you to run automated agents that collect prompts from AI providers and analyze them for brand mentions. Agents handle the entire workflow from prompt collection to analysis asynchronously.Endpoints
run
Trigger an agent run to collect prompts from enabled AI providers and analyze them. Type: Mutation (Authorized Workspace) Rate Limit: 3 requests per minuteID of the workspace to run the agent for
Unique identifier for the agent job. Use this to check job status.Returns
null if status is “empty”Status of the agent run:
"queued": Agent job was successfully queued and is processing"empty": No prompts to collect or analyze
status
Check the status of a running agent job. Type: Query (Authorized Workspace)ID of the workspace
Job ID returned from the run endpoint
Current status of the job:
"pending": Job is still processing"completed": Job has finished
Job result data when completed, or null if still pending
Agent Workflow
The agent performs the following steps:- Collection: Queries enabled AI providers for prompts related to your domain
- Storage: Stores collected prompts with source metadata
- Analysis: Analyzes prompts for brand mentions
- Metrics: Generates aggregated metrics and insights
Prerequisites
Before running an agent:-
Configure Enabled Providers: Set which AI providers to collect from
-
Set Domain: Ensure your workspace has a target domain configured
Usage Examples
One-Time Agent Run
Manually trigger an agent run:Scheduled Agent Runs
Instead of manually triggering agents, you can schedule them using the Workspace API:Polling Best Practices
When checking agent job status:Exponential Backoff
Implement exponential backoff to reduce API calls:Webhooks (Future)
Webhook support for agent completion notifications is planned for a future release.Error Scenarios
Empty Status
If the agent returnsstatus: "empty", possible reasons:
- No prompts have been stored yet
- All prompts have already been analyzed (with
analyzeAll: false) - No enabled AI providers configured
Rate Limit Exceeded
The agent endpoint is limited to 3 runs per minute:Related Resources
Workspace Schedule
Automate agent runs with cron schedules
Analysis API
View analysis results
Prompts API
Manual prompt submission