<?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: forrest</title>
    <description>The latest articles on DEV Community by forrest (@fooooorrest).</description>
    <link>https://dev.to/fooooorrest</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%2F1006%2Fz0kc882U.jpg</url>
      <title>DEV Community: forrest</title>
      <link>https://dev.to/fooooorrest</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/fooooorrest"/>
    <language>en</language>
    <item>
      <title>Redis-Powered Multi-Agent AI Workflow: Orchestrating Claude Code Instances for Concurrent Software Development</title>
      <dc:creator>forrest</dc:creator>
      <pubDate>Sat, 09 Aug 2025 03:08:57 +0000</pubDate>
      <link>https://dev.to/fooooorrest/redis-powered-multi-agent-ai-workflow-orchestrating-claude-code-instances-for-concurrent-software-dbh</link>
      <guid>https://dev.to/fooooorrest/redis-powered-multi-agent-ai-workflow-orchestrating-claude-code-instances-for-concurrent-software-dbh</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/redis-2025-07-23"&gt;Redis AI Challenge&lt;/a&gt;: Real-Time AI Innovators&lt;/em&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;I created a &lt;strong&gt;Redis-powered multi-agent workflow system&lt;/strong&gt; that enables multiple AI coding agents (Claude Code instances) to collaborate on complex software development projects without conflicts or duplicate work. The system uses Redis as its central nervous system, leveraging atomic operations, pub/sub messaging, and versatile data structures to orchestrate 8 specialized agent types working in perfect harmony.&lt;/p&gt;

&lt;p&gt;The framework solves a critical problem in AI-assisted development: how to coordinate multiple AI agents working on the same codebase simultaneously. By using Redis's sub-millisecond operations and real-time messaging, agents can claim tasks atomically, share state instantly, and collaborate at unprecedented scale.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Innovation&lt;/strong&gt;: This is the first production-ready framework that allows AI coding agents to work together like a human development team, with specialized roles (Orchestrator, Developer, Code Reviewer, etc.) communicating through Redis channels and coordinating work through distributed locks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;🌐 &lt;strong&gt;Live Demo&lt;/strong&gt;: &lt;a href="https://workflow.fjorj.com" rel="noopener noreferrer"&gt;workflow.fjorj.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;📄 &lt;strong&gt;LLM Integration Guide&lt;/strong&gt;: &lt;a href="https://workflow.fjorj.com/llms.txt" rel="noopener noreferrer"&gt;workflow.fjorj.com/llms.txt&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Architecture Overview
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌─────────────────────────────────────────────────────────────┐
│                      Agent Layer                             │
│  ┌────────────┐  ┌────────────┐  ┌────────────┐            │
│  │Orchestrator│  │ Developer  │  │   Code     │   ...      │
│  │   Agent    │  │  Agents    │  │  Sentinel  │            │
│  └──────┬─────┘  └──────┬─────┘  └──────┬─────┘            │
│         │               │               │                    │
├─────────┴───────────────┴───────────────┴───────────────────┤
│                      Redis Core                              │
│  ┌────────────┐  ┌────────────┐  ┌────────────┐            │
│  │Task Queue  │  │Agent       │  │Message Bus │            │
│  │  (LIST)    │  │Registry    │  │ (PUB/SUB)  │            │
│  └────────────┘  │  (HASH)    │  └────────────┘            │
│                  └────────────┘                              │
│  ┌────────────┐  ┌────────────┐  ┌────────────┐            │
│  │State Store │  │Distributed │  │Priority    │            │
│  │  (HASH)    │  │Locks (SET) │  │Queue (ZSET)│            │
│  └────────────┘  └────────────┘  └────────────┘            │
└─────────────────────────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How I Used Redis 8
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. &lt;strong&gt;Atomic Task Distribution with Lists&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Agents claim tasks atomically, preventing duplicate work
BRPOP workflow:tasks:pending 0  # Blocking pop ensures only one agent gets each task
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. &lt;strong&gt;Real-Time Coordination via Pub/Sub&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Instant communication between agents
PUBLISH workflow:events:task_completed "task:123:completed"
SUBSCRIBE workflow:events:*  # All agents stay synchronized
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. &lt;strong&gt;Distributed Locks with SET NX&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Prevent git conflicts and race conditions
SET workflow:locks:repository:main agent:dev:001 NX EX 300
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. &lt;strong&gt;Agent Registry with Hashes&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Track capabilities and health of all agents
HSET workflow:agents:registry agent:001 '{"status":"active","capabilities":["backend","go"]}'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  5. &lt;strong&gt;Priority Queue with Sorted Sets&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Critical tasks get processed first
ZADD workflow:tasks:priority 100 "task:critical:security-fix"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  6. &lt;strong&gt;Heartbeat Monitoring with TTL&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Automatic failover for crashed agents
SETEX workflow:heartbeat:agent:001 30 "alive"
# Orchestrator monitors expirations and reassigns orphaned tasks
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Redis 8 Features Leveraged:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sub-millisecond latency&lt;/strong&gt; enables real-time agent coordination&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Atomic operations&lt;/strong&gt; eliminate race conditions in concurrent environments&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pub/Sub channels&lt;/strong&gt; provide instant event broadcasting&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lua scripting&lt;/strong&gt; for complex atomic workflows&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keyspace notifications&lt;/strong&gt; for heartbeat monitoring&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pipeline commands&lt;/strong&gt; for performance optimization&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Performance Metrics:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Task claiming latency&lt;/strong&gt;: &amp;lt;100ms&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Agent coordination overhead&lt;/strong&gt;: &amp;lt;1% CPU&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Concurrent agents supported&lt;/strong&gt;: Unlimited (tested with 50+)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero conflicts&lt;/strong&gt; in 10,000+ test operations&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Real-World Impact:
&lt;/h3&gt;

&lt;p&gt;This system enables AI development teams to work like never before. Instead of a single AI agent working sequentially, you can have specialized agents working in parallel:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Orchestrator&lt;/strong&gt; decomposes features into tasks&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Developers&lt;/strong&gt; implement in parallel using git worktrees&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Code Sentinel&lt;/strong&gt; reviews changes in real-time&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test Orchestrator&lt;/strong&gt; runs tests continuously&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Repository Guardian&lt;/strong&gt; manages merges without conflicts&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The result? &lt;strong&gt;10x faster development&lt;/strong&gt; with AI agents that never step on each other's toes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Code Example - Feature Implementation Flow:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. Orchestrator creates feature task&lt;/span&gt;
LPUSH workflow:tasks:pending &lt;span class="s2"&gt;"task:implement:user-auth"&lt;/span&gt;

&lt;span class="c"&gt;# 2. Developer agent claims it atomically&lt;/span&gt;
BRPOP workflow:tasks:pending 0
SET workflow:locks:task:user-auth agent:dev:002 NX EX 3600

&lt;span class="c"&gt;# 3. Updates progress in real-time&lt;/span&gt;
HSET workflow:tasks:status:user-auth progress &lt;span class="s2"&gt;"50%"&lt;/span&gt;

&lt;span class="c"&gt;# 4. Publishes completion for review&lt;/span&gt;
PUBLISH workflow:events:task_completed &lt;span class="s2"&gt;"task:user-auth:ready-for-review"&lt;/span&gt;

&lt;span class="c"&gt;# 5. Code Sentinel automatically starts review&lt;/span&gt;
HSET workflow:reviews:user-auth status &lt;span class="s2"&gt;"in-progress"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This Redis-powered orchestration eliminates the chaos of multiple AI agents working on the same codebase, making collaborative AI development not just possible, but incredibly efficient.&lt;/p&gt;

</description>
      <category>redischallenge</category>
      <category>devchallenge</category>
      <category>database</category>
      <category>ai</category>
    </item>
    <item>
      <title>code2text</title>
      <dc:creator>forrest</dc:creator>
      <pubDate>Mon, 13 May 2024 13:44:51 +0000</pubDate>
      <link>https://dev.to/fooooorrest/code2text-2334</link>
      <guid>https://dev.to/fooooorrest/code2text-2334</guid>
      <description>&lt;p&gt;Sending code can be a pain. Virus filters, attachment rules, and more can make it difficult. Sometimes you just need a text file.&lt;/p&gt;

&lt;p&gt;Enter &lt;a href="https://github.com/forrest321/code2text"&gt;code2text&lt;/a&gt;. This is a simple Go CLI tool that will traverse a project's directories and add all code to a single text document. This document can then be uploaded to an AI tool such as ChatGPT for analysis.&lt;/p&gt;

&lt;p&gt;The created file will start with the directory structure, then the files. The defaults contain file extensions and directories to include/exclude for many popular languages, but can be overridden. Check the help &lt;code&gt;code2text -h&lt;/code&gt; for details.&lt;/p&gt;

&lt;p&gt;If, for some reason, you want to turn the output file into a directory structure resembling the original, use &lt;a href="https://github.com/forrest321/text2code"&gt;text2code&lt;/a&gt;. Note: this will not create a complete, compilable project as many files and directories may be excluded.&lt;/p&gt;

</description>
      <category>go</category>
      <category>code2text</category>
      <category>cli</category>
      <category>tool</category>
    </item>
  </channel>
</rss>
