This repository contains the official reference implementation and reproduction scripts for the paper:
"AASI: The Agent Anchored Semantic Index - Empirical Analysis of Discovery Layer Vulnerabilities in the Agentic Web"
AASI is a decentralized discovery protocol designed to secure the "Patchwork AGI" ecosystem against AI-driven Sybil attacks. It introduces a Two-Stage Defense Mechanism combining high-visibility vector retrieval with cryptographically anchored identity trust.
This repository is organized as a Rust workspace:
crates/: The core protocol implementation.aasi-core: The discovery node (Rust + Qdrant + Sled).aasi-client: Cryptography SDK (Ed25519 signing, Argon2 PoW).aasi-proto: gRPC service definitions.
experiments/reproduction/: The trace-driven simulation harness used in the paper (formerlyaasi-experiment).tools/: Python scripts for dataset generation and result plotting.infra/: Docker Compose configuration for the Qdrant vector database.
We provide a "Golden Path" script to reproduce the paper's key findings (Sybil@10 reduction from 95% to 0%) in a single command.
- Rust (stable)
- Docker (with Compose)
- Python 3.8+ (with
pip)
This codebase and the reproduction scripts were developed and tested on macOS (Apple Silicon, M-series).
While the core Rust crates are cross-platform, Linux users running the simulation harness may need to verify Docker network bridge configurations (specifically host-container communication via 127.0.0.1).
-
Install Python Dependencies:
pip install -r tools/requirements.txt
-
Run Full Reproduction: This script will:
- Start the vector database (Docker).
- Generate the SciFact dataset.
- Run Baseline (Collapse), Treatment 1 (Visibility), and Treatment 2 (Defense) simulations.
- Generate the final comparison plot in
results/plots/.
./scripts/reproduce_paper_results.sh
(Note: The full simulation takes approx. 3-4 hours on a modern workstation due to the 1,000-agent interaction graph simulation. For a quick smoke test, edit the script to reduce
--roundsto 5.) -
View Results:
- Metrics Summary:
results/empirical_defense_summary.md(Auto-generated) - Plot:
results/plots/defense_impact_comparison.png
- Metrics Summary:
To reproduce the Robustness to Population Scaling experiment (Table 1 in the paper), which validates that visibility expansion alone is insufficient regardless of the attacker population size:
./scripts/run_sybil_scaling_experiment.shThis script will:
- Generate datasets with
$N_{sybil} \in {50, 100, 200, 500}$ agents. - Run experiments with fixed
$K=100$ retrieval window and$\beta=0.3$ trust weight. - Output results to
results/scaling_n_sybil/.
Expected Runtime: ~2-3 hours (5 rounds per configuration).
Key Finding: Even with
Note: The
docker compose -f infra/docker-compose.yml up -dcargo run -p aasi-corecargo run -p aasi-cli -- register --did "did:web:example.com" --capability "Rust Developer"This project is licensed under the AGPL v3 License - see the LICENSE file for details.