2002bish/agent-security-research

Python

0

8 commits

updated Oct 2, 2026

See the code

See what people are saying

SourceMessageScoreDate

I built an open-source self-healing security pipeline for LangGraph + Ollama to stop agent injection attacks and state desync (r/SideProject)

Hey everyone, I've been experimenting heavily with multi-agent workflows using LangGraph and Llama 3.1 (via Ollama)locally. While building, I ran into two massive architectural issues that standard prompts couldn't fix: 1. Parser Differentials: Agents sometimes format markdown or inject unwanted…

1

Oct 2, 2026

README

Mitigating Parser Differentials and State Desynchronization in Autonomous Multi-Agent Workflows

As autonomous multi-agent systems scale from simple sequential chains to dynamic multi-agent graphs (using frameworks like LangGraph), they encounter critical architectural vulnerabilities and failure vectors:

  1. Representation Gaps & Parser Differentials:Upstream agents generate semi-structured text, markdown blocks, or malicious/unauthorized payloads (e.g., unexpected arguments or instruction injections) that downstream parsers misinterpret, leading to silent failures or security bypasses.
  2. Temporal Gaps & State Desynchronization: Asynchronous workers operate at varying speeds, causing stale memory caches, race conditions, and cascading consensus errors.

This repository provides a production-grade, self-healing orchestration template built with LangGraph and Ollama (Llama 3.1). It implements a Canonical Schema Guardrail and Optimistic Concurrency Control (OCC) with Auto-Re-Sync to ensure structural integrity and state consistency across multi-agent executions.

Repository Structure

pipeline.py: The core self-healing multi-agent workflow featuring loop-back error correction, canonical schema validation, and state version locking. experiment.py: An automated benchmark suite testing standard requests, adversarial key injections, and temporal desynchronization. state.py: Shared state type definitions and data contracts.

Getting Started

Prerequisites

Python 3.10+ Ollama installed and running locally with the llama3.1 model.

Installation

  1. Clone the repository and navigate to the folder: bash cd agent-security-research Install the required dependencies: Bash pip install langgraph langchain-ollama langchain-core Ensure your local Ollama background server is active:Bashollama serve UsageRun the Self-Healing PipelineTo execute the primary multi-agent workflow with automated parser error correction and state re-syncing:Bashpython pipeline.py Run the Security Benchmark SuiteTo run empirical evaluations testing the pipeline against normal inputs, adversarial schema injections, and temporal lag:Bashpython experiment.py

2002bish/agent-security-research

Python

0

8 commits

updated Oct 2, 2026

See the code

See what people are saying

SourceMessageScoreDate

I built an open-source self-healing security pipeline for LangGraph + Ollama to stop agent injection attacks and state desync (r/SideProject)

Hey everyone, I've been experimenting heavily with multi-agent workflows using LangGraph and Llama 3.1 (via Ollama)locally. While building, I ran into two massive architectural issues that standard prompts couldn't fix: 1. Parser Differentials: Agents sometimes format markdown or inject unwanted…

1

Oct 2, 2026

README

Mitigating Parser Differentials and State Desynchronization in Autonomous Multi-Agent Workflows

As autonomous multi-agent systems scale from simple sequential chains to dynamic multi-agent graphs (using frameworks like LangGraph), they encounter critical architectural vulnerabilities and failure vectors:

  1. Representation Gaps & Parser Differentials:Upstream agents generate semi-structured text, markdown blocks, or malicious/unauthorized payloads (e.g., unexpected arguments or instruction injections) that downstream parsers misinterpret, leading to silent failures or security bypasses.
  2. Temporal Gaps & State Desynchronization: Asynchronous workers operate at varying speeds, causing stale memory caches, race conditions, and cascading consensus errors.

This repository provides a production-grade, self-healing orchestration template built with LangGraph and Ollama (Llama 3.1). It implements a Canonical Schema Guardrail and Optimistic Concurrency Control (OCC) with Auto-Re-Sync to ensure structural integrity and state consistency across multi-agent executions.

Repository Structure

pipeline.py: The core self-healing multi-agent workflow featuring loop-back error correction, canonical schema validation, and state version locking. experiment.py: An automated benchmark suite testing standard requests, adversarial key injections, and temporal desynchronization. state.py: Shared state type definitions and data contracts.

Getting Started

Prerequisites

Python 3.10+ Ollama installed and running locally with the llama3.1 model.

Installation

  1. Clone the repository and navigate to the folder: bash cd agent-security-research Install the required dependencies: Bash pip install langgraph langchain-ollama langchain-core Ensure your local Ollama background server is active:Bashollama serve UsageRun the Self-Healing PipelineTo execute the primary multi-agent workflow with automated parser error correction and state re-syncing:Bashpython pipeline.py Run the Security Benchmark SuiteTo run empirical evaluations testing the pipeline against normal inputs, adversarial schema injections, and temporal lag:Bashpython experiment.py

Languages

Python

100.0%