External Sources
Connect external data sources to your knowledge base for real-time information retrieval. External sources are queried at conversation time, ensuring your AI always has access to the latest data.How External Sources Work
Unlike documents and URLs which are indexed ahead of time, external sources are queried in real-time during conversations.Supported Source Types
| Type | Description | Use Case |
|---|---|---|
| REST API | Query any REST endpoint | Internal databases, CRM, custom APIs |
| GraphQL | Query GraphQL endpoints | Complex data relationships |
| Database | Direct database queries | Real-time inventory, user data |
| Webhook | Your server is called | Custom logic, authentication |
Add a REST API Source
Add a Database Source
Connect directly to a database:postgresql, mysql, mongodb
Add a Webhook Source
Your server handles the query:Query Routing
Configure when to query each source:| Setting | Description |
|---|---|
keywords | Query when these words appear |
intent_patterns | Query when user intent matches |
always_query | Query on every message |
List External Sources
Test a Source
Test your source configuration:Update Source Configuration
Rotate Secrets
Update API keys or passwords:Disable/Enable a Source
Delete a Source
Error Handling
Configure behavior when external sources fail:| Setting | Description |
|---|---|
timeout_ms | Maximum wait time |
retry_count | Number of retries on failure |
fallback | "continue" (skip source) or "error" (fail conversation) |
notify_on_failure | Send webhook on repeated failures |
Security Best Practices
- Use read-only credentials - External sources should never modify data
- Limit query scope - Only expose necessary data
- Rotate secrets regularly - Update API keys periodically
- Monitor usage - Watch for unusual query patterns
- Use IP allowlisting - Restrict access to Spike’s IP ranges

