Building with AI¶
This guide walks you through creating products on the 4Geeks platform and integrating them with our AI capabilities — AI Agents and AI Studio — to build intelligent, automated workflows.
Creating Products¶
Products in 4Geeks represent the goods, services, or subscription plans you offer. You can create and manage products programmatically via the REST API.
API Authentication¶
All API requests require your Live API Key passed via the X-Api-Key header:
Get your API keys from the Platform Settings dashboard under the API & Webhooks tab. See Get API Keys for details.
Create a Product¶
Send a POST request to create a product:
import requests
response = requests.post(
'https://api.4geeks.io/v1/products',
headers={
'X-Api-Key': 'sk_live_your_api_key_here',
'Content-Type': 'application/json'
},
json={
'name': 'Premium Plan',
'description': 'Full-featured premium subscription with priority support',
'active': True
}
)
print(response.json())
const response = await fetch('https://api.4geeks.io/v1/products', {
method: 'POST',
headers: {
'X-Api-Key': 'sk_live_your_api_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Premium Plan',
description: 'Full-featured premium subscription with priority support',
active: true
})
});
const data = await response.json();
console.log(data);
The response includes the created product with its ID:
{
"id": "prod_abc123",
"name": "Premium Plan",
"description": "Full-featured premium subscription with priority support",
"active": true,
"created_at": "2026-05-02T10:30:00Z"
}
List Products¶
Retrieve all your products with pagination:
Response:
{
"items": [
{
"id": "prod_abc123",
"name": "Premium Plan",
"description": "Full-featured premium subscription with priority support",
"active": true
}
],
"total_items": 1,
"limit": 10,
"offset": 0
}
Create a Plan for a Product¶
For subscription-based products, create a plan linked to your product:
The amount is in cents (4999 = $49.99). Supported intervals: month, year, week.
Integrating Products with AI Agents¶
Once your products are created, you can connect them to 4Geeks AI Agents to automate sales, support, and collections workflows.
How It Works¶
4Geeks AI Agents use your product catalog and documentation as a knowledge base. When a customer interacts with an agent, it can:
- Recommend products based on customer needs
- Answer questions about pricing, features, and availability
- Process orders and create checkout sessions
- Handle support tickets related to specific products
Step-by-Step: Connect Products to an AI Sales Agent¶
1. Deploy an AI Sales Agent¶
Navigate to 4Geeks Console and click Deploy Agent. Select AI Sales Agent and give it a name.
2. Set the Training Data Source¶
In the agent configuration, enter your product documentation URL as the Training Data Source. This can be:
- Your product catalog page
- A pricing page
- API documentation
- A public
llms.txtfile (see below)
The agent crawls this URL and uses the content to answer customer questions accurately.
3. Define the Agent Objective¶
Set a clear objective for the agent:
Sell our software products. When a customer asks about features, recommend the
appropriate plan based on their needs. Always mention pricing in USD. Do not
offer discounts higher than 10% without escalation.
4. Connect a Channel¶
Choose how customers will interact with the agent:
- WhatsApp: Connect your Meta Business account for messaging
- Web Chat: Embed the agent on your website
- Voice: Enable phone-based interactions
See How to Create a WhatsApp AI Agent for a detailed walkthrough.
5. Test and Go Live¶
The agent runs in a sandbox environment first. Test interactions like:
Customer: "What plans do you offer?"
Agent: "We have three plans: Basic ($19/mo), Pro ($49/mo), and Premium ($99/mo).
The Pro plan includes priority support and API access. Would you like to
know more about any specific plan?"
Customer: "I need API access for my team of 10."
Agent: "For a team of 10 with API access, I recommend the Pro plan at $49/mo per
seat. Would you like me to send you a checkout link to get started?"
Once satisfied, click Go Live to deploy the agent to production.
AI Agent + Product Workflow¶
Here is how the full integration works:
sequenceDiagram
participant C as Customer
participant A as AI Agent
participant K as Knowledge Base
participant P as 4Geeks API
participant O as Checkout
C->>A: "What products do you have?"
A->>K: Query product catalog
K-->>A: Return product data
A-->>C: List products with pricing
C->>A: "I want the Premium Plan"
A->>P: Create checkout session
P-->>A: Return checkout_url
A-->>C: Send checkout link
C->>O: Complete payment AI Support Agent for Product Queries¶
Deploy an AI Customer Support Agent to handle post-sale product questions:
- Set the Training Data Source to your product documentation and FAQ
- Define the objective:
Answer customer questions about our products. Help with troubleshooting,
billing inquiries, and feature explanations. Escalate to a human agent
if the issue cannot be resolved within 3 interactions.
- Connect to your preferred channel (WhatsApp, web chat, or voice)
The support agent can reference specific products by ID and pull real-time data from your catalog.
Integrating with AI Studio¶
For custom product-related features that go beyond pre-built agents, use 4Geeks AI Studio.
What is AI Studio?¶
AI Studio provides an expert human Senior Architect augmented by the 4Geeks AI Factory — an infrastructure that orchestrates top-tier LLMs (Claude, Gemini, GPT) to write, test, and refactor code up to 5x faster.
Use Cases for Product Integration¶
- Custom checkout flows: Build tailored payment experiences for your products
- Product recommendation engine: Create an AI-powered recommendation system
- Automated product descriptions: Generate and update product content at scale
- Custom integrations: Connect your product catalog to third-party tools (CRM, ERP, analytics)
Getting Started¶
- Go to 4Geeks Console
- Describe your product integration requirements
- A Senior Architect is assigned to your project
- The AI Factory accelerates development with multi-model orchestration
- Review pull requests and deploy to production
See the AI Studio overview and Private AI Gateway for more details.
Using llms.txt for AI Integration¶
4Geeks publishes a public llms.txt file at:
https://docs.4geeks.io/llms.txt
What is llms.txt?¶
llms.txt is a standardized file that provides AI tools and LLMs with a concise, machine-readable overview of the 4Geeks API. It includes:
- Base URL and authentication details
- All available endpoints with methods, paths, and descriptions
- Request/response formats
- Code examples in multiple languages
- Error codes and patterns
How to Use It¶
You can point your AI Agents, custom LLM applications, or AI development tools to this file so they understand the 4Geeks API structure without manual configuration:
- AI Agent Training Data: Add
https://docs.4geeks.io/llms.txtas a training data source for your AI Agents - LLM Context: Include the file content in your system prompts when building custom AI applications
- AI-Assisted Development: IDE AI assistants (Cursor, Copilot, etc.) can reference this file to generate correct API calls
Example: Using llms.txt in a System Prompt¶
You are an AI assistant that helps users integrate with the 4Geeks platform.
Use the following API reference to generate correct API calls:
[Content from https://docs.4geeks.io/llms.txt]
This ensures the AI generates accurate code with the correct endpoints, headers, and request formats.
Next Steps¶
- 4Geeks AI Agents Documentation — Explore all available agents
- 4Geeks AI Studio Documentation — Learn about AI-augmented development
- API Reference — Complete API documentation
- Get API Keys — Manage your credentials
- AI Agents Tutorials — Step-by-step guides and walkthroughs
Still questions? Ask on Discord or explore tutorials