Page
How to Use Agentic Token Engine
How to use Agentic Token Engine is simple once you understand the main parts of the system. Agentic Token Engine by Xobytes gives your WordPress site a token-based AI system for plugins, themes, SaaS tools, dashboards, and agentic software.
With this plugin, you can connect AI providers, create action keys, set token costs, manage user balances, sell WooCommerce token packs, and display modern token cards inside your admin pages.
If you do not have the plugin yet, visit the Xobytes shop to get Agentic Token Engine by Xobytes.
What Agentic Token Engine Does
Agentic Token Engine helps WordPress site owners control AI usage with tokens. Instead of letting users run unlimited AI requests, you can charge a set number of tokens for each AI action.
For example, you can charge tokens for blog posts, product descriptions, support replies, SEO titles, documentation pages, chatbot responses, or custom AI features.
As a result, your AI tools become easier to manage, track, and monetize.
Step 1: Install Agentic Token Engine
First, install the plugin from your WordPress dashboard.
Go to:
Plugins > Add New Plugin > Upload Plugin
Then, upload the Agentic Token Engine ZIP file. After WordPress installs it, click Activate Plugin.
Once activated, you should see a new admin menu called:
AI Tokens
Step 2: Activate Your License
Next, activate your Xobytes license. This unlocks the plugin and connects your site to your licensed product access.
Go to:
AI Tokens > License
Paste your license key into the license field. Then, click the activation button.
If the license is valid, the plugin stores your site activation and shows the license as active.
Step 3: Add Your AI Provider Keys
After your license is active, add your AI provider keys. Agentic Token Engine can support popular providers such as OpenAI, Anthropic, Google Gemini, and OpenRouter.
Go to:
AI Tokens > Settings
Then, add the provider keys you want to use.
For better security, do not paste AI provider keys into frontend code, JavaScript, page builders, or public templates. Agentic Token Engine stores provider keys server-side so your AI requests can run safely from WordPress.
You can also review the official OpenAI API documentation if you want to learn more about API-based AI tools.
Step 4: Choose Your Default Provider and Model
Next, choose your default AI provider and default model. These settings control which provider and model the plugin uses when an action does not have its own custom model.
For example, you may use one model for simple tasks and another model for longer or more advanced tasks.
This gives you better control over cost, speed, and output quality.
Step 5: Create AI Actions
An AI action is a task that your software can run. Each action uses an action key.
An action key is a short name that tells Agentic Token Engine which AI task is running. Your plugin, theme, or custom code can call that action key when it needs to charge tokens or generate AI content.
Example Action Keys
generate_blog_postwrite_product_descriptioncreate_seo_titlesummarize_messagegenerate_support_replywrite_landing_page
To create actions, go to:
AI Tokens > Actions & Costs
Then, add your action key, label, token cost, provider, model, button text, and system prompt.
Step 6: Set Token Costs Per Action
Each action can have its own token cost. This lets you charge more for large AI tasks and less for small tasks.
For example, a short SEO title may cost fewer tokens than a full blog post.
Example Token Costs
- Generate blog post — 50 tokens
- Create SEO title and meta description — 15 tokens
- Write product description — 35 tokens
- Generate support reply — 20 tokens
- Create documentation page — 75 tokens
This makes your AI system flexible. Also, it lets you build different pricing levels for different tools.
Step 7: Set Daily and Monthly Usage Limits
AI usage can become expensive if you do not control it. Because of that, Agentic Token Engine includes daily and monthly usage limits.
Go to:
AI Tokens > Settings
Then, set the daily and monthly limits that make sense for your site.
These limits help protect your AI provider account from abuse, mistakes, or unexpected usage spikes.
Step 8: Choose Allowed User Roles
You can choose which WordPress user roles can use AI actions. This is useful for membership sites, SaaS tools, client dashboards, and private admin systems.
For example, you may allow only admins, editors, paid members, or approved customers to run AI tools.
This keeps your AI features controlled and organized.
Step 9: Manage User Token Balances
Agentic Token Engine includes user balances and a token ledger. This lets you see how many tokens each user has and how those tokens change over time.
Go to:
AI Tokens > Users
From there, you can add tokens, remove tokens, and review user balances.
You can also view the ledger to see token charges, refunds, grants, and purchases.
Step 10: Sell WooCommerce Token Packs
If your site uses WooCommerce, you can sell token packs. This lets users buy more tokens when they need them.
Go to:
AI Tokens > WooCommerce Packs
Then, connect token amounts to WooCommerce products.
Example Token Packs
- Starter Pack — 10,000 tokens
- Pro Pack — 50,000 tokens
- Business Pack — 200,000 tokens
After a customer buys a token pack, the plugin can add those tokens to the user’s balance.
Step 11: Add Token Cards to Admin Pages
Agentic Token Engine includes modern token cards that you can add to other admin pages. These cards can show token balance, usage, action costs, or AI buttons.
This is useful when you build agentic themes, AI plugins, SaaS dashboards, or custom admin tools.
Example Token Card Code
echo xobytes_ai_render_token_card( array(
'title' => 'AI Tokens',
'user_id' => get_current_user_id(),
) );
This lets you display a token card inside another plugin or theme admin screen.
Step 12: Add AI Action Buttons
You can also add AI action buttons to your own tools. These buttons make it easy to run an AI action from an admin page.
Example AI Button Code
echo xobytes_ai_render_action_button( array(
'action_key' => 'generate_blog_post',
'prompt' => 'Write a blog post about roof repair.',
'button_text' => 'Generate With AI',
) );
When a user clicks the button, Agentic Token Engine can check the user’s balance, charge the correct token cost, and run the AI request.
Step 13: Use Developer Helper Functions
Developers can connect their own plugins and themes to Agentic Token Engine with helper functions.
Useful Developer Functions
xobytes_ai_get_balance( $user_id );
xobytes_ai_add_tokens( $user_id, 100, 'manual_bonus' );
xobytes_ai_charge_tokens( $user_id, 50, 'generate_blog_post' );
xobytes_ai_refund_tokens( $user_id, 50, 'failed_generation' );
xobytes_ai_generate_text( array(
'user_id' => get_current_user_id(),
'action_key' => 'generate_blog_post',
'prompt' => 'Write a blog post about roof repair.',
) );
These functions make it easier to build AI-powered WordPress software without creating a token system from scratch.
Step 14: Use Shortcodes
Agentic Token Engine also includes shortcodes. You can place these shortcodes on pages, account areas, dashboards, or protected member pages.
Available Shortcodes
[xobytes_ai_balance]
[xobytes_ai_action_button action_key=”generate_blog_post” prompt=”Write a post about roof repair.” button_text=”Generate”]
Shortcodes are useful when you want to show token information without writing custom PHP code.
Best Practices
Start with a small set of actions. Then, test each action before you add more. This helps you make sure token costs, models, prompts, and limits work correctly.
Also, keep your API keys private. Never place provider keys inside public JavaScript, frontend templates, page content, or code snippets that users can see.
Finally, review your ledger often. This helps you understand how users spend tokens and which AI actions they use the most.
Common Use Cases
Agentic Token Engine works well for many WordPress AI products.
- AI content generators
- SEO automation tools
- WooCommerce product copy tools
- Support reply generators
- Agentic WordPress themes
- Membership AI tools
- Client dashboards
- AI chatbot systems
- SaaS-connected WordPress plugins
Final Thoughts
Now you know how to use Agentic Token Engine to build token-powered AI tools inside WordPress. You can activate your license, add provider keys, create action keys, set token costs, control usage, sell WooCommerce token packs, and add modern token cards to your admin areas.
Because of this, Agentic Token Engine gives you a strong foundation for building agentic themes, AI plugins, SaaS tools, and smart WordPress software.
To get started, visit the Xobytes software shop.