List Agents
Potpie API
List Available Agents
Get a list of all available AI agents using API key authentication
GET
List Agents
Use Cases
- Discover available agents before creating conversations
- Build agent selection interfaces in your application
- Understand agent capabilities and specializations
- Dynamically populate agent options for users
- Determine the right agent for specific tasks
Authentication
This endpoint requires API key authentication via thex-api-key header.
Response
Unique agent identifier (use in conversation creation)
Human-readable agent name
What the agent specializes in
Agent status
Visibility of the agent.
null for system agents; private, shared, or public for custom agents.Error Responses
401 Unauthorized
401 Unauthorized
500 Internal Server Error
500 Internal Server Error
The endpoint returns this error when unexpected exceptions occur.Causes:
- Database connection failures
- Service unavailability
Complete Workflow
Troubleshooting
Empty agent list
Empty agent list
Problem: API returns an empty array
[].Solution:- This is unusual - system agents should always be available
- Verify you’re using the correct API endpoint
- Check that your account is active and in good standing
- Contact support if the list remains empty
Unknown agent ID
Unknown agent ID
Problem: Agent ID from list doesn’t work in conversations.Solution:
- Verify you’re using the exact
idvalue from this endpoint - Refresh the agent list to get the latest data
- Some agents may require specific permissions
Authorizations
API key authentication. Get your key from potpie settings page

