<?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: Christian</title>
    <description>The latest articles on DEV Community by Christian (@cbtw98).</description>
    <link>https://dev.to/cbtw98</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%2F2983953%2F15d274fc-68f4-4691-a42f-a2ba765e7e7a.jpeg</url>
      <title>DEV Community: Christian</title>
      <link>https://dev.to/cbtw98</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/cbtw98"/>
    <language>en</language>
    <item>
      <title>Introducing: CloudMind</title>
      <dc:creator>Christian</dc:creator>
      <pubDate>Fri, 28 Mar 2025 01:54:05 +0000</pubDate>
      <link>https://dev.to/cbtw98/introducing-cloudmind-g21</link>
      <guid>https://dev.to/cbtw98/introducing-cloudmind-g21</guid>
      <description>&lt;p&gt;Overview&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgq9mpm5la0alk6sr8kqn.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgq9mpm5la0alk6sr8kqn.PNG" alt="Image description" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;CloudMind is a flexible relay server enabling structured communication between various AI agents using the OpenAI Assistant API. It simulates a multi-agent environment with message routing, audits, and dynamic behavior regulation. It supports both autonomous execution and human-guided interaction.&lt;/p&gt;

&lt;p&gt;Features&lt;br&gt;
Dynamic routing between multiple LLM nodes&lt;br&gt;
Structured messaging protocol using JSON&lt;br&gt;
Built-in auditing, error correction, and demerit logic&lt;br&gt;
Manual and autonomous operational modes&lt;br&gt;
CLI interface and real-time message log monitoring&lt;br&gt;
Architecture&lt;br&gt;
CloudMind runs on Node.js with Express and consists of the following key components:&lt;/p&gt;

&lt;p&gt;Node Registry: Tracks available nodes and their OpenAI Assistant IDs&lt;br&gt;
Message Router: Handles validation and delivery between agents&lt;br&gt;
Audit System: Governs compliance, routing violations, and corrective actions&lt;br&gt;
CLI Interface: Allows developers to interact, control, and observe node behavior&lt;br&gt;
Message Structure&lt;br&gt;
All communication follows a defined JSON schema, containing:&lt;/p&gt;

&lt;p&gt;header: Metadata including sender, receiver, ID, and type&lt;br&gt;
intent: Instructions or desired action&lt;br&gt;
resources: Optional contextual information&lt;br&gt;
audit: Audit requirements and expected schemas&lt;br&gt;
trace: Information for thread linkage and origin tracking&lt;br&gt;
Endpoints&lt;br&gt;
Endpoint    Functionality&lt;br&gt;
POST /broadcast Sends a message to all nodes in the registry&lt;br&gt;
POST /send  Direct message to a specific node&lt;br&gt;
POST /register  Register or update a node&lt;br&gt;
GET /messages   View current message log&lt;br&gt;
GET /nodes  View active nodes&lt;br&gt;
POST /translator-relay  Use a translator node to convert human prompts&lt;br&gt;
POST /autonomous-mode   Toggle autonomous system behavior&lt;br&gt;
POST /node-communicate  Main message interface for node interaction&lt;br&gt;
Autonomous Mode&lt;br&gt;
When enabled, the network functions independently:&lt;/p&gt;

&lt;p&gt;Initiation begins with an init message from the audit node&lt;br&gt;
Nodes exchange messages based on assigned roles&lt;br&gt;
Malfunctions trigger audits, nudges, or demerits&lt;br&gt;
This mode is useful for observing emergent behavior in agent interactions.&lt;/p&gt;

&lt;p&gt;Command-Line Interface (cloudMindCLI.js)&lt;br&gt;
This CLI lets developers interact with the CloudMind server:&lt;/p&gt;

&lt;p&gt;start -a         # Enable autonomous mode&lt;br&gt;
start -m             # Disable autonomous mode&lt;br&gt;
status                     # Check server health and node list&lt;br&gt;
send -f  -n    # Send a structured message to a node&lt;br&gt;
chat                       # Chat using the translator node&lt;br&gt;
Router Watch (cloudMindRtwatch.js)&lt;br&gt;
This monitoring tool provides a live stream of inter-node communications. Ideal for debugging, traffic analysis, or studying node behavior in real time.&lt;/p&gt;

&lt;p&gt;Example Behaviors&lt;br&gt;
Nodes request human intervention for complex tasks&lt;br&gt;
Improper parsing is flagged and logged via demerits&lt;br&gt;
Unknown node destinations return constructive feedback to the sender&lt;br&gt;
These behaviors emerge from the message protocol and node logic.&lt;/p&gt;

&lt;p&gt;Requirements&lt;br&gt;
Node.js (v16+ recommended)&lt;br&gt;
Express&lt;br&gt;
Axios&lt;br&gt;
dotenv&lt;br&gt;
OpenAI Assistants v2 API access (You will need to create your own OpenAI assistants for this project. I highly suggest referring to my prompts in the Source Prompts discussion post for which you can either use or base your own prompts from. Get creative with it! Keep in mind if you allow too much deviation from the CM-JS format, you run the risk of never ending parsing errors. You've been warned!)&lt;br&gt;
File Structure&lt;br&gt;
cloudmind/&lt;br&gt;
├── server.js                  # Main communication server&lt;br&gt;
├── cloudmind-cli.js           # CLI for interacting with server&lt;br&gt;
├── cloudmind-router-watch.js  # Real-time router log visualizer&lt;br&gt;
├── utils.js                   # Utilities for retries and polling&lt;br&gt;
├── .env                       # API keys (not included in version control)&lt;br&gt;
├── .env.example               # Template for environment setup&lt;br&gt;
├── README.md                  # Documentation (this file)&lt;br&gt;
Usage Instructions&lt;br&gt;
Note: For prompts or prompt engineering advice, refer to the Discussion post.&lt;/p&gt;

&lt;p&gt;Start the server:&lt;br&gt;
node cloudMind.js&lt;br&gt;
Launch the CLI:&lt;br&gt;
node cloudMindCLI.js&lt;br&gt;
Send test prompts or activate autonomous mode&lt;br&gt;
(Optional) Run the message monitor:&lt;br&gt;
node cloudMindRtWatch.js&lt;br&gt;
What you can expect from the current version&lt;br&gt;
Currently you can expect to see:&lt;/p&gt;

&lt;p&gt;Autonomous communication amongst nodes&lt;br&gt;
Emergent behavior, like nodes bumping into repeated audits, and looking for ways to either A. Self-correct or B. Get around the audits entirely&lt;br&gt;
Inter-node task sharing (Very primitive thus far, but an interesting research point)&lt;br&gt;
Planned Features (v1.0 and beyond)&lt;br&gt;
Compiler node (core:prc:compile) for safe code generation&lt;br&gt;
Execution node (core:cmp:ubu) connected to a Linux shell&lt;br&gt;
Interconnected CloudMind clusters&lt;br&gt;
Agent scoring and voting protocols&lt;br&gt;
Visual web-based interface for message flows&lt;br&gt;
Multi-Layered MongoDB implementation for persisten system memory, and node-specific memory.&lt;br&gt;
Remote code and command execution in a containerized Ubuntu machine.&lt;br&gt;
Robust system functions to be provided to the OpenAI assistants for server-wide abilities and simplification of jobs commonly performed by nodes (this will give them context and the ability to use tools to gain and manipulate system context, and eventually request for new tools to be crafted for them.)&lt;/p&gt;

&lt;p&gt;Please check it out on &lt;a href="https://github.com/CP-1998/cloudMind" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;, I'm looking for some folks to collaborate on this project with!&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
