007AJ AI Ready Full
Version 1.0.3 · Commercial plugin · GPLv2 or later · by 007AJ
An AI chatbot trained on your site and WooCommerce store, llms.txt and llms-full.txt, and full control over AI crawlers with analytics.
Contents
- Installation
- Quick start
- AI providers and API keys
- What the chatbot knows
- Appearance and embedding
- Answers, hand-off and leads
- WooCommerce
- Chat logs and insights
- Limits and abuse protection
- llms.txt and llms-full.txt
- AI crawler controls
- Per-page AI settings
- Privacy, GDPR and uninstall
- Performance and caching
- Multisite
- Developer hooks
- Troubleshooting
- Switching themes, deactivation and removing data
- License options
- Changelog
- Support
1. Installation
- Go to Plugins → Add New → Upload Plugin and upload
007aj-ai-ready-pro.zip, or copy the 007aj-ai-ready-pro folder into wp-content/plugins.
- Activate it. A new AI Ready menu appears. Your
/llms.txt is live straight away together with /llms-full.txt.
- Requirements: WordPress 6.2+, PHP 7.4+ with the OpenSSL extension (to store API keys encrypted). Pretty permalinks are recommended.
If the free 007AJ AI Ready plugin is active, this plugin takes over immediately and shows a notice with a link to deactivate the free one. Settings, the index and chat history are shared, so nothing is lost.
2. Quick start
- AI Crawlers: choose which AI companies may read your site.
- Chatbot: pick a provider (OpenAI, Anthropic, Google Gemini or OpenRouter), paste your API key, click Test connection, tick Turn on the chatbot and save.
- Knowledge: choose the content the chatbot learns from and click Rebuild index now. Use the test search to check what it finds.
- Visit your site: the chat button appears in the corner.
3. AI providers and API keys
| Provider | Where to get a key | wp-config.php constant |
| OpenAI | platform.openai.com → API keys | AJAI_OPENAI_KEY |
| Anthropic (Claude) | console.anthropic.com → API keys | AJAI_ANTHROPIC_KEY |
| Google Gemini | aistudio.google.com → Get API key | AJAI_GEMINI_KEY |
| OpenRouter | openrouter.ai → Keys | AJAI_OPENROUTER_KEY |
Keys typed in the settings are stored encrypted (AES-256 with an HMAC, using your site's secret keys) and are never printed back or sent to the browser. A key defined in wp-config.php always wins, for example:
define( 'AJAI_OPENAI_KEY', 'sk-...' );
Model: leave it empty to use the suggested model, pick from the list, or click Load models to fetch your account's live list. Smaller models are cheaper and fast enough for site Q&A.
Reply length limit caps the output tokens of each answer.
4. What the chatbot knows
- Learn from: tick any public post type: pages, posts, WooCommerce products, custom post types.
- Skip categories: posts in these categories or product categories are left out.
- Skip these IDs: comma-separated post, page or product IDs.
- FAQs: write questions and answers as
Q: and A: lines, with a blank line between pairs. Each pair becomes its own source.
- Hide from the chatbot: a toggle in the editor sidebar of every page and post.
- Smart search (embeddings): optional. Passages are turned into vectors with OpenAI (
text-embedding-3-small) or Gemini (gemini-embedding-001) in the background, and answers combine keyword and meaning matching. It uses that provider's key and costs very little (a one-off per passage).
Content is split into passages of about 900 characters and stored in a search table (BM25 ranking with light stemming). It updates automatically when you publish, edit, unpublish or delete content. Password-protected and private content is never indexed. Changing the content settings schedules a full rebuild in the background; Rebuild index now on the Knowledge page does it right away with a progress bar.
Only the best-matching passages (not your whole site) are sent to the AI with each question. The AI is told to answer only from them, cite them as [1], [2] and reply NO_ANSWER if they don't contain the answer, in which case the visitor sees your fallback message.
5. Appearance and embedding
- Name, greeting, colour, position (bottom right or bottom left)
- Floating button: turn it off to show the chat only where you embed it
- Avatar: choose an image from the Media Library
- Suggested questions: one per line, up to 6, shown as buttons when the chat opens
Embedding the chat in a page
- Shortcode:
[ajai_chat] or [ajai_chat height="600"]
- Block: search for AI Chatbot in the block inserter
- Elementor: drag the AI Chatbot widget from the General section
6. Answers, hand-off and leads
- Fallback message: shown when the answer isn't on your site.
- Extra instructions: tone or rules added to the AI prompt, for example "Always answer in a warm tone".
- Hand-off: a contact page URL, an email address and a WhatsApp number. Buttons appear under unanswered questions, or under every answer if you tick Show them under every answer.
- Lead capture: off, before the first question, or after N questions. Tick Required to make it mandatory: once the visitor has asked N questions (or before the first one), the question box is hidden until their details are saved, and this survives closing the chat, reloading the page and the restart button. The server enforces it too, so the chat API refuses further questions without a saved lead. Questions are counted per visitor using the salted IP hash, so visitors behind one shared IP address (an office network, for example) share the count. The server is the authority: a saved lead is remembered for 30 days on the server and exactly as long in the visitor's browser. If the server asks for details again (for example after those 30 days, or if its records were cleared), the widget forgets its stored capture, shows the form, keeps the chat paused, and sends the question it held back as soon as the details are saved. This works in both modes, and also on cached pages whose settings are out of date, because the server's answers carry the current lead settings. Without Required the form has a Skip button. Add consent text (for example "I agree to be contacted") to show a checkbox that must be ticked. Turn on email alerts to get each new lead by email.
Leads are listed under AI Ready → Leads with search, a link to the conversation and Export CSV (Excel-friendly UTF-8; cells that could be read as formulas are escaped).
7. WooCommerce
When WooCommerce is active:
- Products can be included in the index with their price (including sale price), stock status, SKU, categories and short description.
- Product cards: when an answer cites products, up to three cards with image, price, stock and a link appear under it.
- Order status: the chat shows a "Track an order" link. Customers enter the order number and billing email and get the status, date, item count, total and tracking number (from the Shipment Tracking plugin when present). Wrong numbers and wrong emails get the same reply, and lookups are limited to 5 per 10 minutes per visitor.
- Cart, checkout and account pages are never indexed or listed in llms.txt.
8. Chat logs and insights
- Conversations: every chat with its first question, message count and unanswered count. Click one to read it. Export all messages as CSV.
- Top questions and Unanswered: the most common questions over the last 30 days, and the ones the chatbot couldn't answer: your to-do list for new content or FAQs.
- Daily digest: tick Email me a daily list of questions the chatbot couldn't answer under Chatbot → Answers.
9. Limits and abuse protection
| Setting | Default | What it does |
| Messages per minute | 6 | Per visitor (by hashed IP) |
| Messages per day | 60 | Per visitor |
| Longest question | 500 characters | Longer messages are refused |
| Site-wide daily cap | 0 (none) | Total messages per day for the whole site (UTC day) |
| Monthly token budget | 0 (none) | Tokens per UTC calendar month. A question is only sent when its conservative upper bound still fits; otherwise the chat pauses politely until next month (see below for how exact this is) |
| Profanity filter | On | Abusive messages get a polite reply without calling the AI. Add your own words. |
Usage this month (answers and tokens) is shown on the dashboard.
The limits hold under heavy traffic. Before any paid call, the plugin reserves one message of today's cap and a conservative upper bound of the tokens from the monthly budget in a single database update. The update only succeeds when what was already used, plus every reservation still running, plus the new one fits the limit, so parallel questions cannot overshoot it. A question that doesn't fit gets a friendly "try later" message and makes no paid call at all, not even the query embedding. Per-visitor limits are counted the same way.
How the token budget is enforced
- Before anything paid runs, the reservation is the largest the request could be: the AI instructions, the full conversation history the widget sends (up to 6 messages of 1,500 bytes) and the question, five source passages of the largest size in your index (with their titles and links), the reply length limit sent to the AI service, and the query embedding when embeddings search is on.
- Right before the AI call, the reservation is set to the estimate of the exact request that will be sent (after every filter) plus its reply length limit. If it has grown and no longer fits, the call is not made. A request without a reply length limit is never sent.
- Afterwards, every reservation is settled exactly once, in one atomic database update keyed by its own id: the hold is removed and the billable tokens are added to the month in the same step, so usage can never be dropped or counted twice (a second settle of the same reservation changes nothing). This happens whether the visitor got an answer or an error.
What is charged when a request ends
| What happened | Charged to the month | Counts as a message |
|---|
| Answer, or an empty, refused/filtered answer, or an AI error, with usage reported by the service | The reported tokens (for Anthropic including cache tokens, for Gemini including thinking tokens) | Yes |
| Successful (HTTP 2xx) response that reports no usage, reports zero, or can't be read | Fallback: the full reservation, which is the estimate of the exact request that was sent plus its whole reply length limit | Yes |
| Timed out after the request was sent, gateway timeout (408, 504, 524, 598, 599), or PHP stopped (fatal error, exit) after sending | The full reservation (it may have run) | Yes |
| Any other AI error without usage (for example 401, 429, 500) | Nothing | No |
| Never sent (budget, no key, could not connect) | Nothing | No |
A paid query embedding is always added on top (its reported tokens, or an estimate when it reports none or fails). If a PHP process dies without settling (for example the server kills it), its reservation is found after 10 minutes and charged in full. The visitor always gets a clear message: a refused question asks them to rephrase it, an empty or unreadable answer asks them to try again in other words, and other errors say the assistant is unavailable. The admin Test connection button and the admin search preview's query embedding are added to the month's usage too, without being blocked by the budget.
Estimate: ASCII letters and spaces count as one token per 3 characters (real tokenizers average about 4), and every digit, punctuation mark, symbol and byte of non-ASCII text (accents, other alphabets, emoji) as a full token. In our tests with maximum history and source passages in English, Japanese, Cyrillic, Arabic, emoji and symbol-heavy text, OpenAI's tokenizers counted 33% to 58% of the reservation.
Accuracy limit: the budget is a strong limit, not an exact one. AI services count tokens with their own tokenizers and can add a few of their own (for example for message formatting), and the plugin records what they report. If one answer ever uses more than its reservation, the month can end up over the budget by that difference; from then on new questions are refused until the next month. Building the embeddings index (background indexing) is not counted in the budget. Check your AI provider's dashboard for your total bill, and set a spending limit there too.
10. llms.txt and llms-full.txt
/llms.txt follows the llmstxt.org format: an # H1 with your site name, a > summary, then sections of links with short descriptions.
- Automatic: built from the post types you choose (up to the limit per type) and refreshed whenever content changes.
- Manual: write your own. Click Copy into the manual editor under the preview to start from the automatic version.
- Summary: the line under the title; your tagline is used if empty.
/llms-full.txt contains the full plain text of your content, for AI tools that read a whole site in one go. Turn it on or off and set the number of items per type. It is capped at 4 MB.
Tick Exclude from llms.txt in the editor sidebar to leave a page out of both files.
The files are cached and served with X-Robots-Tag: noindex. If a physical llms.txt exists in your site root, your web server sends it instead and the plugin warns you.
11. AI crawler controls
The AI Crawlers page lists the known AI crawlers grouped by company. Each user agent is labelled:
- Training: collects content to train AI models (for example GPTBot, ClaudeBot, Google-Extended, CCBot).
- AI search: indexes pages so AI search can cite them (OAI-SearchBot, Claude-SearchBot, PerplexityBot).
- User: fetches a page when a person asks an assistant about it (ChatGPT-User, Claude-User, Perplexity-User).
Choose a mode per company:
| Mode | Effect |
| Allow | No rules added. |
| Search only | Training crawlers are blocked; AI search and user fetchers stay allowed so you can still be cited. |
| Block | All of the company's crawlers get Disallow: /. |
Rules are added to WordPress's virtual robots.txt. A physical robots.txt file in your site root overrides it; the plugin warns you and shows the rules to paste.
Blocking Google-Extended or Applebot-Extended does not affect Google Search, AI Overviews, Siri or Spotlight.
Server-level blocking
robots.txt is a request. To enforce it:
- Block in PHP: blocked crawlers get a 403 from WordPress (robots.txt stays reachable). This doesn't run for pages served from a page cache.
- Write .htaccess rules (Apache and LiteSpeed, single sites): a block marked
# BEGIN 007AJ AI Ready is written at the top of .htaccess and removed when you turn it off or deactivate the plugin.
- nginx: copy the snippet shown on the page into your server block.
noai and noimageai
Add noai/noimageai robots meta site-wide, or per page with the editor sidebar toggles. Some AI services honour these.
Crawler analytics
Visits from known AI crawlers are counted per day, crawler and page path, including robots.txt and llms.txt fetches. The Crawler Analytics page shows a stacked bar chart for 7, 30 or 90 days and tables by crawler and by page. No IP addresses are stored. On busy sites, set a sample rate (count 1 in N visits; counts are scaled back up) and the number of days to keep.
AI visibility checklist
Click Run checks on the dashboard. It checks: search engine visibility setting, HTTPS, llms.txt reachability and format, physical llms.txt, robots.txt reachability and a site-wide block, blocked AI search crawlers, XML sitemap, schema.org JSON-LD on the home page, home page noindex, key pages crawlable and the chatbot index. Each item explains what to fix.
12. Per-page AI settings
In the block editor, open the AI settings panel in the document sidebar (or the AI settings box in the classic editor):
- noai and noimageai robots meta
- Exclude from llms.txt
- Hide from the chatbot
13. Privacy, GDPR and uninstall
- Notice: shown at the top of the chat; edit the text. Tick Consent to make visitors click "I agree" before chatting.
- Chat history: untick to store no messages at all. Keep data for sets the number of days (30 by default); older messages are deleted daily.
- Keep leads for: 0 keeps them until you delete them.
- Export and erase: Tools → Export Personal Data finds every lead saved with the email address (in any letter case) and every message of the conversations linked to those leads, page by page, each conversation once even when several leads share it. Erase Personal Data deletes those messages and the lead rows. Chats from visitors who never left their email are not linked to any email address, so the tools cannot find them; they are deleted by the Keep data for period.
- What is encrypted: only the AI provider API keys typed in the settings. Chat messages, leads (name, email, consent and page) and crawler counts are stored as plain text in your database tables so you can read them in the admin; protect them like the rest of your WordPress database.
- Suggested privacy policy text is added under Settings → Privacy → Policy Guide.
- Visitors are identified by a random session ID kept in their browser. Rate limits and usage counters use a salted hash of the IP address that isn't stored with messages.
Uninstall: deleting the plugin removes its tables, settings, scheduled tasks, post meta and .htaccess block on every site of a network. If the free plugin is still installed, shared data is kept for it.
14. Performance and caching
- The chat script and styles load only when the chatbot is on, and are small with no dependencies.
- Chat requests go to the REST API (
/wp-json/ajai/v1/), which page caches don't cache, so the plugin works with WP Rocket, LiteSpeed Cache, W3 Total Cache, Cloudflare and others.
- llms.txt is generated once and cached until content changes.
- Indexing runs in small batches in the background.
15. Multisite
Network activation sets up every site, and new sites are set up when created. Each site has its own settings, keys, index, logs and llms.txt.
16. Developer hooks
| Hook | Type | Use |
ajai_daily_cap | filter | Site-wide daily message cap (int, 0 = none) |
ajai_monthly_token_budget | filter | Monthly token budget (int, 0 = none) |
ajai_token_estimate | filter | Tokens reserved for a chat request before it runs (gets the built-in upper bound and the messages; values below the built-in bound are ignored) |
ajai_token_count | filter | Conservative token count of a piece of text (for a stricter tokenizer; values below the built-in count are ignored) |
ajai_query_embedding_tokens | filter | Tokens a paid query embedding can use for a question, added to the reservation before it is made |
ajai_provider_body | filter | Change the request sent to the AI service (the reservation is checked again on the final body, and a body without a reply length limit is refused) |
ajai_chat_aborted | action | A question passed ajai_pre_chat but was not answered (cap, budget or AI error) |
ajai_system_prompt | filter | Change the AI instructions |
ajai_pre_chat | filter | Return a WP_Error or ['reply' => ...] to short-circuit a question |
ajai_chat_response | filter | Change the reply sent to the browser |
ajai_search_results | filter | Re-rank or change the passages used for an answer |
ajai_index_post | filter | Return false to keep a post out of the index |
ajai_post_document | filter | Change the text indexed for a post |
ajai_extra_documents | filter | Add your own sources to the index |
ajai_utility_ids | filter | Page IDs never listed or indexed |
ajai_llms_text | filter | Change llms.txt before it is served |
ajai_bots | filter | Add or change known AI crawlers |
ajai_show_floating | filter | Return false to hide the chat button on a page |
ajai_widget_config | filter | Change the chat settings passed to the browser |
ajai_client_ip | filter | Visitor IP used for rate limits (behind a proxy) |
ajai_provider_timeout | filter | AI request timeout in seconds (default 45) |
ajaip_lead_created | action | Runs with the lead's name, email, consent and page after it is saved, for CRMs |
The chat REST API is public and unauthenticated by design (so it works with page caching); it is protected by rate limits, length limits and the daily cap. Admin-only endpoints require the manage_options capability.
17. Troubleshooting
- /llms.txt shows a 404
- Go to Settings → Permalinks and click Save to refresh rewrite rules. Make sure no physical file or server rule is in the way.
- "The chat is not available right now"
- No API key, an invalid key, an empty provider account or the provider is down. Use Test connection on the Chatbot page; the last error is shown there.
- "Sorry, the assistant can't answer that question" or "couldn't put an answer together"
- The AI service replied but without a usable answer: it refused or filtered the question, ran out of reply length (raise the reply length limit), or sent nothing readable. The tokens it used are still counted in the month's usage. The cause is shown as the last error on the Chatbot page.
- The chatbot says it can't find things that are on the site
- Rebuild the index, check the content type is selected and use the test search on the Knowledge page.
- robots.txt doesn't show the rules
- Delete any physical robots.txt in your site root, or copy the rules into it. Some SEO plugins replace robots.txt entirely; add the rules there.
- Testing the AI connection
- On the Chatbot page, click Test connection. It sends one tiny request with your key (its tokens are added to this month's usage) and shows the reply or the provider's error (wrong key, no credit, unknown model). The last error from a visitor chat is shown on the same page.
- The chat button or inline chat does not appear
- Check that the chatbot is turned on and has a working key, clear your page cache and any "combine/delay JavaScript" cache so the new script loads, and look in the browser console for errors from other plugins. The
ajai_show_floating filter may hide the button on some pages. Requests go to /wp-json/ajai/v1/; a security plugin or firewall that blocks the REST API for visitors stops the chat.
- The index is not built, or old messages are not deleted
- Indexing, embeddings and the daily clean-up run on WP-Cron, which only runs when someone visits the site. On low-traffic sites or with
DISABLE_WP_CRON, add a real server cron job that calls wp-cron.php every 5 to 15 minutes. You can also rebuild the index from the Knowledge page.
- Lead alerts or the daily digest emails don't arrive
- They are sent with WordPress's
wp_mail(). Many hosts don't deliver PHP mail reliably: install an SMTP plugin, send a test email from it, and check spam. The digest is sent by WP-Cron (see above).
- Webhooks
- The plugin uses no webhooks and receives no callbacks.
18. Switching themes, deactivation and removing data
- Switching themes does not affect the plugin: settings, the index, leads and chat history stay, and the chat button appears on the new theme. Nothing needs to be cancelled first; there are no subscriptions or webhooks.
- Deactivating stops the chat, llms.txt, llms-full.txt, crawler rules and analytics, unschedules every scheduled task (indexing, embeddings, daily clean-up and digest) and removes the .htaccess block. All data stays: the plugin's database tables (
ajai_chunks, ajai_messages, ajai_counters, ajai_leads, ajai_bot_hits with your table prefix), its options (ajai_*, ajaip_*) and the per-page AI settings post meta. Reactivating picks up where you left off. The plugin adds no user roles.
- Exporting first: download leads and chat logs as CSV from the Leads and Chat logs pages, or use Tools → Export Personal Data for one person.
- Removing everything: delete the plugin from the Plugins page. That removes its tables, options, scheduled tasks, post meta and transients on every site of a network. If the free plugin is still installed, the shared index, chats and settings are kept for it; delete both to remove everything.
19. License options
| License | Sites | Price (USD) |
| Lifetime | 1 | $14, paid once |
| Lifetime | 5 | $25, paid once |
| Lifetime | Unlimited | $50, paid once |
| Yearly | 1 | $9 a year |
Every license gets the same features. The plugin has no license key, activation or remote check. Your AI provider bills you separately for usage under your own API key.
20. Changelog
1.0.3
- Fixed: AI responses that come back without usable answer text (empty, refused or filtered, cut off, or unreadable) are now charged to the monthly token budget. The tokens the AI service reports are kept separately from whether the answer was usable and are returned with the error, so they are counted even when the visitor gets an error message.
- Fixed: each reservation is now settled exactly once in one atomic database update keyed by its id: the hold is removed and the billable tokens are added in the same step, so usage can never be dropped or counted twice, also with many questions at the same time.
- Fixed: when a successful response reports no usage (or zero, or can't be read), the whole reservation is charged: the estimate of the exact request that was sent plus its full reply length limit. Timeouts after sending, gateway timeouts and PHP stopping after sending (fatal error, exit) are charged the same way; requests that were never sent are not charged.
- Fixed: AI errors that still report usage are charged. Usage now includes Anthropic cache tokens and Gemini thinking tokens.
- Fixed: a request the AI service could bill now counts toward the site-wide daily cap even when the visitor got an error.
- Fixed: reservations left by a process that died are settled after 10 minutes at their full amount instead of being dropped.
- Fixed: the admin Test connection button and the admin search preview's query embedding are now added to the month's usage.
- Changed: visitors get a clear message when the AI service returns no usable answer ("please rephrase" for refused questions, "please ask again in other words" for empty answers).
- Docs: what is charged in each case, the fallback for responses without usage, and a troubleshooting entry for the new messages.
1.0.2
- Fixed: the monthly token budget can no longer be overshot by questions running at the same time. Before any paid call, each question reserves a conservative upper bound of its tokens: the full prompt with the conversation history and the largest source passages in the index, the reply length limit sent to the AI service, and the query embedding when embeddings search is on. One database update accepts the reservation only if usage plus every running reservation plus the new one fits the budget. A question that doesn't fit makes no paid call, not even the embedding.
- Fixed: right before the AI call the reservation is set to the estimate of the exact request that will be sent; if it no longer fits, the call is not made, and a request without a reply length limit is never sent. Reported usage, including paid query embeddings, is added with atomic increments.
- Fixed: required lead capture now follows the server in both "before the first question" and "after N questions" modes. When the server asks for details again, the chat forgets the browser's old capture, shows the form, stays paused, and sends the held question once the details are saved. The browser remembers a capture exactly as long as the server (30 days), and answers carry the current lead settings, so cached pages stay in step.
- Changed: the ajai_token_estimate filter can only raise the reservation. Added the ajai_token_count and ajai_query_embedding_tokens filters.
- Docs: how the token budget is enforced and how exact it is, a "Switching themes, deactivation and removing data" section, and more troubleshooting (connection test, chat not appearing, WP-Cron, email delivery).
1.0.1
- Fixed: parallel chat requests could get past the site-wide daily cap and the monthly token budget. Each AI request now reserves one message and an estimate of its tokens in a single database update before the AI is called (requests still running count against the limits), the real usage is recorded afterwards, and failed requests give the reservation back.
- Fixed: monthly usage and per-visitor counters use atomic database increments instead of read-then-write options, so parallel chats keep every count. Existing usage moves to the new counters table on update.
- Fixed: Export Personal Data now includes every message of the conversations linked to the email's leads, page by page, each conversation once, and nothing unrelated. Erase Personal Data deletes the same messages and the leads, in batches; email matching ignores letter case.
- Fixed: with lead capture set to Required after N questions, the question box is hidden and disabled until the lead is saved, including after closing, reopening, reloading or restarting the chat. The chat API enforces it too. Optional capture keeps its Skip button.
- Fixed: a lead that fails to save now shows an error instead of unlocking the chat.
- Improved: embeddings retry with backoff after key, quota or network errors, and a passage the provider refuses is skipped so it can't block the rest.
- Added: a Get support button and a Support card on the dashboard.
- Docs: wide tables scroll on phones; privacy section now says exactly what is encrypted and what export and erase cover.
1.0.0
21. Support
Email admin@007aj.com or message us on WPBay. The Get support button at the top of every AI Ready admin page opens an email with your plugin, WordPress and PHP versions filled in.
Please include: the plugin, WordPress and PHP versions, what you did, what you expected and what happened, and any error shown on the Chatbot page.
Never send passwords or API keys. We will never ask for them.