Skip to main content

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:
  1. Click your organization name in the top navigation
  2. Select “Admin Panel” from the dropdown
  3. 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 *
Endpoint *

Optional Fields

Model ID
Schema
Description

Request 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-token
Headers containing sensitive data (authorization, api-key, secret) are automatically masked for security.
To add headers:
  1. Click “Add Header”
  2. Enter the header key (e.g., “Authorization”)
  3. Enter the header value (will be masked if sensitive)
  4. Repeat for additional headers
  5. Click ”×” to remove unwanted headers

Suggestion Prompts

Add up to 3 suggested prompts to help users understand what your model can do: Examples:
These appear in the chat interface to guide users.

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
Map your request and response fields to match your endpoint’s expected format. This step varies by endpoint type—refer to your endpoint’s documentation.

Step 5: Request Template

Configure how messages are sent to your endpoint.

Input Configuration

Define the request body structure: For OpenAI-style APIs:
For custom endpoints:

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
Example AJV Schema:

Test Variables

Provide sample data to test your configuration: Sample Payload:
Validate: Click “Validate” to ensure your configuration is correct.

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.
Response Status Codes:

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:
JSON Path:
Custom Endpoint Example:
JSON Path:
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!
  1. Go to the Chat page
  2. Click “New Conversation”
  3. Select your AI connection from the dropdown
  4. 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

Problem: Authentication failedSolutions:
  • Verify API key is correct
  • Check header key name (e.g., “Authorization” vs “X-API-Key”)
  • Ensure “Bearer ” prefix for OpenAI
  • Check if API key has expired
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
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
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
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