<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: abdelali Selouani</title>
    <description>The latest articles on DEV Community by abdelali Selouani (@abdelali_selouani_55871ee).</description>
    <link>https://dev.to/abdelali_selouani_55871ee</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3848131%2F88dbed2c-49c1-495e-971e-8af9a2239de0.png</url>
      <title>DEV Community: abdelali Selouani</title>
      <link>https://dev.to/abdelali_selouani_55871ee</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/abdelali_selouani_55871ee"/>
    <language>en</language>
    <item>
      <title>How I got my first client and got myself banned on WordPress.org in the same week.</title>
      <dc:creator>abdelali Selouani</dc:creator>
      <pubDate>Wed, 01 Apr 2026 23:57:21 +0000</pubDate>
      <link>https://dev.to/abdelali_selouani_55871ee/how-i-got-my-first-client-and-got-myself-banned-on-wordpressorg-in-the-same-week-502l</link>
      <guid>https://dev.to/abdelali_selouani_55871ee/how-i-got-my-first-client-and-got-myself-banned-on-wordpressorg-in-the-same-week-502l</guid>
      <description>&lt;p&gt;one week ago I mass-dm'd people telling them about an AI plugin I built for WordPress.&lt;br&gt;
‎ ‎&lt;br&gt;
Zero replies. Fair.&lt;br&gt;
‎ ‎&lt;br&gt;
So I thought, what if I actually help people first?&lt;br&gt;
‎ ‎&lt;br&gt;
I started browsing WordPress.org support forums, finding questions I genuinely knew the answers to. WooCommerce template overrides, REST API issues, Elementor CSS quirks. Stuff I'd spent months deep in while building my plugin.&lt;br&gt;
‎ ‎&lt;br&gt;
I'd answer the question properly, and at the end I'd mention that I built a tool that handles some of this stuff through natural language.&lt;br&gt;
‎ ‎&lt;br&gt;
It worked. Sort of.&lt;br&gt;
‎ ‎&lt;br&gt;
Someone reached out, tried the plugin, liked it, and became my first paying subscriber. $19/month.&lt;br&gt;
‎ ‎&lt;br&gt;
I stared at that Freemius notification for like five minutes. If you've ever built something alone and someone hands you money for it, you know the feeling. It's not about $19. It's proof that the thing in your head is real to someone else too.&lt;br&gt;
‎ ‎&lt;br&gt;
Then two days later I got an email from WordPress.org.&lt;br&gt;
‎ ‎&lt;br&gt;
My account was banned. Turns out a mod flagged my posts as self-promotion, linked my new forum account to my main one, and disabled both. And the plugin submission I'd been preparing? Rejected before it was even reviewed.&lt;br&gt;
‎ ‎&lt;br&gt;
In one week I got the highest high and the lowest low of this entire project.&lt;br&gt;
‎ ‎&lt;br&gt;
Here's what I learned the hard way: WordPress.org forums are not a marketing channel. The mods are right to enforce that. I was genuinely helping people, but I was also promoting my product, and those two things don't mix on that platform.&lt;br&gt;
‎ ‎&lt;br&gt;
I thought I was being clever. I was being the exact person I'd find annoying if I was on the other side.&lt;br&gt;
‎ ‎&lt;br&gt;
So now I'm in this weird spot. I have a product that works, one customer who actually loves it, a full landing page, a payment system running. And zero presence on the platform where most WordPress users discover plugins.&lt;br&gt;
‎ ‎&lt;br&gt;
I've emailed their team to own up to it and ask if there's a path back. Maybe there is, maybe there isn't.&lt;br&gt;
‎ ‎&lt;br&gt;
In the meantime I'm not stopping. I spent too many late nights on this thing to let one mistake kill it.&lt;br&gt;
‎ ‎&lt;br&gt;
But I wanted to share this because every "how I grew my plugin" post is a highlight reel. Nobody talks about the part where you shoot yourself in the foot three steps into the race.&lt;br&gt;
‎ ‎&lt;br&gt;
If you've ever built something for WordPress or WooCommerce and hit a wall that was entirely your own fault, I'd love to hear how you got past it.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>wordpress</category>
      <category>woocommerce</category>
      <category>startup</category>
    </item>
    <item>
      <title>WordPress 7.0 Ships a Built-In AI Client — Here's How We're Already Using It</title>
      <dc:creator>abdelali Selouani</dc:creator>
      <pubDate>Sat, 28 Mar 2026 19:00:50 +0000</pubDate>
      <link>https://dev.to/abdelali_selouani_55871ee/wordpress-70-ships-a-built-in-ai-client-heres-how-were-already-using-it-593d</link>
      <guid>https://dev.to/abdelali_selouani_55871ee/wordpress-70-ships-a-built-in-ai-client-heres-how-were-already-using-it-593d</guid>
      <description>&lt;p&gt;WordPress 7.0 drops on April 9, 2026, and for the first time ever, WordPress Core ships with a built-in AI Client. Not a plugin. Not a SaaS bolt-on. A provider-agnostic PHP API baked into Core that lets any plugin talk to any AI model through one unified interface.&lt;/p&gt;

&lt;p&gt;We've been building &lt;a href="https://pressark.com" rel="noopener noreferrer"&gt;PressArk&lt;/a&gt; — an AI co-pilot that lives inside your wp-admin dashboard — for the past year. When we saw the WordPress 7.0 AI Client proposal land, we immediately started thinking about what it means for plugins like ours, and for the WordPress AI ecosystem in general.&lt;/p&gt;

&lt;p&gt;Here's what's actually changing, and what we learned adapting to it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the WordPress 7.0 AI Client Actually Is
&lt;/h2&gt;

&lt;p&gt;The new &lt;code&gt;wp_ai_client_prompt()&lt;/code&gt; function is the single entry point. It returns a &lt;code&gt;WP_AI_Client_Prompt_Builder&lt;/code&gt; instance — WordPress-flavored with snake_case methods, &lt;code&gt;WP_Error&lt;/code&gt; returns, and integration with the Connectors API.&lt;/p&gt;

&lt;p&gt;The key design decision: &lt;strong&gt;WordPress Core ships zero AI providers&lt;/strong&gt;. Instead, providers (OpenAI, Anthropic, Google) are installed as connector plugins via the new &lt;strong&gt;Settings &amp;gt; Connectors&lt;/strong&gt; screen in wp-admin. Site owners add their API keys once, and every AI-powered plugin on the site can use them.&lt;/p&gt;

&lt;p&gt;This is a big deal for plugin developers. Before 7.0, every AI plugin had to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bundle its own API key management UI&lt;/li&gt;
&lt;li&gt;Handle its own credential storage&lt;/li&gt;
&lt;li&gt;Pick a provider and lock users into it&lt;/li&gt;
&lt;li&gt;Maintain its own HTTP transport layer&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After 7.0, you write against &lt;code&gt;wp_ai_client_prompt()&lt;/code&gt; and the site's configured provider handles the rest. Your plugin works whether the site uses Claude, GPT, Gemini, or a local Ollama instance.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where PressArk Fits In
&lt;/h2&gt;

&lt;p&gt;PressArk predates the WordPress 7.0 AI Client — we've been shipping our own AI integration layer since v1.0. Our plugin adds a chat panel to every wp-admin page where you describe what you want in plain English, and the AI agent figures out which tools to call, shows you a preview, and executes only after you approve.&lt;/p&gt;

&lt;p&gt;Currently, PressArk handles its own model routing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Free tier&lt;/strong&gt;: DeepSeek V3.2 (bundled credits, no API key needed)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pro tier&lt;/strong&gt;: Claude Sonnet 4.6 via our token relay&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;BYOK&lt;/strong&gt;: Bring your own OpenRouter key for any model&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With the WordPress 7.0 AI Client landing in Core, we're evaluating how to integrate with the Connectors API alongside our existing routing. The interesting challenge: PressArk isn't just sending simple prompts — we run a full agentic loop with 200+ AI-callable tools, spin detection, token budgeting, and structured checkpoints. The WP AI Client is designed for request-response patterns, but agentic workflows need:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Multi-turn conversations&lt;/strong&gt; with tool call results fed back into context&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Token budget awareness&lt;/strong&gt; (we track usage across a 258K context window with three-stage degradation)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spin detection&lt;/strong&gt; (if the agent makes 3 consecutive no-progress rounds, we kill the loop)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Structured memory&lt;/strong&gt; that survives message compaction&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We'll likely use the Connectors API for credential management while keeping our own orchestration layer for the agentic parts.&lt;/p&gt;

&lt;h2&gt;
  
  
  What This Means for WordPress AI Plugin Developers
&lt;/h2&gt;

&lt;p&gt;If you're building AI features for WordPress, the 7.0 AI Client changes your development model:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Stop building credential UIs.&lt;/strong&gt; The Connectors API handles API key storage, validation, and the admin settings page. Your plugin just calls &lt;code&gt;wp_ai_client_prompt()&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Go provider-agnostic from day one.&lt;/strong&gt; Don't hardcode OpenAI or Anthropic. The AI Client automatically selects a suitable model based on prompt requirements (text vs. image, etc.) and whatever the site owner has configured.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Plan for the provider ecosystem.&lt;/strong&gt; WordPress 7.1 (August 2026) will open up the Connectors page to third-party providers. If you're building a connector plugin for a niche model provider, start now.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Think beyond simple prompts.&lt;/strong&gt; The AI Client handles request-response well, but if you're building agents, planners, or multi-step workflows, you'll need your own orchestration layer on top. The AI Client gives you the transport; you build the brain.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Bigger Picture
&lt;/h2&gt;

&lt;p&gt;WordPress powers 40%+ of the web. Having a standard AI interface in Core means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Site owners configure AI credentials once instead of per-plugin&lt;/li&gt;
&lt;li&gt;Plugin developers can add AI features without reinventing infrastructure&lt;/li&gt;
&lt;li&gt;The WordPress ecosystem gets a shared foundation instead of fragmented approaches&lt;/li&gt;
&lt;li&gt;Users aren't locked into a single AI provider&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is infrastructure, not features — and that's exactly the right call for something going into Core.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try PressArk
&lt;/h2&gt;

&lt;p&gt;If you want to see what a full AI agent looks like inside WordPress (not just prompt-response, but a complete agentic co-pilot with tool execution, previews, and safety guardrails), check out PressArk:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Website&lt;/strong&gt;: &lt;a href="https://pressark.com" rel="noopener noreferrer"&gt;pressark.com&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;WordPress.org&lt;/strong&gt;: Plugin submitted and pending approval — search "PressArk" (it may be live by the time you read this)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Free tier available&lt;/strong&gt;: Bundled AI credits, no API key required to start&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We're genuinely excited about the WordPress 7.0 AI Client. It validates the direction we've been building toward, and it means we can focus more on what makes PressArk unique — the agentic layer — instead of infrastructure plumbing.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;What are you building with the WordPress 7.0 AI Client? Drop your ideas in the comments — curious to see what the community comes up with.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>ai</category>
      <category>php</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Show DEV: PressArk - Talk to Your WordPress Site Instead of Clicking Through It</title>
      <dc:creator>abdelali Selouani</dc:creator>
      <pubDate>Sat, 28 Mar 2026 18:50:26 +0000</pubDate>
      <link>https://dev.to/abdelali_selouani_55871ee/show-dev-pressark-talk-to-your-wordpress-site-instead-of-clicking-through-it-1hb5</link>
      <guid>https://dev.to/abdelali_selouani_55871ee/show-dev-pressark-talk-to-your-wordpress-site-instead-of-clicking-through-it-1hb5</guid>
      <description>&lt;p&gt;Hey DEV! I built an AI co-pilot that lives inside your WordPress admin dashboard. Instead of clicking through menus, you just chat with it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Website:&lt;/strong&gt; &lt;a href="https://pressark.com" rel="noopener noreferrer"&gt;pressark.com&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;WordPress.org:&lt;/strong&gt; &lt;a href="https://wordpress.org/plugins/pressark/" rel="noopener noreferrer"&gt;wordpress.org/plugins/pressark&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Free tier:&lt;/strong&gt; Yes - bundled AI credits, no API key needed&lt;/p&gt;
&lt;h2&gt;
  
  
  What it does
&lt;/h2&gt;

&lt;p&gt;PressArk adds a chat panel to every wp-admin page. You describe what you want in plain English, it figures out the tools, shows you a preview, and executes only after you approve.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Examples of real commands:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"Edit the intro on my latest post to mention the spring sale"

"Create a 20% off coupon for WooCommerce that expires Friday"

"Audit the SEO on my homepage and fix the meta description"

"Scan my site for security vulnerabilities"

"Every Monday at 9am, run an SEO check on my top 5 pages"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What makes it different from other WP AI plugins
&lt;/h2&gt;

&lt;p&gt;Most WordPress AI plugins do one thing: generate content. PressArk manages your &lt;strong&gt;entire site&lt;/strong&gt; through conversation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Content &amp;amp; Pages&lt;/strong&gt;: Edit posts, pages, blocks, custom post types, media, excerpts, metadata&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;WooCommerce&lt;/strong&gt;: Products, orders, customers, coupons, shipping, taxes, analytics&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SEO&lt;/strong&gt;: Full audit with scores (A-F), meta optimization, crawlability checks, one-click fixes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security&lt;/strong&gt;: WordPress version, PHP, SSL, plugin vulnerabilities, file permissions, user enumeration&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Elementor&lt;/strong&gt;: Edit widgets, layouts, containers, global styles, forms, popups via chat&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automations&lt;/strong&gt;: Schedule recurring AI tasks with cron (daily SEO checks, weekly content audits)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Total: 200+ AI-callable tools across all categories.&lt;/p&gt;

&lt;h2&gt;
  
  
  The safety model
&lt;/h2&gt;

&lt;p&gt;Nothing writes without your approval. Every tool is classified:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Level&lt;/th&gt;
&lt;th&gt;Action&lt;/th&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Read&lt;/td&gt;
&lt;td&gt;Auto-executes&lt;/td&gt;
&lt;td&gt;Search content, check SEO score&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Preview&lt;/td&gt;
&lt;td&gt;Shows diff first&lt;/td&gt;
&lt;td&gt;Edit post, update meta&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Confirm&lt;/td&gt;
&lt;td&gt;Explicit approval card&lt;/td&gt;
&lt;td&gt;Publish, delete, process refund&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This &lt;strong&gt;Preview &amp;gt; Approve &amp;gt; Execute&lt;/strong&gt; pipeline is non-negotiable. The AI can't go rogue on your production site.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tech details for the curious
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Pure PHP WordPress plugin, no external frameworks&lt;/li&gt;
&lt;li&gt;AI model routing: Free tier = DeepSeek V3.2, Pro = Claude Sonnet 4.6, or BYOK with OpenRouter/OpenAI/Anthropic&lt;/li&gt;
&lt;li&gt;Content indexing via MySQL FULLTEXT (800-char chunks, 100-char overlap) - no vector DB needed&lt;/li&gt;
&lt;li&gt;Site profiling: auto-analyzes your tone, brand voice, content patterns, and theme.json design tokens&lt;/li&gt;
&lt;li&gt;Structured checkpoints for conversation memory that survives context compression&lt;/li&gt;
&lt;li&gt;Spin detection: exits after 3 consecutive no-progress agent rounds&lt;/li&gt;
&lt;li&gt;Token budget with three-stage degradation (prime at 65%, compact at 86%, pause at ceiling)&lt;/li&gt;
&lt;li&gt;Real-time streaming via SSE&lt;/li&gt;
&lt;li&gt;Wall-clock timeout: 120s hard ceiling per execution&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I wrote a deep-dive on the agent safety architecture here: &lt;a href="https://dev.to/abdelali_selouani_55871ee/how-we-stop-ai-agents-from-going-rogue-inside-wordpress-spin-detection-token-budgets-and-5eg6"&gt;How We Stop AI Agents from Going Rogue Inside WordPress&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;Install from &lt;a href="https://wordpress.org/plugins/pressark/" rel="noopener noreferrer"&gt;WordPress.org&lt;/a&gt; (still pending approval, may be approved by the time you read this) or visit &lt;a href="https://pressark.com" rel="noopener noreferrer"&gt;pressark.com&lt;/a&gt;. The free tier is fully functional - not a limited trial.&lt;/p&gt;

&lt;p&gt;Would love feedback from the DEV community. What features would you want from an AI co-pilot for WordPress? What am I missing?&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>wordpress</category>
      <category>ai</category>
      <category>opensource</category>
    </item>
    <item>
      <title>I Got Tired of Clicking Through wp-admin, So I Built an AI That Does It for Me</title>
      <dc:creator>abdelali Selouani</dc:creator>
      <pubDate>Sat, 28 Mar 2026 18:46:24 +0000</pubDate>
      <link>https://dev.to/abdelali_selouani_55871ee/i-got-tired-of-clicking-through-wp-admin-so-i-built-an-ai-that-does-it-for-me-f1f</link>
      <guid>https://dev.to/abdelali_selouani_55871ee/i-got-tired-of-clicking-through-wp-admin-so-i-built-an-ai-that-does-it-for-me-f1f</guid>
      <description>&lt;p&gt;Here's a WordPress admin workflow I used to do three times a week:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Log into wp-admin&lt;/li&gt;
&lt;li&gt;Navigate to Posts &amp;gt; All Posts&lt;/li&gt;
&lt;li&gt;Find the post I need to update&lt;/li&gt;
&lt;li&gt;Click Edit&lt;/li&gt;
&lt;li&gt;Scroll to the paragraph that needs changing&lt;/li&gt;
&lt;li&gt;Make the edit&lt;/li&gt;
&lt;li&gt;Update the SEO meta title and description&lt;/li&gt;
&lt;li&gt;Check the featured image is still right&lt;/li&gt;
&lt;li&gt;Click Update&lt;/li&gt;
&lt;li&gt;Go back to the post list&lt;/li&gt;
&lt;li&gt;Repeat for the next 4 posts&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Total time: 45 minutes of clicking through menus, waiting for pages to load, and context-switching between the editor, Yoast, and the media library.&lt;/p&gt;

&lt;p&gt;I've been building WordPress sites for years. The platform is incredible — it powers 43% of the web for a reason. But the admin experience hasn't fundamentally changed in a decade. It's still a series of forms, buttons, and page loads. You still navigate to the thing, click the thing, fill in the thing, save the thing.&lt;/p&gt;

&lt;p&gt;One day I was doing this for the tenth time that week and thought: &lt;em&gt;what if I could just tell WordPress what I want and have it do all the clicking for me?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That's the moment &lt;a href="https://pressark.com" rel="noopener noreferrer"&gt;PressArk&lt;/a&gt; was born.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Idea: A Chat Panel in Every Admin Page
&lt;/h2&gt;

&lt;p&gt;The concept was simple. Add a chat panel to the bottom-right of every wp-admin page. Type what you want. The AI figures out which tools to use, shows you a preview of the changes, and applies them only after you approve.&lt;/p&gt;

&lt;p&gt;Instead of that 11-step workflow above:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You: "Update the intro paragraph on the running shoes post to mention 
      the spring sale, and update the SEO title to include 'Spring 2026'"

PressArk: [reads the post] [finds the intro paragraph] [drafts the edit] 
          [updates the meta title] [shows preview] [waits for your OK]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One message. Same result. Thirty seconds instead of fifteen minutes.&lt;/p&gt;

&lt;p&gt;But "simple concept" and "simple to build" are very different things.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Hard Parts Nobody Warns You About
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Your AI doesn't know your site
&lt;/h3&gt;

&lt;p&gt;The first version of PressArk was basically a GPT wrapper with WordPress API access. It could edit posts, sure. But every edit sounded like it was written by a different person. The tone was wrong. The CTAs didn't match our style. It used "utilize" when the site always says "use."&lt;/p&gt;

&lt;p&gt;The fix was what we call &lt;strong&gt;Site Profiling&lt;/strong&gt;. When you activate PressArk, it crawls your existing content and builds a profile:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tone analysis&lt;/strong&gt;: Are you a "we" brand or a "you" brand? Formal or casual? Do you use contractions?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Content DNA&lt;/strong&gt;: Average word count, heading patterns, how often you use lists vs paragraphs, CTA placement&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Brand terms&lt;/strong&gt;: Words and phrases unique to your site that should always appear&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Design tokens&lt;/strong&gt;: Colors and spacing from your theme.json&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This profile gets compressed to about 100-200 tokens and injected into every prompt. The AI doesn't just edit your content — it edits it &lt;em&gt;like you would&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  WordPress data is messy
&lt;/h3&gt;

&lt;p&gt;If you've ever worked with &lt;code&gt;wp_postmeta&lt;/code&gt;, you know what I'm talking about. Custom fields from five different plugins. Serialized arrays stored as strings. Elementor storing entire page layouts as nested JSON in post meta. Yoast and Rank Math both hooking into the same SEO fields with different conventions.&lt;/p&gt;

&lt;p&gt;We had to build a resolution layer that understands all of this. When the AI says "update the SEO title," PressArk detects whether you're using Yoast, Rank Math, or core WordPress meta, and routes the update to the right place. When you say "change the hero section," it knows whether you're using Gutenberg blocks, Elementor widgets, or a theme template.&lt;/p&gt;

&lt;h3&gt;
  
  
  Users don't trust AI with their live site (and they shouldn't)
&lt;/h3&gt;

&lt;p&gt;The single most important design decision we made: &lt;strong&gt;nothing writes without explicit approval&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Every action the AI takes falls into one of three categories:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Reads&lt;/strong&gt; happen automatically — checking your content, scanning SEO, looking at site structure. These can't hurt anything.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Edits&lt;/strong&gt; generate a live preview — you see exactly what will change, side by side, before anything touches the database.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dangerous actions&lt;/strong&gt; (publish, delete, WooCommerce order changes) require an explicit confirmation card with full details.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This Preview &amp;gt; Approve &amp;gt; Execute pipeline is the reason people actually use PressArk on production sites. They can see what the AI wants to do before it does it. Trust isn't given — it's earned through transparency.&lt;/p&gt;

&lt;h2&gt;
  
  
  What People Actually Use It For
&lt;/h2&gt;

&lt;p&gt;I built PressArk to solve my own content editing problem. Turns out people use it for a lot more:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Content teams&lt;/strong&gt; use it for bulk operations — "update the CTA on all blog posts from 2024 to link to the new pricing page." One message instead of editing 50 posts manually.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;WooCommerce store owners&lt;/strong&gt; use it for product management — "create a 15% coupon for the spring collection that expires next Friday." Done in 10 seconds instead of navigating through 4 WooCommerce screens.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Freelancers&lt;/strong&gt; use the SEO scanner — "audit the SEO on my top 10 pages and tell me what to fix." It checks meta titles, descriptions, heading structure, canonical URLs, schema markup, and gives actionable recommendations with one-click fixes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Security-conscious site owners&lt;/strong&gt; run the security scanner — "scan my site for vulnerabilities." It checks WordPress version, PHP version, SSL, plugin updates, file permissions, user enumeration, and rates each issue by severity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Agencies&lt;/strong&gt; use the automation system — "every Monday at 9am, run an SEO audit on my homepage and email me the results." Cron-based automations with full audit trails.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Technical Stack (For the Curious)
&lt;/h2&gt;

&lt;p&gt;PressArk is a WordPress plugin — pure PHP, no external frameworks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AI routing&lt;/strong&gt;: Routes to the best model per task automatically. Free tier uses DeepSeek V3.2. Pro tier uses Claude Sonnet 4.6. BYOK (Bring Your Own Key) lets you connect OpenRouter, OpenAI, Anthropic, or DeepSeek directly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;200+ tools&lt;/strong&gt;: Content editing, SEO, security, WooCommerce, Elementor, blocks, custom fields, media management — all exposed as AI-callable functions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Content indexing&lt;/strong&gt;: Posts chunked into 800-char segments with 100-char overlap, indexed via MySQL FULLTEXT. No vector DB dependency — works on any WordPress host.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Streaming&lt;/strong&gt;: Real-time token delivery via SSE. You see the AI thinking in real-time, not waiting for a complete response.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Checkpoints&lt;/strong&gt;: Structured conversation memory that survives context window compression. The AI remembers what it was doing even when old messages get dropped.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Where We Are Now
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://wordpress.org/plugins/pressark/" rel="noopener noreferrer"&gt;WordPress.org&lt;/a&gt; (still pending approval, may be approved by the time you read this) and running on thousands of sites. The free tier includes bundled AI credits — no API key needed to start.&lt;/p&gt;

&lt;p&gt;The thing I'm most proud of isn't the technology. It's that people who spend hours in wp-admin every day are getting that time back. A freelancer in our community told me PressArk saves her about 6 hours a week on content management alone. That's 6 hours she spends on actual creative work instead of clicking through menus.&lt;/p&gt;

&lt;p&gt;WordPress is the backbone of the web. It deserves an interface that matches what AI makes possible in 2026 — not more buttons and forms, but a conversation.&lt;/p&gt;

&lt;p&gt;If you manage a WordPress site, &lt;a href="https://pressark.com" rel="noopener noreferrer"&gt;give PressArk a try&lt;/a&gt;. The free tier is genuinely useful, not a teaser.&lt;/p&gt;

&lt;p&gt;And if you're building something similar for a different platform — I'd love to hear about the problems you're solving. The agent safety stuff alone could fill a whole series of posts (and actually, &lt;a href="https://dev.to/abdelali_selouani_55871ee/how-we-stop-ai-agents-from-going-rogue-inside-wordpress-spin-detection-token-budgets-and-5eg6"&gt;I wrote one about that too&lt;/a&gt;).&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>ai</category>
      <category>productivity</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How We Stop AI Agents from Going Rogue Inside WordPress (Spin Detection, Token Budgets, and Checkpoints)</title>
      <dc:creator>abdelali Selouani</dc:creator>
      <pubDate>Sat, 28 Mar 2026 18:43:50 +0000</pubDate>
      <link>https://dev.to/abdelali_selouani_55871ee/how-we-stop-ai-agents-from-going-rogue-inside-wordpress-spin-detection-token-budgets-and-5eg6</link>
      <guid>https://dev.to/abdelali_selouani_55871ee/how-we-stop-ai-agents-from-going-rogue-inside-wordpress-spin-detection-token-budgets-and-5eg6</guid>
      <description>&lt;p&gt;If you've ever built an AI agent that interacts with a real system — not a chatbot, an &lt;em&gt;agent&lt;/em&gt; that reads data, makes decisions, and executes actions — you know the terrifying moment when it starts looping.&lt;/p&gt;

&lt;p&gt;It reads a post. Tries to edit it. Gets an unexpected response. Reads the same post again. Tries the same edit. Gets the same response. Burns through $4 of API tokens in 30 seconds doing absolutely nothing useful.&lt;/p&gt;

&lt;p&gt;We hit this problem building &lt;a href="https://pressark.com" rel="noopener noreferrer"&gt;PressArk&lt;/a&gt;, an AI co-pilot that lives inside the WordPress admin dashboard. Users chat with it to manage their entire site: edit content, run SEO audits, manage WooCommerce products, scan for security issues — all through natural language.&lt;/p&gt;

&lt;p&gt;The agent has access to 200+ tools across content, SEO, security, WooCommerce, and Elementor. It runs inside a real production WordPress environment with real user data. Getting safety right isn't optional — it's existential.&lt;/p&gt;

&lt;p&gt;Here's what we built to keep the agent under control.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem 1: The Spin Cycle
&lt;/h2&gt;

&lt;p&gt;AI agents love to get stuck. Especially in WordPress, where API responses can be... surprising. A &lt;code&gt;wp_update_post()&lt;/code&gt; that silently fails. A WooCommerce endpoint that returns a different schema than expected. An Elementor page where the JSON structure doesn't match what the model predicted.&lt;/p&gt;

&lt;p&gt;The agent sees an unexpected result, retries the same approach, gets the same unexpected result, and loops forever.&lt;/p&gt;

&lt;h3&gt;
  
  
  Our solution: Tool Signature Tracking
&lt;/h3&gt;

&lt;p&gt;Every round, we hash the tool calls the agent makes. If the signature matches the previous round — same tools, same arguments, same pattern — we increment an idle counter.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Spin detection - tracks consecutive rounds with no real progress.&lt;/span&gt;
&lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;    &lt;span class="nv"&gt;$idle_rounds&lt;/span&gt;         &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="nv"&gt;$last_tool_signature&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;''&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;const&lt;/span&gt; &lt;span class="no"&gt;MAX_IDLE_ROUNDS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After 3 consecutive no-progress rounds, we force-exit the loop. No exceptions. The agent gets a structured error message explaining what happened, and the user sees a clear "I got stuck, here's what I was trying to do" message instead of a mysterious timeout.&lt;/p&gt;

&lt;p&gt;Simple heuristic. Saved us thousands in runaway API costs during development.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem 2: The Context Window is a Ticking Clock
&lt;/h2&gt;

&lt;p&gt;WordPress conversations get long fast. A user asks "audit the SEO on my homepage." The agent needs to:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Read the page content (big HTML blob)&lt;/li&gt;
&lt;li&gt;Check meta tags&lt;/li&gt;
&lt;li&gt;Analyze heading structure&lt;/li&gt;
&lt;li&gt;Check canonical URLs&lt;/li&gt;
&lt;li&gt;Look at internal links&lt;/li&gt;
&lt;li&gt;Generate recommendations&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Each step adds to the conversation history. By step 4, we're already burning through the context window. By the time the agent tries to generate a coherent summary, it's forgotten what it found in step 1.&lt;/p&gt;

&lt;h3&gt;
  
  
  Our solution: Three-Stage Token Budget
&lt;/h3&gt;

&lt;p&gt;We track total tokens consumed across all rounds and apply pressure at three thresholds:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="k"&gt;const&lt;/span&gt; &lt;span class="no"&gt;MAX_REQUEST_TOKENS&lt;/span&gt;          &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;258000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;const&lt;/span&gt; &lt;span class="no"&gt;SOFT_PRIME_TOKEN_RATIO&lt;/span&gt;      &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.65&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  &lt;span class="c1"&gt;// ~167K: start checkpoint priming&lt;/span&gt;
&lt;span class="k"&gt;const&lt;/span&gt; &lt;span class="no"&gt;SOFT_COMPACTION_TOKEN_RATIO&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.86&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  &lt;span class="c1"&gt;// ~222K: live message compaction&lt;/span&gt;
&lt;span class="k"&gt;const&lt;/span&gt; &lt;span class="no"&gt;PAUSE_HEADROOM_TOKENS&lt;/span&gt;       &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;8000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  &lt;span class="c1"&gt;// Pause within 8K of ceiling&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Stage 1 — Checkpoint Priming (65%):&lt;/strong&gt; The agent starts building a structured checkpoint that captures what it's learned so far. Not a summary — a structured state object with specific fields:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="nv"&gt;$goal&lt;/span&gt;        &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;''&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="kt"&gt;array&lt;/span&gt;  &lt;span class="nv"&gt;$entities&lt;/span&gt;    &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt; &lt;span class="c1"&gt;// posts, pages, products with IDs&lt;/span&gt;
&lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="kt"&gt;array&lt;/span&gt;  &lt;span class="nv"&gt;$facts&lt;/span&gt;       &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt; &lt;span class="c1"&gt;// key-value pairs discovered&lt;/span&gt;
&lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="kt"&gt;array&lt;/span&gt;  &lt;span class="nv"&gt;$pending&lt;/span&gt;     &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt; &lt;span class="c1"&gt;// actions still queued&lt;/span&gt;
&lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="nv"&gt;$workflow_stage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;''&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// discover|gather|plan|preview|apply|verify&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Stage 2 — Live Compaction (86%):&lt;/strong&gt; Old messages get dropped from the conversation, but the checkpoint persists. The agent loses the raw conversation but keeps the operational state. It knows &lt;em&gt;what it was doing&lt;/em&gt; and &lt;em&gt;what it found&lt;/em&gt; without carrying 200K tokens of chat history.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stage 3 — Hard Pause (within 8K of ceiling):&lt;/strong&gt; We pause the loop entirely. The checkpoint becomes a "context capsule" that can be used to continue in a follow-up request if needed.&lt;/p&gt;

&lt;p&gt;This means the agent degrades gracefully instead of hitting a wall. At 65%, it's still fully functional but preparing for compression. At 86%, it's working from structured memory. At the ceiling, it hands off cleanly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem 3: Not All Tools Are Equal
&lt;/h2&gt;

&lt;p&gt;The agent has 200+ tools. Some are harmless reads. Some modify content. Some delete things permanently. Some charge the user money (WooCommerce refunds, for example).&lt;/p&gt;

&lt;p&gt;Treating them all the same is asking for trouble.&lt;/p&gt;

&lt;h3&gt;
  
  
  Our solution: Three-Tier Capability Classification
&lt;/h3&gt;

&lt;p&gt;Every tool in our catalog gets classified:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Read&lt;/strong&gt; (auto-execute): &lt;code&gt;site_overview&lt;/code&gt;, &lt;code&gt;search_content&lt;/code&gt;, &lt;code&gt;get_seo_score&lt;/code&gt; — these run automatically, no user interaction needed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Preview&lt;/strong&gt; (live preview): &lt;code&gt;edit_post&lt;/code&gt;, &lt;code&gt;update_seo_meta&lt;/code&gt;, &lt;code&gt;modify_elementor_widget&lt;/code&gt; — these generate a visual diff showing exactly what will change, and wait for approval.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Confirm&lt;/strong&gt; (explicit card): &lt;code&gt;publish_post&lt;/code&gt;, &lt;code&gt;delete_content&lt;/code&gt;, &lt;code&gt;process_refund&lt;/code&gt;, &lt;code&gt;apply_security_fix&lt;/code&gt; — these show a confirmation card with full details. Nothing executes without a click.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The classification lives in the tool catalog, not in the agent loop. This means adding a new tool automatically inherits the right safety level based on its category:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Every write action goes through:
Preview -&amp;gt; Approve -&amp;gt; Execute

Nothing changes on your site without your explicit OK.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This isn't just about preventing accidents — it's about trust. When a user sees the agent propose a change, review it, and then apply only what was approved, they start trusting it with bigger tasks. Trust compounds.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem 4: The 120-Second Ceiling
&lt;/h2&gt;

&lt;p&gt;Token limits and spin detection handle most runaway scenarios. But there's an edge case: cheap read-only tool calls that don't burn many tokens but run forever.&lt;/p&gt;

&lt;p&gt;Imagine the agent deciding to "scan all 500 pages for broken links" one by one. Each read call is cheap. Token budget isn't triggered. Spin detection doesn't catch it because each call is different. But 500 sequential API calls take... a while.&lt;/p&gt;

&lt;h3&gt;
  
  
  Our solution: Wall-Clock Timeout
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="k"&gt;const&lt;/span&gt; &lt;span class="no"&gt;LOOP_TIMEOUT_SECONDS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;120&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Hard two-minute ceiling on any single agent execution. Combined with per-tier round limits (free tier gets fewer rounds than paid), this creates a bounded execution envelope: you know exactly how much time and money any single request can consume, regardless of what the agent decides to do.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem 5: Tool Discovery Loops
&lt;/h2&gt;

&lt;p&gt;Our agent doesn't load all 200+ tools upfront. It starts with a small core set and can discover/load more tools as needed via meta-tools (&lt;code&gt;discover_tools&lt;/code&gt; and &lt;code&gt;load_tools&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;This is great for efficiency but creates a new failure mode: the agent discovers tools, doesn't find what it needs, discovers again, loads the wrong group, discovers again...&lt;/p&gt;

&lt;h3&gt;
  
  
  Our solution: Meta-Tool Budgets
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="k"&gt;const&lt;/span&gt; &lt;span class="no"&gt;MAX_DISCOVER_CALLS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;const&lt;/span&gt; &lt;span class="no"&gt;MAX_LOAD_CALLS&lt;/span&gt;     &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Five discovery calls and five load calls per session. After that, guided degradation — the agent works with what it has instead of searching for the perfect tool. This prevents the discovery loop without restricting the agent's ability to find the right tools for most tasks.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Execution Envelope
&lt;/h2&gt;

&lt;p&gt;All of these mechanisms work together to create what we call the "bounded execution kernel":&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Constraint&lt;/th&gt;
&lt;th&gt;Limit&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Max idle rounds&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Stop spin cycles&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Soft checkpoint priming&lt;/td&gt;
&lt;td&gt;65% of token budget&lt;/td&gt;
&lt;td&gt;Prepare structured memory&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Live compaction&lt;/td&gt;
&lt;td&gt;86% of token budget&lt;/td&gt;
&lt;td&gt;Drop old messages, keep state&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hard token ceiling&lt;/td&gt;
&lt;td&gt;258K tokens&lt;/td&gt;
&lt;td&gt;Absolute budget limit&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Wall-clock timeout&lt;/td&gt;
&lt;td&gt;120 seconds&lt;/td&gt;
&lt;td&gt;Catch cheap-but-slow loops&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Meta-tool budget&lt;/td&gt;
&lt;td&gt;5 discover + 5 load&lt;/td&gt;
&lt;td&gt;Prevent discovery loops&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tool result ceiling&lt;/td&gt;
&lt;td&gt;10K tokens per call&lt;/td&gt;
&lt;td&gt;Prevent single-tool context flooding&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;No single mechanism is sufficient. A spin cycle that uses cheap tools bypasses the token budget but hits the wall-clock timeout. A context-heavy task that doesn't loop hits the compaction thresholds. A discovery loop hits the meta-tool budget. The envelope is the intersection of all constraints.&lt;/p&gt;

&lt;h2&gt;
  
  
  What We Learned
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Simple heuristics beat complex classifiers.&lt;/strong&gt; Our spin detection is just "did the tool signature change?" Not fancy, but it catches 95% of loops. The remaining 5% hit the wall-clock timeout.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Structured checkpoints beat summaries.&lt;/strong&gt; When you compress conversation history into a summary, you lose precision. When you compress it into a structured state object with specific entities, facts, and pending actions, the agent can pick up exactly where it left off.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Classify tools at the catalog level, not the agent level.&lt;/strong&gt; The agent doesn't need to decide whether a tool is dangerous. The catalog already knows. This separation means new tools get safety for free.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bounded execution is a feature, not a limitation.&lt;/strong&gt; Users trust an agent more when they know it can't run away. "This will take at most 2 minutes and cost at most X tokens" is a better UX than "let me think about that..." followed by silence.&lt;/p&gt;




&lt;p&gt;(still pending approval, may be approved by the time you read this) &lt;a href="https://wordpress.org/plugins/pressark/" rel="noopener noreferrer"&gt;WordPress.org&lt;/a&gt; with a free tier if you want to try the agent yourself. The bounded execution kernel is the same one running in production across thousands of sites.&lt;/p&gt;

&lt;p&gt;If you're building AI agents that interact with real systems — not just chatbots — I'd love to hear what safety mechanisms you've found essential. What failure modes did you discover that you didn't anticipate?&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>ai</category>
      <category>webdev</category>
      <category>php</category>
    </item>
  </channel>
</rss>
