<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Roshan Sharma | Forward Deployed AI Engineer on Medium]]></title>
        <description><![CDATA[Stories by Roshan Sharma | Forward Deployed AI Engineer on Medium]]></description>
        <link>https://medium.com/@copybyroshan?source=rss-0976da8ae71d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*bFTAolpVgXHFP3iZSfVqTQ.jpeg</url>
            <title>Stories by Roshan Sharma | Forward Deployed AI Engineer on Medium</title>
            <link>https://medium.com/@copybyroshan?source=rss-0976da8ae71d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 20:46:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@copybyroshan/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[LangGraph vs CrewAI vs AutoGen: Which Multi-Agent Framework Survives Production in 2026?]]></title>
            <link>https://medium.com/@copybyroshan/langgraph-vs-crewai-vs-autogen-which-multi-agent-framework-survives-production-in-2026-1a2773382c48?source=rss-0976da8ae71d------2</link>
            <guid isPermaLink="false">https://medium.com/p/1a2773382c48</guid>
            <category><![CDATA[marketing]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Roshan Sharma | Forward Deployed AI Engineer]]></dc:creator>
            <pubDate>Mon, 06 Jul 2026 11:12:14 GMT</pubDate>
            <atom:updated>2026-07-06T11:12:14.243Z</atom:updated>
            <content:encoded><![CDATA[<h4>The Problem with “Just Pick One”</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*txgoikgRRMlrQ14QwxngYQ.png" /></figure><p>Most teams building multi-agent systems in 2026 start with the same question: “Which framework should we use?”</p><p>The problem isn’t the question itself. It’s that the answer changes completely depending on whether you’re prototyping on a Friday afternoon or running a production pipeline that processes 50,000 tasks a day.</p><p>I spent the last few months digging into this across three production deployments. Two of them are still running.</p><p>One got rewritten from scratch. Here’s what I learned about why the framework you pick directly determines whether your system keeps working at 3 AM or wakes you up with a traceback.</p><p>The short answer: LangGraph wins for production reliability. CrewAI wins for speed of prototyping. AutoGen is in maintenance mode and shouldn’t be your starting point for anything new in 2026.</p><p>But the short answer isn’t useful for engineering decisions. The architecture differences matter.</p><p>The state management gap is structural, not cosmetic. And the failure recovery model is what separates systems that degrade gracefully from systems that just die.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yM8BuPKgT9BDczRmgNhZHw.png" /></figure><h3>Design Principles: What Actually Matters at Scale</h3><blockquote><a href="http://www.linkedin.com/in/copybyroshan">I spent 4 years deep in the digital marketing</a> trenches figuring out exactly what drives revenue, and the last 2 years building the engineering architecture to automate it.</blockquote><p>What I learned applies directly here: at scale, the abstraction that feels productive in sprint one becomes the bottleneck in sprint twenty.</p><p>Three principles guide every production multi-agent decision I make now.</p><p>First: explicit state beats implicit state. If you can’t inspect what happened between agent A and agent B without adding custom logging, you don’t have a production system.</p><p>You have a prototype that fooled you into thinking it was ready.</p><p>Second: failure isolation isn’t optional. When agent D fails on the 847th task of a 1,000-task batch at 2 AM, the system shouldn’t restart from task 1.</p><p>It should restart from the exact point of failure. This is the difference between a 2-second recovery and a $40 token bill you didn’t budget for.</p><p>Third: observability is architecture, not afterthought. If attaching an Open Telemetry span to each agent requires modifying framework internals, you picked the wrong framework.</p><p>These principles rule out certain architectures immediately. Let me show you exactly how each framework handles them.</p><h3>Architecture Overview: Three Fundamentally Different Models</h3><p>LangGraph models your multi-agent system as a directed graph. Each node is an agent or a function. Each edge is a state transition.</p><p>The state object flows through the graph, getting transformed at each node, and gets checkpointed at every transition.</p><p>This sounds academic until you realize what it enables: conditional branching based on intermediate results, parallel execution with synchronization points, human-in-the-loop approvals where the graph literally pauses and waits for a human to click “approve” before resuming, and time-travel debugging where you replay any previous state transition to understand what went wrong.</p><p>The graph isn’t just documentation. It’s the actual execution model. When a production engineer told me “Lang Graph won for us because the explicit state graph made it easier to attach Open Telemetry spans to each node, CrewAI’s role abstraction was nicer to write but harder to instrument when something failed silently,” they weren’t expressing a preference.</p><p>They were describing the structural reason why one framework survives production and the other doesn’t.</p><p>CrewAI takes a different approach. You define agents by their roles: Researcher, Writer, Reviewer. You assign them tasks.</p><p>They collaborate through a sequential pipeline where each agent’s output becomes the next agent’s input.</p><p>The learning curve comparison tells the story: CrewAI is the easiest to adopt. If you’re new to multi-agent systems and need something working by end of week, CrewAI is the right call.</p><p>The role metaphor maps cleanly to how humans think about team collaboration.</p><p>But the abstraction that makes it easy to write is the same abstraction that makes it hard to instrument.</p><p>The role layer hides the execution flow. When something fails silently in production, and it will, you don’t have per-node state to inspect.</p><p>You have log output from a role that completed, and you have to work backward from there.</p><p>Auto Gen pioneered the conversational model: agents communicate through natural language exchanges. It was innovative. It was also the wrong abstraction for production reliability.</p><p>By mid-2026, Auto Gen is in maintenance mode. The community has shifted focus. The successor project, AG2, exists but hasn’t yet proven itself in production at scale.</p><p>The conversation-based pattern didn’t solve the real bottlenecks: state management, observability, and governance.</p><p>If you’re starting a new project in 2026, the choice has already narrowed to Lang Graph or CrewAI.</p><h3>State Management: The Architecture Gap That Matters Most</h3><p>State management is where the framework differences stop being academic preferences and start being production incidents.</p><p>Lang Graph’s standout feature is its built-in checkpointing system. Every state transition gets persisted automatically.</p><p>This gives you three capabilities that production systems can’t live without.</p><p>Time-travel debugging lets you replay any previous state to understand exactly what happened. When a customer reports that their order processing agent generated a wrong recommendation on Tuesday at 3:14 PM, you don’t guess.</p><p>You replay the exact state transition and watch the mistake happen again. Then you fix the logic and verify the fix against the same state.</p><p>Mid-execution failure recovery means restarting from the last checkpoint instead of from the beginning. If your research pipeline processes 200 sources and fails on source 187, you resume at source 186, not source 1.</p><p>On a long-running workflow with expensive LLM calls, this alone can save hundreds of dollars per failure.</p><p>Human-in-the-loop approvals let you pause the graph at any node, wait for human input, and resume without losing state.</p><p>This pattern is essential for compliance workflows, content approval pipelines, and any system where the AI proposes and a human disposes.</p><p><strong><em>CrewAI’s</em></strong> state model is simpler: task outputs pass sequentially between agents. There’s no built-in persistence. No checkpointing. No time travel.</p><p>For straightforward pipelines where tasks are short and failures are rare, this works fine. But when a failure happens mid-pipeline, you restart from the beginning.</p><p>When you need to debug intermediate state, you add custom logging. When you need checkpointing for long-running tasks, you build it yourself.</p><p><strong><em>AutoGen</em></strong> stores conversation history in memory by default. No built-in persistence. Failure recovery means replaying the entire conversation, which burns tokens and loses intermediate state. For production systems, this is the worst of both worlds: expensive recovery and incomplete state.</p><p>A side-by-side comparison makes the gap obvious:</p><pre>| Capability | LangGraph | CrewAI | AutoGen/AG2 |<br>| --- | --- | --- | --- |<br>| **Persistence** | Built-in checkpointing | Sequential task outputs only | In-memory by default |<br>| **Time-travel debugging** | Yes | No | No |<br>| **Failure recovery** | Resume at last checkpoint | Full restart required | Full conversation replay |<br>| **Human-in-the-loop** | Native support | Limited | Limited |<br>| **State inspection** | Full node-level visibility | Opaque role-level | Partial conversation-level |</pre><p>The gap is structural, not cosmetic. Graph-state failure isolation beats role-based retry on long tasks every time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8hMJ6Z1uGo01_Hpb_4VkTw.png" /></figure><h3>Failure Recovery: What Happens at 2 AM</h3><p>The difference between frameworks shows up clearest when something breaks in production.</p><p>With Lang Graph, when a node fails, the system captures the exact state at failure. The failed node retries independently. Other nodes keep their completed work. If retry fails, the system routes to a fallback node. The checkpointing system ensures nothing is lost.</p><p>This granularity matters for real workloads: code review bots that process hundreds of PRs, customer support triage systems handling concurrent tickets, research pipelines with fallback logic when sources are unavailable.</p><p>With CrewAI, when a role fails, the system retries that role’s task. But there’s a catch: there’s no state isolation between roles. A failure in the Researcher role can corrupt data that the Writer role was supposed to process. And in many cases, the entire pipeline restarts from scratch.</p><p>With Auto Gen, when a conversation fails, the system replays the entire conversation. This is token-inefficient, time-consuming, and prone to state loss. It’s not a production recovery strategy. It’s a debugging convenience that was never hardened for production use.</p><h3>Observability: Can You See What’s Broken?</h3><p>Production systems need monitoring. Lang Graph’s graph structure provides natural instrumentation points: each node is a span, each edge transition is a trace, each checkpoint is a snapshot. Open Telemetry integration is native.</p><p>Crew AI’s role abstraction is harder to instrument. Each role is a span, but the internal task flow within a role is opaque. When something fails silently, you don’t have the granularity to pinpoint where.</p><p>Auto Gen’s conversation-level instrumentation is even coarser. You see that a conversation happened, but tracking individual agent actions within the conversation requires custom work.</p><h3>Token Efficiency: What It Costs to Run</h3><p>Token efficiency directly impacts your infrastructure bill. The ranking is consistent across production data.</p><p>Lang Graph leads because of selective re computation: only failed nodes get recomputed, state gets pruned when unnecessary, and checkpointing only persists changed state.</p><p>CrewAI sits in the middle. Sequential pipelines are inherently efficient for successful runs, but the lack of checkpointing means failures are expensive.</p><p>Auto Gen carries the most overhead. Conversation replay for recovery burns tokens on every failure. Long conversations consume memory. The model was designed for flexibility, not efficiency.</p><h3>Decision Framework: When to Pick Each</h3><p>After running all three in production and watching two teams make their own framework choices, here’s what I’d tell any engineering team building in 2026.</p><p>Pick Lang Graph when you’re building something that needs to keep running. Production-grade reliability. Complex state management. Long-running workflows. Human-in-the-loop approvals. Observability that actually works. Token efficiency that matters at scale. The learning curve is steeper, but the production behavior is predictable.</p><p>Pick CrewAI when speed of prototyping is your primary constraint. The role-based model is intuitive. The learning curve is gentle. If you need a working multi-agent system by Friday and you’re not sure yet whether it needs to run in production for six months, CrewAI gets you there faster.</p><p>Skip Auto Gen for new projects. The framework is in maintenance mode. The conversation-based model didn’t solve the production-hardening problems that became the real bottleneck. If you’re already running AutoGen in production, plan your migration. If you’re starting fresh, the choice is already LangGraph or CrewAI.</p><h3>What I’d Do Differently</h3><p>The team that had to rewrite their system didn’t fail because they picked the wrong framework. They failed because they prototyped in CrewAI, declared it production-ready without testing failure recovery, and discovered at 2 AM that role-based retry doesn’t recover from silent failures in a 200-step pipeline.</p><p>The fix wasn’t switching frameworks mid-flight. It was recognizing earlier that the abstraction that made prototyping fast was the same abstraction that made failure recovery impossible.</p><p>If I were starting fresh today, I’d prototype in CrewAI to validate the agent roles and task flow, then rebuild in LangGraph for production. The two-framework approach costs more upfront in engineering time but saves orders of magnitude more in production incidents.</p><p>And I’d instrument before I’d optimize. The OpenTelemetry spans that LangGraph gives you for free are worth more than any performance tuning you’ll do without them.</p><h3>Conclusion</h3><p>The multi-agent framework field in 2026 has settled around a clear split: LangGraph for production, CrewAI for prototyping, AutoGen for the history books.</p><p>The architecture differences aren’t minor preferences. They’re structural decisions that determine whether your system recovers from failure or restarts from scratch, whether you can debug a customer issue or guess at it, and whether your token bill is predictable or surprises you every month.</p><p>Most multi-agent failures aren’t agent failures. They’re architecture failures. The framework you pick determines which class of failures you’ll experience. Pick based on your reliability requirements, not your prototyping speed.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1a2773382c48" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Most AI Agent Demos Are Lies. Here’s What Production Actually Looks Like.]]></title>
            <link>https://medium.com/@copybyroshan/most-ai-agent-demos-are-lies-heres-what-production-actually-looks-like-ba6da2fea4bd?source=rss-0976da8ae71d------2</link>
            <guid isPermaLink="false">https://medium.com/p/ba6da2fea4bd</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[marketing]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Roshan Sharma | Forward Deployed AI Engineer]]></dc:creator>
            <pubDate>Fri, 03 Jul 2026 18:00:42 GMT</pubDate>
            <atom:updated>2026-07-03T18:00:42.707Z</atom:updated>
            <content:encoded><![CDATA[<h4>A Forward Deployed Engineer’s Field Notes on Building Systems That Don’t Fail at 2 AM</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gEwTxiL78kPc0fO9mvAdkg.png" /></figure><p>I learned that demo agents are lies the hard way:</p><p>standing in a client’s server room at 1:47 AM on a Tuesday, watching a HubSpot API rate-limit counter climb while 847 partially-enriched CRM records sat in a corrupted staging table.</p><p>The demo I’d shown the client six hours earlier ran perfectly. The agent navigated their contact list, enriched every record from three data sources, and posted clean updates to their pipeline in under four minutes.</p><p>The client signed. We deployed. The production agent lasted thirty-seven minutes before it imploded.</p><p>Here is what I learned in that moment: every AI agent demo you see on social media is a single-path execution recorded on a clean environment with no network latency, no rate limits, and no LLM output drift.</p><p>They are not demonstrations of reliability. They are demonstrations of what the software looks like when everything goes right.</p><p>Production does not go right. Production is hostile. And I have the scars to prove it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OSzRzhhMDa_L-Cswh-75pA.png" /></figure><h3>The 2 AM Call That Changed How I Build</h3><p>Last year, I deployed a fleet of 22 AI agents across production workspaces for SaaS founders and growth agency teams.</p><p>I do not build mock environments or command-line proofs of concept.</p><p>I build live systems that scrape leads, qualify outreach, enrich databases, and publish content. These are systems that handle real contact data, real CRM pipelines, and real client revenue.</p><p>For the first three months, I built agents the same way everyone else does: a linear script with retry logic and crossed fingers.</p><p>It worked fine in staging. It ran beautifully on my local machine. I thought I had built something reliable.</p><p>Then the first production deployment broke in a way I had not anticipated.</p><p>The agent was running a lead enrichment pipeline that pulled company data from three APIs, cross-referenced it against a client database, and appended new fields to their HubSpot contacts.</p><p>In staging, it completed a batch of 200 records in under four minutes. Clean JSON. Zero errors.</p><p>Three hours into production, the agent sent 142 duplicate outreach emails to the same prospects. Here is what happened: a network blip at 11:14 PM caused the enrichment API call to time out.</p><p>The script’s retry loop, which I had naively configured to re-run on failure, did not retry from the enrichment step. It re-ran the entire pipeline from step one.</p><p>It re-fetched already-completed records from the source API, re-parsed the JSON, and then, because the deduplication logic had already flagged those records as processed, the script created new entries instead of skipping them.</p><p>The result was 142 duplicate contacts in the CRM, which triggered 142 duplicate emails.</p><p>The client lost three qualified leads that night. Three prospects who received the same personalized email four times in two hours.</p><p>One of them replied with a screenshot of their inbox and the message: “Is this automated spam?”</p><p>That was the moment I stopped treating agent development as a prompt engineering exercise and started treating it as a distributed systems problem.</p><p>I spent the next week rebuilding the entire architecture. Not the frontend. Not the prompts.</p><p>The execution model itself. I learned that if your agent cannot survive a network outage or a container restart, it is not a utility. It is an operational hazard.</p><p>Here are the three engineering layers I now use to build agents that survive production.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RExTckzVo_i3KK6pxUiL6g.png" /></figure><h3>1. State Checkpoints: The Durable Execution Layer</h3><p>Every AI agent pipeline follows a sequence: fetch, parse, enrich, rewrite, verify. In a naive execution cycle, if the network drops on step four, the entire execution context is destroyed.</p><p>The agent crashes, the current state is lost, and you are left with partially mutated databases and duplicate records.</p><p>I learned this the hard way. In my first production deployment, I was running ten n8n workflows with standard HTTP request nodes.</p><p>When HubSpot returned HTTP 429 for nine consecutive minutes, the workflow’s execution memory exceeded its allocation and the whole pipeline terminated. Eight thousand rows of partially enriched data. Zero recovery path.</p><p>I rebuilt using durable execution: the system saves state to disk at every node boundary. If step four fails, the agent resumes at step four, not step one.</p><p>Here is the exact pattern I use within n8n workflows to handle API rate limiting and state recovery:</p><pre>{<br>  &quot;name&quot;: &quot;Production HTTP Request Wrapper&quot;,<br>  &quot;nodes&quot;: [<br>    {<br>      &quot;parameters&quot;: {<br>        &quot;url&quot;: &quot;https://api.hubspot.com/crm/v3/objects/contacts&quot;,<br>        &quot;method&quot;: &quot;POST&quot;,<br>        &quot;authentication&quot;: &quot;oAuth2&quot;,<br>        &quot;sendBody&quot;: true,<br>        &quot;bodyParameters&quot;: {<br>          &quot;properties&quot;: {<br>            &quot;email&quot;: &quot;={{$node[\&quot;Extract Email\&quot;].json[\&quot;email\&quot;]}}&quot;,<br>            &quot;lifecycle_stage&quot;: &quot;marketingqualifiedlead&quot;<br>          }<br>        },<br>        &quot;options&quot;: {<br>          &quot;retryOnFail&quot;: true,<br>          &quot;maxTries&quot;: 5,<br>          &quot;waitBetweenTries&quot;: 60000<br>        }<br>      },<br>      &quot;id&quot;: &quot;hubspot-post-node&quot;,<br>      &quot;type&quot;: &quot;n8n-nodes-base.httpRequest&quot;,<br>      &quot;typeVersion&quot;: 4.1<br>    }<br>  ]<br>}</pre><p>If the API fails to respond after five attempts over five minutes, the workflow does not terminate.</p><p>The runtime catches the error, halts execution, saves the current context to a persistence table, and sends a notification to an active worker queue.</p><p>When the API stabilizes, the operator triggers a retry directly from the point of failure. No duplicate processing. No corrupted state. No 2 AM phone calls.</p><h3>2. Stateless MCP: The Interoperability Layer</h3><p>I have watched too many experimental agent setups rely on custom Python functions parsing text arguments into REST requests.</p><p>This breaks fast at scale. Add five new tools to an LLM’s system instructions and the context window fills with documentation blocks, degrading output quality and burning tokens.</p><p>The solution I am standardizing on is the Model Context Protocol with a stateless design.</p><p>Instead of maintaining continuous websocket connections, the agent communicates via lightweight HTTP POST requests with OAuth 2.0 token exchanges and JSON Schema definitions.</p><p>Here is the JSON Schema configuration for a tool server I built that fetches client records from PostgreSQL with database-level row permissions:</p><pre>{<br>  &quot;$schema&quot;: &quot;https://json-schema.org/draft/2020-12/schema&quot;,<br>  &quot;title&quot;: &quot;GetClientRecords&quot;,<br>  &quot;type&quot;: &quot;object&quot;,<br>  &quot;properties&quot;: {<br>    &quot;organization_id&quot;: {<br>      &quot;type&quot;: &quot;string&quot;,<br>      &quot;description&quot;: &quot;Unique identifier of the target organization&quot;<br>    },<br>    &quot;limit&quot;: {<br>      &quot;type&quot;: &quot;integer&quot;,<br>      &quot;default&quot;: 10,<br>      &quot;description&quot;: &quot;Maximum number of database rows to return&quot;<br>    }<br>  },<br>  &quot;required&quot;: [<br>    &quot;organization_id&quot;<br>  ]<br>}</pre><p>The stateless design lets load balancers distribute traffic across multiple replica containers. If the server hosting the database connection tool crashes, the balancer redirects the agent’s next HTTP request to a healthy node.</p><p>The client session state is preserved because all necessary context, including authentication tokens and permission identifiers, is sent inside each individual request header.</p><p>I also enforce corporate access boundaries this way. Using OAuth authorization in the stateless protocol ensures that an agent cannot exceed the access rights of the human operator who initiated the run.</p><p>If the user does not have permission to query high-value payment accounts, the database gateway rejects the agent’s request. Period.</p><h3>3. Human-in-the-Loop: The Approval Gate Layer</h3><p>Letting an autonomous agent write directly to production tables with zero supervision is the single biggest mistake I see teams make.</p><p>I made it myself. An LLM hallucination during a formatting pass overwrote 43 clean CRM tags with garbled strings. It took three days to restore the backups.</p><p>I now use a strict separation of concerns:</p><ul><li><strong>Read actions</strong> (scraping, enrichment, analysis) are fully automated.</li><li><strong>Write actions</strong> (database updates, outreach sends, content publishing) require explicit, verified human authorization.</li></ul><p>The pipeline works like this:</p><ol><li>The agent writes proposed payloads to a staging table with Status set to “Pending”.</li><li>A webhook sends a notification to the operator with a link to review the changes.</li><li>The operator reviews the formatted entry inside the database interface.</li><li>If approved, the operator changes the status field to “Approved”.</li><li>A secondary webhook detects the change, triggers a clean run script, and pushes the payload to the external CRM.</li></ol><p>Here is the Python verification script I use to gate every write operation:</p><pre>import os<br>import sys<br>import requests</pre><pre>def verify_and_deploy_payload(record_id):<br>    api_url = &quot;https://api.internal-db.local&quot;<br>    token = os.environ.get(&quot;STAGING_DB_TOKEN&quot;)</pre><pre>    headers = {<br>        &quot;Authorization&quot;: f&quot;Bearer {token}&quot;,<br>        &quot;Content-Type&quot;: &quot;application/json&quot;<br>    }</pre><pre>    # Fetch row content<br>    row_response = requests.get(<br>        f&quot;{api_url}/api/v1/staging-queue/{record_id}&quot;,<br>        headers=headers<br>    )</pre><pre>    if row_response.status_code != 200:<br>        print(f&quot;Error fetching row: {row_response.text}&quot;)<br>        return False</pre><pre>    data = row_response.json()<br>    status = data.get(&quot;Status&quot;)</pre><pre>    if status != &quot;Approved&quot;:<br>        print(f&quot;Record {record_id} status is &#39;{status}&#39;. Halting execution.&quot;)<br>        return False</pre><pre>    # Execute writeback to destination system<br>    target_payload = {<br>        &quot;client_name&quot;: data.get(&quot;Topic&quot;),<br>        &quot;body_md&quot;: data.get(&quot;Article&quot;)<br>    }</pre><pre>    print(f&quot;Pushed approved artifact to production systems: {target_payload[&#39;client_name&#39;]}&quot;)<br>    return True</pre><pre>if __name__ == &quot;__main__&quot;:<br>    if len(sys.argv) &lt; 2:<br>        print(&quot;Usage: python verify.py &lt;record_id&gt;&quot;)<br>        sys.exit(1)<br>    verify_and_deploy_payload(sys.argv[1])</pre><p>By decoupling generation from deployment, I changed my agents from risky automation scripts into highly efficient draft writers.</p><p>The client retains total control over their data. I can guarantee system safety during production upgrades.</p><h3>The Data: What Thirty Days in Production Actually Looked Like</h3><p>After that first disaster, I ran a thirty-day benchmark comparing my old naive script-based workflows against the new durable agent architecture.</p><p>Here are the results:</p><pre>| **Metric**                        |   **Naive Script Workflows (Demo)**  | **Durable Agent Workflows (Production)** |<br>| :-------------------------------- | :----------------------------------: | :--------------------------------------: |<br>| **Active System Run Count**       |           1,420 executions           |             2,150 executions             |<br>| **Network Outage Survivors**      | 12% (128 / 1,066 failures recovered) |      98.4% (2,115 / 2,150 completed)     |<br>| **Database Corruption Events**    |            18 occurrences            |               0 occurrences              |<br>| **Human Review Time per Item**    |      0 minutes (fully blind run)     |            1.2 minutes average           |<br>| **Duplicate Communications Sent** |               34 events              |                 0 events                 |<br>| **API Rate Limit Failures**       |           142 total crashes          |    0 crashes (all paused and resumed)    |</pre><p>The naive workflows failed constantly. When the enrichment service timed out for three minutes, the script dropped the entire execution stack, leaving candidate CRM entities half-filled.</p><p>My clients saw duplicate emails, missing data fields, and corrupted pipeline records.</p><p>The durable workflows simply paused execution, preserved the JSON payload on disk, and resumed once the integration service was available.</p><p>Zero data loss. Zero duplicates. Zero 2 AM phone calls.</p><h3>What I Learned Building Systems That Survive</h3><p>If you are an engineer tasked with deploying agents into enterprise workspaces, reject clean isolated demos. They are not real. Focus on build safety:</p><ul><li><strong>State Checkpoints:</strong> Save the agent’s work state at every step. If step three fails, the system must resume from step three, not step one. This single change eliminated 100% of my database corruption incidents.</li><li><strong>Stateless Integration:</strong> Prepare your custom APIs for the stateless protocol shift. Focus on clean JSON schemas and standard OAuth token validation. This lets you scale across replica containers and enforce access boundaries without custom middleware.</li><li><strong>Approval Gateways:</strong> Treat every write operation as a critical transaction. Never let an LLM write directly to client-facing systems without an intermediate review gate. The 1.2 minutes of human review time per item is a small price for zero production incidents.</li></ul><p>Building reliable agents is not about writing clever system instructions or crafting complex prompts. It is about applying established software engineering principles — state management, decoupling, rate limiting, and access control — to agent runtimes.</p><p>If you focus on system durability first, your automations will survive the messy reality of modern production networks.</p><p>I know. I learned it at 1:47 AM on a Tuesday, watching a rate-limit counter climb. You do not have to learn it the same way.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ba6da2fea4bd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Built a Multi-Agent Content System That Runs on Autopilot]]></title>
            <link>https://medium.com/@copybyroshan/how-i-built-a-multi-agent-content-system-that-runs-on-autopilot-957ec4b11050?source=rss-0976da8ae71d------2</link>
            <guid isPermaLink="false">https://medium.com/p/957ec4b11050</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[marketing]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Roshan Sharma | Forward Deployed AI Engineer]]></dc:creator>
            <pubDate>Tue, 30 Jun 2026 17:33:09 GMT</pubDate>
            <atom:updated>2026-06-30T17:33:09.925Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Four specialized skills. One orchestrator. Zero manual posting.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yeABc_XTt6pHZxVr_npoGA.png" /></figure><blockquote>Six weeks ago, I was still writing LinkedIn posts by hand.</blockquote><p>Typing into the blank box. Staring at the cursor. Clicking publish. Repeating the next day.</p><p>Some posts landed. Most didn’t. I spent 10–15 hours a week on content creation with nothing to show for it except inconsistent engagement and a growing sense that I was wasting time I didn’t have.</p><p>The problem wasn’t writing speed. It wasn’t idea generation. It was the process itself.</p><p>So I built an agent.</p><p>Not a chatbot. Not a prompt wrapper. A specialized system with four distinct skills, a scoring engine, a de-AI-ification layer, and a publishing pipeline that runs from research to analytics without manual intervention.</p><p>The same system now publishes seven posts a week across LinkedIn. Every post follows a 7-day calendar. Every topic scores above 80 on a 5-factor opportunity matrix. Every draft passes a 62-test AI detector before I see it.</p><p>Here’s exactly what I built.</p><h3>The Problem: The Manual Content Death Spiral</h3><p>Manual content creation looked like this for me:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mDS5AGc352NivXGoZr2HiA.png" /></figure><ol><li>Wake up. Try to think of a post idea. Draw a blank.</li><li>Scroll LinkedIn “for inspiration.” Waste 45 minutes.</li><li>Find a half-formed angle. Start writing.</li><li>Realize I have no data to back up the claim. Skip the data.</li><li>Post it anyway. Low engagement.</li><li>Repeat tomorrow with a different half-baked idea.</li></ol><p>This loop burned 10–15 hours a week and produced posts indistinguishable from everyone else’s. No research meant no authority.</p><p>No scoring meant weak topics got the same effort as strong ones. No consistency meant the algorithm never learned who I was.</p><p>LinkedIn rewards daily posters with 3–5x the reach of weekly posters. Same time, same format rhythm, same authority zones.</p><p>But no human operator can research, write, and publish technical content every day without burning out.</p><p>I needed a system that could research trending topics in my authority zones, pull hard data from my own case studies, draft in my voice, strip out AI-sounding language, and track what worked.</p><p>So I built one.</p><h3>Architecture: The 4-Skill System on Hermes</h3><p>I built the LinkedIn Agent on Hermes, an agent framework that lets me define specialized skills with deterministic workflows.</p><p>The system has four core skills, each with a single responsibility:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3LeZuYAkU2O2O9P1HYTmfw.png" /></figure><h3>Strategy — The North Star</h3><p>A 7-day calendar defining format, theme, and value/promo split for every day:</p><pre>| **Day**       | **Format**       |     **Length**    | **Theme**         | **Evidence Focus**                   |<br>| :------------ | :--------------- | :---------------: | :---------------- | :----------------------------------- |<br>| **Monday**    | Text Post        | 1,000–1,300 chars | Build in Public   | System deploys, logs, Docker setups  |<br>| **Tuesday**   | Visual Carousel  |    8–10 slides    | Teach Engineering | Flowcharts, n8n webhook nodes        |<br>| **Wednesday** | Text Post        | 1,000–1,300 chars | Build in Public   | Tracebacks, debugging, CLI fixes     |<br>| **Thursday**  | Text Post        | 1,000–1,300 chars | Teach Engineering | Audits, benchmarks, tool comparisons |<br>| **Friday**    | Text Post        |  800–1,000 chars  | Build in Public   | Reusable code, Python wrappers       |<br>| **Saturday**  | LinkedIn Article |  800–1,200 words  | Case Studies      | Architecture deep dives              |<br>| **Sunday**    | B2B Newsletter   |  500–1,000 words  | Opinions          | Strategy shifts, retrospectives      |<br><br>| **Publishing Rule**         | **Standard**                                                 |<br>| :-------------------------- | :----------------------------------------------------------- |<br>| **Value / Promotion Ratio** | **80%+ value, 20%- promotion**                               |<br>| **Execution Rule**          | This file is read before any post is written. No exceptions. |</pre><h3>Research — The Scoring Engine</h3><p>Every topic runs through a 5-factor opportunity score before a word gets written:</p><pre>| **Criteria**               | **Max Score** | **Evaluation Rules**                        |<br>| :------------------------- | :-----------: | :------------------------------------------ |<br>| Target Customer Present    |     **10**    | Post by agency/SaaS founders, CEOs, CMOs    |<br>| Large / Relevant Audience  |     **8**     | Creator has qualified B2B reach             |<br>| Discussion Quality         |     **9**     | Space allows technical dialog               |<br>| Fits Engineering Expertise |     **10**    | Topic is n8n, automation, AI, system design |<br>| Low Noise / Competition    |     **8**     | Thread not saturated with generic comments  |<br>| **Total Maximum Score**    |     **45**    | **Only comment if score ≥ 35**              |</pre><p>Research runs in two modes:</p><ul><li><strong>L1-L2 Feed Post</strong> (3–15 min, 0–5 sources): Build in public, quick insights</li><li><strong>L3-L4 Article</strong> (20–45 min, 6–20 sources): Frameworks, case studies, technical deep-dives</li></ul><p>Sources pass through a 4-tier validation framework. Freshness limits enforced: AI tool data expires at 90 days, API docs at 30 days.</p><h3>Writing — The Production Pipeline</h3><p>Compliance scoring gates every draft. Score &gt;= 85: approved. &lt; 65: trashed and restarted.</p><p>Every post follows a structural blueprint:</p><h4><strong>5-Beat Feed Post Arc:</strong></h4><ol><li>The Scroll-Stop Hook (pattern interrupt)</li><li>The Problem (why manual approaches fail)</li><li>The System (the architecture deployed)</li><li>The Result (hard metric or outcome)</li><li>The CTA (one low-friction ask)</li></ol><h4><strong>8-Beat Article Arc:</strong></h4><ol><li>Core Context (current state of the vertical)</li><li>The Why Now Anchor (timeliness catalyst)</li><li>The Documented Problem (friction-tested pain point)</li><li>The Architectural System (conceptual solution)</li><li>The Core Build Logs (step-by-step implementation)</li><li>The Performance Data (empirical matrix)</li><li>The Architectural Lesson (macro takeaway)</li><li>The Pipeline Invitation (strategic CTA)</li></ol><h3>De-AI-ification — The 62-Test Detector</h3><p>The final pass runs through avoid-ai-writing, a detector flagging 44 analytical categories of AI patterns.</p><p><strong>Tier 1 vocabulary</strong> (delve, landscape, tapestry, revolutionize, unlock, leverage) is replaced on sight.</p><p><strong>Tier 2 clusters</strong> (2+ words like harness, navigate, foster, elevate in same paragraph) trigger a rewrite.</p><p><strong>Tier 3 density</strong> (significant, innovative, effective at 3%+ of total words) gets flagged for specificity.</p><p>One test post dropped from 87% AI-probability markers to 12% after the de-AI pass. If a draft reads like ChatGPT, it doesn’t ship.</p><h3>Supporting Infrastructure</h3><pre>| **Tool**          | **Role**                                                             |<br>| :---------------- | :------------------------------------------------------------------- |<br>| **WeKnora (RAG)** | 90 indexed docs: case studies, brand guides, strategy files          |<br>| **agentmemory**   | Session handoffs, post history, analytics snapshots                  |<br>| **Baserow**       | Content pipeline: research → outline → markdown → post URL → metrics |<br>| **Composio**      | LinkedIn API for publishing                                          |<br>| **drawio-skill**  | Architecture diagrams for carousels and articles                     |</pre><h3>Build Logs: How Each Component Was Built</h3><p><strong>Days 1–2 — Voice definition.</strong> Wrote SOUL.md first: 299 lines defining exactly who the agent is. Hook patterns. CTA patterns. You can’t automate a voice you haven’t defined.</p><p><strong>Days 3–5 — Research pipeline.</strong> Four versions. v1: WeKnora search only. v2: added web search. v3: source tiering and freshness limits. v4: opportunity scoring and dual-mode budgets.</p><p><strong>Days 6–8 — Writing engine.</strong> Fed it examples of my best posts and worst posts. Built the compliance scoring matrix to catch problems before I saw the draft.</p><p><strong>Days 9–10 — De-AI layer.</strong> Early drafts came out with AI tells even with voice training. One test post dropped from 87% AI-probability markers to 12% after the de-AI pass.</p><p><strong>Days 11–12 — Pipeline integration.</strong> Connected Baserow, WeKnora, Composio. Every post now flows through: research → score → draft → de-AI → human review → publish → analytics.</p><h3>Data: What Automation Actually Delivers</h3><pre>| **Metric**                    | **Manual (Before)** |      **Agent (After)**     |<br>| :---------------------------- | :-----------------: | :------------------------: |<br>| **Time per Feed Post**        |      2–3 hours      |        10–15 minutes       |<br>| **Time per Article**          |      5–8 hours      |        45–60 minutes       |<br>| **Weekly Content Time**       |     10–15 hours     |          2–3 hours         |<br>| **Posts per Week**            |  3–4 (inconsistent) |        7 (every day)       |<br>| **Research Sources per Post** |         0–2         |       5–20 (enforced)      |<br>| **VA Cost Equivalent**        |    $400–600/week    | ~$5–10/week in API credits |</pre><p>The biggest shift isn’t the hours saved. It’s the consistency. The agent doesn’t have off days.</p><p>It doesn’t forget to research. It doesn’t skip the de-AI pass because it’s tired.</p><blockquote>For context: I grew a blog from 25K to 98K monthly visits using automation — not more content, not more writers, just better pipelines. 7.25M Pinterest impressions. $75/month to $1,047/month in ad revenue. Same engineering approach, different platform.</blockquote><h3>Lesson: Engineering Applied to Marketing</h3><p>The mistake most people make is treating AI content as a shortcut. Paste a prompt, get a post, done. That produces garbage.</p><p>The right approach is to treat content creation as an engineering problem:</p><ol><li><strong>Define the spec.</strong> Voice, format, quality bar, authority zones.</li><li><strong>Build the pipeline.</strong> Research → scoring → writing → QA → deploy.</li><li><strong>Add guardrails.</strong> Compliance scoring, de-AI-ification, human review gate.</li><li><strong>Measure and iterate.</strong> 7-day analytics review, 30-day retrospective.</li></ol><p>I didn’t build this to replace my voice. I built it to scale it.</p><p>Most marketers can’t automate. Most developers don’t market. I do both.</p><h3>Get the Architecture Blueprint</h3><p>I’m opening up the full system design. DM me “LinkedIn Agent” and I’ll send you the architecture diagram.</p><p>Or drop a comment: what’s the biggest bottleneck in your content process? I’ll tell you if automation can fix it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=957ec4b11050" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>