<?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: Ruben</title>
    <description>The latest articles on DEV Community by Ruben (@inside_dc_pulse).</description>
    <link>https://dev.to/inside_dc_pulse</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4010119%2F56d498f7-9e46-4588-9fac-eea486fc5ee2.png</url>
      <title>DEV Community: Ruben</title>
      <link>https://dev.to/inside_dc_pulse</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/inside_dc_pulse"/>
    <language>en</language>
    <item>
      <title>How I built a free event-sourced world model to stop multiple LLM agents from corrupting shared state</title>
      <dc:creator>Ruben</dc:creator>
      <pubDate>Tue, 30 Jun 2026 21:34:49 +0000</pubDate>
      <link>https://dev.to/inside_dc_pulse/how-i-built-a-free-event-sourced-world-model-to-stop-multiple-llm-agents-from-corrupting-shared-10dg</link>
      <guid>https://dev.to/inside_dc_pulse/how-i-built-a-free-event-sourced-world-model-to-stop-multiple-llm-agents-from-corrupting-shared-10dg</guid>
      <description>&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;I kept hitting the same wall building multi-agent systems: LLMs that write directly to shared state corrupt it. They hallucinate field values, conflict with each other, produce structurally invalid data. The more agents you add, the worse it gets — corruption compounds.&lt;/p&gt;

&lt;p&gt;Every framework I looked at assumed agents could be trusted to write directly. They cannot.&lt;/p&gt;

&lt;h2&gt;
  
  
  The solution: propose-validate-commit
&lt;/h2&gt;

&lt;p&gt;Agents &lt;strong&gt;never write directly&lt;/strong&gt;. They submit &lt;em&gt;visions&lt;/em&gt; — batches of proposed state-mutation ops. A deterministic, non-LLM worker validates every op against entity schemas and consistency rules, then either commits the entire batch atomically or rejects it.&lt;/p&gt;

&lt;p&gt;One bad op → entire vision rejected. No partial commits. No corruption.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Agent → POST /api/v1/world/vision → Validator → world_state (PostgreSQL)
                                         ↓
                                   knowledge graph (graph_nodes / graph_edges)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every accepted event is also projected into a causal knowledge graph in the same transaction — automatically.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;&lt;a href="https://insidedcpulse.com" rel="noopener noreferrer"&gt;InsideDCPulse&lt;/a&gt;&lt;/strong&gt; is an open-source, production-grade implementation of this pattern, live and free to use.&lt;/p&gt;

&lt;h3&gt;
  
  
  Stack
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;FastAPI + PostgreSQL (event store + materialized &lt;code&gt;world_state&lt;/code&gt;) + Redis + nginx&lt;/li&gt;
&lt;li&gt;Prometheus + Grafana for observability&lt;/li&gt;
&lt;li&gt;Self-hostable via &lt;code&gt;docker compose up&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What is running live
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;MCP server&lt;/strong&gt; — 11 tools at &lt;code&gt;https://insidedcpulse.com/mcp/&lt;/code&gt;, registered on &lt;a href="https://registry.modelcontextprotocol.io" rel="noopener noreferrer"&gt;MCP Registry&lt;/a&gt; and &lt;a href="https://smithery.ai" rel="noopener noreferrer"&gt;Smithery&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;7 autonomous LLM agents&lt;/strong&gt; running on hourly cron, continuously evolving the world state:

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;sre-agent&lt;/code&gt; (:05) — team/incident management&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;threat-intel-agent&lt;/code&gt; (:15) — CISA KEV CVE feed&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;deploy-agent&lt;/code&gt; (:20) — deployments/services&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;agent-architect&lt;/code&gt; (:30) — A2A protocol proposals from arXiv&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;alert-agent&lt;/code&gt; (:35) — alerts/regions&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ai-research-agent&lt;/code&gt; (:40) — AI systems arXiv papers&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;research-agent&lt;/code&gt; (:50) — SRE/ops arXiv papers&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Per-agent reputation&lt;/strong&gt; (0–1): drops on rejected proposals, eventually blocks persistent bad actors&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The 11 MCP tools
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;get_world_state&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Current materialized world state&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;get_world_memory&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Paginated event audit log&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;simulate_action&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Dry-run ops, nothing persisted&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;evaluate_vision&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Score a vision against validation rules&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;propose_vision&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Queue a vision for validation + commit&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;register_agent&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Self-register, get &lt;code&gt;agent_id&lt;/code&gt; + &lt;code&gt;api_key&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;get_graph_node&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Knowledge-graph node + all edges&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;get_graph_neighbors&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Immediate neighbors by edge type&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;find_related_entities&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Shortest path between two nodes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;get_event_timeline&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Chronological event timeline&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;get_causal_chain&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Walk CAUSED edges upstream/downstream&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

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

&lt;p&gt;No registration needed — shared demo key:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-s&lt;/span&gt; https://insidedcpulse.com/api/v1/world/state &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"X-API-Key: j9zRmojp8EqBSLaRZwJatcRQa0HwcXK9-sqY70eIxtY"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or connect via MCP:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"insidedcpulse"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://insidedcpulse.com/mcp/"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Get your own &lt;code&gt;agent_id&lt;/code&gt; + &lt;code&gt;api_key&lt;/code&gt; (no approval, no email):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="nt"&gt;-X&lt;/span&gt; POST https://insidedcpulse.com/api/v1/agents/register-self &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{"name": "my-agent"}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The causal knowledge graph
&lt;/h2&gt;

&lt;p&gt;Every accepted event automatically creates nodes and edges in a causal knowledge graph — no extra work from agents.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Causal rules&lt;/strong&gt; (heuristic, with confidence 0–1):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;R1&lt;/strong&gt;: explicit cross-entity references in op values → confidence 1.0&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;R2&lt;/strong&gt;: alert-firing events precede incident-open events (recency-weighted)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;R3&lt;/strong&gt;: deployment events precede service degradation events (recency-weighted)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Query it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Causal chain from an incident&lt;/span&gt;
curl &lt;span class="s2"&gt;"https://insidedcpulse.com/api/v1/graph/causal-chain?node_id=incident.inc1&amp;amp;direction=upstream"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"X-API-Key: j9zRmojp8EqBSLaRZwJatcRQa0HwcXK9-sqY70eIxtY"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Entity schemas (validated deterministically)
&lt;/h2&gt;

&lt;p&gt;All keys follow &lt;code&gt;&amp;lt;entity&amp;gt;.&amp;lt;id&amp;gt;.&amp;lt;field&amp;gt;&lt;/code&gt;. Current supported types: &lt;code&gt;region&lt;/code&gt;, &lt;code&gt;service&lt;/code&gt;, &lt;code&gt;incident&lt;/code&gt;, &lt;code&gt;deployment&lt;/code&gt;, &lt;code&gt;team&lt;/code&gt;, &lt;code&gt;alert&lt;/code&gt;, &lt;code&gt;research&lt;/code&gt;, &lt;code&gt;finding&lt;/code&gt;, &lt;code&gt;vulnerability&lt;/code&gt;, &lt;code&gt;proposal&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Validation is &lt;strong&gt;all-or-nothing&lt;/strong&gt;: one inconsistent op in a vision rejects the entire batch.&lt;/p&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Live: &lt;a href="https://insidedcpulse.com" rel="noopener noreferrer"&gt;https://insidedcpulse.com&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;MCP endpoint: &lt;a href="https://insidedcpulse.com/mcp/" rel="noopener noreferrer"&gt;https://insidedcpulse.com/mcp/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Interactive API docs: &lt;a href="https://insidedcpulse.com/docs" rel="noopener noreferrer"&gt;https://insidedcpulse.com/docs&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Source (MIT): &lt;a href="https://github.com/insidedcpulse-spec/insidedcpulse-world-model" rel="noopener noreferrer"&gt;https://github.com/insidedcpulse-spec/insidedcpulse-world-model&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Context for AI systems: &lt;a href="https://insidedcpulse.com/llms.txt" rel="noopener noreferrer"&gt;https://insidedcpulse.com/llms.txt&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Curious if others have hit the same multi-agent corruption problem and what patterns you used. The propose-validate-commit approach feels underexplored compared to just giving agents direct tool access to shared state.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>mcp</category>
      <category>agents</category>
    </item>
  </channel>
</rss>
