Connecting Your First AI Endpoint
Connect your AI service, workflow, or custom endpoint to AgentFlow. AgentFlow works with ANY AI endpoint that can receive webhooks and return responses—including OpenAI, Anthropic, custom AI services, N8N workflows, Make.com automations, and more.Prerequisites
Before you start, you’ll need:- ✅ AgentFlow organization created
- ✅ An AI endpoint URL (OpenAI API, custom webhook, etc.)
- ✅ Authentication credentials (API key, bearer token, etc.)
- ✅ Admin access to your organization
Step 1: Access the Admin Panel
After creating your organization, navigate to the admin panel:- Click your organization name in the top navigation
- Select “Admin Panel” from the dropdown
- You’ll see tabs for Analytics, Models, Groups, and Users
Step 2: Start Connection Configuration
1
Go to Models Tab
Click the “Models” tab in the admin panel (this configures your AI connections)
2
Click Add Model
Click the ”+” (plus) button to start adding a new connection
The “Models” tab is where you configure all AI connections—whether they’re AI model APIs, workflows, or custom endpoints.
Step 3: Basic Information
Fill in the essential details for your AI connection:Required Fields
Name *Optional Fields
Model IDRequest Headers
Add authentication headers required by your endpoint:OpenAI Example
Key:
Authorization
Value: Bearer sk-...your-api-key...Custom API Example
Key:
X-API-Key
Value: your-custom-tokenHeaders containing sensitive data (authorization, api-key, secret) are automatically masked for security.
- Click “Add Header”
- Enter the header key (e.g., “Authorization”)
- Enter the header value (will be masked if sensitive)
- Repeat for additional headers
- Click ”×” to remove unwanted headers
Suggestion Prompts
Add up to 3 suggested prompts to help users understand what your model can do: Examples:Step 4: Field Mapping
Important: AgentFlow works with ANY endpoint that can respond to webhooks—not just pre-configured AI models.
What You Can Connect
AI APIs
- OpenAI (GPT-4, GPT-3.5)
- Anthropic (Claude)
- Google (Gemini)
- Custom AI services
Automation Tools
- N8N workflows
- Make.com scenarios
- Zapier webhooks
- Custom integrations
Agent Builders
- ChatGPT Agent Builder
- Custom agent endpoints
- LangChain applications
- AutoGPT instances
Any Webhook
- HTTP endpoints
- Serverless functions
- Microservices
- Custom APIs
Step 5: Request Template
Configure how messages are sent to your endpoint.Input Configuration
Define the request body structure: For OpenAI-style APIs:AJV Schema Validation
Add JSON Schema validation for your request/response format.What is AJV? AJV (Another JSON Validator) ensures your requests and responses match the expected format, catching errors before they cause issues.Learn more: AJV Documentation
Test Variables
Provide sample data to test your configuration: Sample Payload:Step 6: Test Endpoint
Critical: AgentFlow requires your endpoint to work before saving the configuration.1
Run Test
Click “Run Test” to send a request to your endpoint
2
Check Response
You should see a 200 (Success) response
3
Fix if Needed
If you get any other status code, review and fix your configuration
4
Retry
Keep testing until you get a successful response
AgentFlow will NOT allow you to save a connection that doesn’t work. This ensures users can always rely on functional AI endpoints.
| Code | Meaning | Action |
|---|---|---|
| 200 | ✅ Success | Proceed to next step |
| 401 | ❌ Unauthorized | Check your API key/auth headers |
| 404 | ❌ Not Found | Verify endpoint URL is correct |
| 500 | ❌ Server Error | Check endpoint is online and working |
Step 7: Define Output
Parse the response from your endpoint to extract the agent’s message.Nested JSON Route
Specify the path to the message content in the response: OpenAI Response Example:The JSON path tells AgentFlow where to find the agent’s response text in your endpoint’s response.
Step 8: Create Group & Assign Access
Before you can use your AI connection, you must create a group and assign permissions:1
Go to Groups Tab
Click the “Groups” tab in the admin panel
2
Create New Group
Click “Create Group” button
- Name: e.g., “GPT-4 Users”
- Description: Who should have access
3
Add Connection to Group
- Find your newly created AI connection
- Check the box to add it to this group
4
Add Yourself to Group
- Find your user in the members list
- Add yourself to the group
Why groups? Groups control access to AI connections. Only users in a group can see and use the connections assigned to that group.
Step 9: Start Conversing
Now you’re ready to use your AI connection!- Go to the Chat page
- Click “New Conversation”
- Select your AI connection from the dropdown
- Start chatting!
Next: Start Your First Conversation
Learn how to use your newly connected AI endpoint
Configuration Examples
OpenAI GPT-4
Anthropic Claude
Custom N8N Workflow
Troubleshooting
Test returns 401 Unauthorized
Test returns 401 Unauthorized
Test returns 404 Not Found
Test returns 404 Not Found
Problem: Endpoint URL is incorrectSolutions:
- Double-check the endpoint URL
- Ensure it includes https://
- Verify the path is correct (/v1/chat/completions)
- Test the URL in Postman or curl first
Test returns 500 Server Error
Test returns 500 Server Error
Problem: Endpoint or service is having issuesSolutions:
- Check if the service is online
- Verify your request format matches their API
- Test with their official documentation examples
- Contact the service provider’s support
Can't see connection in chat
Can't see connection in chat
Problem: Missing group assignmentSolutions:
- Go to Groups tab
- Create a group if you haven’t
- Add the AI connection to the group
- Add yourself as a member of that group
Response parsing fails
Response parsing fails
Problem: Wrong output pathSolutions:
- Check the actual response structure from test
- Use browser console to inspect response
- Verify JSON path syntax (e.g., choices[0].message.content)
- Test the path with a JSON path validator
What’s Next?
Choose AI Connections
Understand which connection types work best
Advanced Configuration
Fine-tune your connection with advanced settings
Test Your Connection
Best practices for testing before deployment
Start Conversations
Begin using your AI connections
Need Help?
Contact support@agentflow.live for assistance with connecting AI endpoints