In this article, you will learn how you can implement the messages limits for your AI agents
Limiting Messages Based on Throttling Settings
YourGPT provides throttling settings to control the rate of user interactions:
- Messages per Conversation: Set a limit on the number of messages allowed in a single conversation. Define the time frame (in hours) for this limit and add a custom message that will be displayed when the limit is exceeded.
- Conversations Limit: Establish a limit on the number of conversations a user can initiate within a specified time frame. Customize the message displayed when this limit is reached.
For more detail on configuring these settings, refer to YourGPT Security Documentation.

Limiting Messages based on Audience
Limiting message for different user segments, such as free users or specific groups, helps manage usage effectively. By utilizing YourGPT AI Studio and AI Follow-up Event, you can control message counts efficiently. Here's how:
- Drag the "AI Response Follow-up" Event: This event will trigger subsequent actions based on user interactions.
- Add a Code Execution Node: Implement a message counter within this node to track the number of messages exchanged.
- Implement Conditional Logic: Use an 'if' statement to check if the message count has reached the predefined limit. If so, you can transfer the chat or take appropriate action.
To restrict access based on user segments, you need to determine whether a user is free or paid within your system. Then, you can store this information in session data or contact data using the following JavaScript code:
$yourgptChatbot.set("visitor:data", {
userType: "freeUser",
});
// or
$yourgptChatbot.set("session:data", {
userType: "freeUser",
});
For more details on setting the users data, refer to the YourGPT Chatbot SDK documentation. Alternatively, you can also implement OTP based login Method and make API call.
Implementing the Paywall
Adding a paywall can serve as a new business model, allowing you to monetize premium features or extended usage. This approach encourages users to subscribe for enhanced services, balancing free access with revenue generation. For detailed guidance on setting up a paywall.
Related Articles
Voice-to-Voice AI Bot on WhatsApp (or Any Voice-Supported Platform)
Build a voice-to-voice AI chatbot with real-time replies using AI Studio.
Launch a Virtual Try-On Experience in Minutes
Your Fastest Way to Add Virtual Try-On to Any Chat Interface
From Default to Delightful: Customizing Your Chat Widget
Customize your YourGPT chatbot widget with ready-to-use styles or your own CSS for a unique look.
Running a Discord Community Bot with YourGPT
Give your Discord community a helpful AI co-pilot
AI Assistant for Clinic Appointment Booking with Cliniko
Set Up a Clinic Booking bot in Minutes Using Prebuilt Templates
Adding an AI Search Widget to Your Docs, Site, or App
Add smart AI search Widget to your site in minutes—just copy, paste, and go