Integrations
EdgeComprehensive guide to integrating Cencori Edge with your platforms, edge runtimes, and development tools. Deploy AI protection across your entire stack with minimal configuration.
Overview
Cencori Edge provides pre-built integrations that allow you to add AI request protection at the edge layer of your application. Instead of modifying your application code, Edge integrations intercept requests at the infrastructure level, providing:
- Zero-code protection: Add security without changing your application
- Minimal latency: Edge processing adds <50ms to request time
- Automatic scaling: Protection scales with your edge infrastructure
- Real-time filtering: Block malicious requests before they reach your AI providers
Supported Integrations
Vercel
Edge Middleware & Marketplace
Supabase
Edge Functions Extension
IDE Plugins
Cursor & VS Code
SDK Integrations
Cencori provides first-class SDK adapters for popular AI frameworks, enabling seamless integration with your preferred tooling.
Vercel AI SDK
Drop-in integration with the Vercel AI SDK. Works with streamText(), generateText(), and useChat().
Tool Calling (Vercel AI SDK)
TanStack AI
Native adapter for TanStack AI with streaming, structured output, and tool calling support.
Tool Calling (TanStack AI)
Vercel Integration
The Vercel integration allows you to protect all AI requests in your Next.js, SvelteKit, Nuxt, or any Vercel-hosted application using Edge Middleware. Requests are intercepted and processed before reaching your application.
Installation Methods
1Vercel Marketplace (Recommended)
The easiest way to integrate Cencori with your Vercel projects is through the Vercel Marketplace:
- Navigate to the Vercel Integrations Marketplace
- Search for "Cencori" and click "Add Integration"
- Select the projects you want to protect
- Authorize the integration with your Cencori account
- The integration will automatically configure your projects
Marketplace installation automatically handles environment variables, middleware setup, and preview deploy protection.
2Manual Edge Middleware Setup
For more control, you can manually configure the Edge Middleware in your project:
Step 1: Install the package
Step 2: Add environment variables
Step 3: Create the middleware file
Step 4: Configure route matching
The middleware matcher determines which routes are processed. Common patterns:
Preview Deploy Protection
Cencori automatically protects Vercel preview deployments, preventing sensitive data from being exposed in development/staging environments:
Configuration Options
| Option | Type | Description |
|---|---|---|
apiKey | string | Your Cencori API key (required) |
projectId | string | Your Cencori project ID (required) |
protectedRoutes | string[] | Glob patterns for routes to protect |
security | object | Enable/disable security features |
onBlock | function | Custom handler for blocked requests |
previewProtection | object | Settings for Vercel preview deploys |
Supabase Integration
The Supabase integration extends Edge Functions with Cencori protection, allowing you to secure AI requests made from your Supabase backend without modifying function code.
Installation
Step 1: Enable the Cencori extension
In your Supabase dashboard, navigate to Database → Extensions and search for "cencori":
Step 2: Create a protected Edge Function
Step 3: Configure environment secrets
Edge Function Routing
For applications with multiple Edge Functions, you can configure global routing to protect all AI-related functions:
Using the shared middleware:
Database-Level Protection
You can also use Cencori directly in PostgreSQL functions for database-level AI protection:
IDE Plugins
Cencori IDE plugins provide real-time security feedback directly in your development environment. Catch security issues before they reach production.
VS Code Extension
Installation
- Open VS Code
- Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
- Search for "Cencori"
- Click Install
Or install via command line:
Configuration
Add your credentials to VS Code settings:
Features
- Real-time scanning: Highlights security issues as you type
- Pre-commit checks: Scans files before git commits
- Inline suggestions: Provides fix suggestions for common issues
- Dashboard link: Jump directly to Cencori dashboard for detailed analysis
Cursor Extension
The Cursor extension is especially valuable for AI-assisted development, where generated code may inadvertently contain security issues.
Installation
- Open Cursor
- Go to Extensions
- Search for "Cencori"
- Click Install
Cursor-Specific Features
- AI-generated code scanning: Automatically scans code generated by Cursor's AI
- Composer integration: Checks multi-file changes before applying
- Chat context awareness: Warns about sensitive data in AI chat context
Pre-Deploy Checks
Both IDE extensions can be configured to run comprehensive security checks before deployment:
CI/CD Integration
Integrate Cencori checks into your CI/CD pipeline for automated security scanning:
GitHub Actions
GitLab CI
Troubleshooting
Middleware Not Triggering
Ensure your matcher config in middleware.ts includes the routes you want to protect. Verify with console logging.
Environment Variables Not Loading
For Vercel, ensure variables are set in the project settings. For local development, verify your .env.local file is in the project root.
High Latency
Edge processing should add <50ms. If experiencing higher latency, check your region configuration and ensure you're using the nearest Cencori edge endpoint.
False Positives
Adjust sensitivity settings in your configuration. You can also add patterns to the allowlist in your Cencori dashboard.
Next Steps
- Configure PII Detection settings for your use case
- Set up Prompt Injection protection rules
- Learn about Rate Limiting at the edge
- Explore the API Reference for advanced configurations

