Skip to content

Ayadav2000/context-weaver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 

Repository files navigation

AgentSync: Decentralized Context Synchronization Engine for Multi-Agent AI Development Pipelines

Download License: MIT Platform Support CLI Version


Why AgentSync Exists: The Context Fragmentation Problem

Imagine a symphony orchestra where each musician reads from a different sheet of music. That's the current state of multi-agent AI development. You have Claude Code optimizing one file, Cursor refactoring another, and Windsurf analyzing dependencies β€” yet none of them share a unified understanding of your project's context.

AgentSync is the neural bridge between your AI coding agents. It transforms scattered, siloed context into a living, breathing knowledge graph that every agent can access, update, and benefit from. Think of it as a shared hippocampus for your development ecosystem.


🧠 Core Architecture: The Context Nervous System

graph TD
    A[AgentSync Hub] --> B[Context Buffer]
    A --> C[Priority Ranking Engine]
    A --> D[Conflict Resolution Layer]
    A --> E[Export Pipeline]
    
    B --> F[File Dependency Graph]
    B --> G[Symbol Index]
    B --> H[Conversation History Cache]
    
    C --> I[Recency Weighting]
    C --> J[Importance Scoring]
    C --> K[Cross-Reference Density]
    
    E --> L[Claude Pack Format]
    E --> M[Codex Prompt Template]
    E --> N[Markdown Context Dump]
    E --> O[MCP Glue Schema]
    
    P[Git Hook Triggers] --> A
    Q[Manual Agent Invocations] --> A
    R[Scheduled Sync] --> A
    
    A --> S[AgentSync Daemon]
    S --> T[WebSocket Broadcast]
    S --> U[HTTP API Endpoint]
    S --> V[CLI Interface]
Loading

πŸš€ Key Features That Redefine Agent Collaboration

1. Temporal Context Compression ⏳

AgentSync doesn't just track files β€” it understands the time-weighted relevance of every code change. A modification made 30 seconds ago carries more weight than one from last week. This prevents agents from acting on stale information.

2. Multi-Language Symbol Bridging 🌐

Your Python functions, TypeScript interfaces, and Rust macros all exist in the same mental space. AgentSync builds a universal symbol index that translates between language paradigms. A def calculate_risk() in Python becomes immediately discoverable when a Cursor agent searches for "risk calculation."

3. Conflict-Aware Context Merging βš”οΈ

When two agents modify overlapping context simultaneously, AgentSync doesn't panic. It employs a three-way merge algorithm specifically designed for semantic context (not just text). Conflicting interpretations are flagged with confidence scores and presented to the human operator for resolution.

4. Pluggable Export Architecture πŸ”Œ

Why lock yourself into one AI ecosystem? AgentSync exports context in multiple formats:

  • Claude Code Packs: Structured JSON with dependency trees
  • Codex Prompt Templates: Optimized for token efficiency
  • Cursor Workspace Hints: Inline annotations that guide refactoring
  • Windsurf Flow Recipes: Step-by-step context for CI/CD pipelines
  • MCP Glue Schemas: For MCP-compatible orchestration

5. Responsive Context Tailoring πŸ“±

The responsive UI adjusts context granularity based on available screen real estate and token budgets. On a mobile SSH session, you get a terse summary. On a full desktop IDE, AgentSync provides an interactive context map you can drill into.

6. Multilingual Natural Language Interface πŸ—£οΈ

Agents communicate in English, but AgentSync's multilingual support allows you to query context in Japanese, German, Spanish, or Mandarin. The engine normalizes semantics across languages, so "fetch the user authentication module" works identically to "ユーアーθͺθ¨Όγƒ’γ‚Έγƒ₯ールを取得."

7. 24/7 Context Health Monitoring πŸ”„

The 24/7 customer support isn't just for humans β€” it's for your agents too. AgentSync runs a daemon that continuously validates context freshness, detects orphaned references, and triggers re-synchronization when drift exceeds thresholds.


πŸ“‹ Example Profile Configuration

# agent_sync_profile.yaml
profile:
  name: "production-ai-team"
  version: "2026.3"
  
  agents:
    - name: "claude-code"
      type: "anthropic"
      token_budget: 8000
      preferred_format: "claude_pack"
      response_style: "concise"
      
    - name: "openai-cursor"
      type: "openai"
      token_budget: 16000
      preferred_format: "codex_prompt"
      response_style: "explanatory"
      
    - name: "windsurf-ci"
      type: "openai"
      token_budget: 6000
      preferred_format: "mcp_glue"
      response_style: "actionable"
  
  sync_rules:
    interval_seconds: 30
    on_git_commit: true
    on_file_save: true
    
  context_priority:
    - pattern: "src/**/*.py"
      weight: 10
    - pattern: "tests/**/*.py"
      weight: 8
    - pattern: "docs/**/*.md"
      weight: 3
    - pattern: "*.lock"
      weight: 0
      
  conflict_resolution:
    strategy: "human_approval_required"
    auto_resolve_threshold: 0.85

πŸ–₯️ Example Console Invocation

$ agent-sync start --profile production-ai-team --watch

[2026-07-15 14:23:01] AgentSync v2.4.0 initializing...
[2026-07-15 14:23:01] Loading profile: production-ai-team
[2026-07-15 14:23:02] Scanning workspace: ~/projects/quantum-engine
[2026-07-15 14:23:04] Indexing 1,247 files across 34 directories
[2026-07-15 14:23:05] Building symbol graph... 2,893 symbols found
[2026-07-15 14:23:06] Registering agents:
                  └─ claude-code (Anthropic | 8000 tokens)
                  └─ openai-cursor (OpenAI | 16000 tokens)
                  └─ windsurf-ci (OpenAI | 6000 tokens)
[2026-07-15 14:23:07] Exporting initial context packs...
                  └─ /tmp/agent-sync/claude_code_pack.json
                  └─ /tmp/agent-sync/codex_prompt.md
                  └─ /tmp/agent-sync/mcp_glue_schema.json
[2026-07-15 14:23:08] βœ… Context synchronized. Daemon running (PID: 4892).

$ agent-sync query "show me all database migration files modified in the last hour"

[Result] Found 3 migration files:
  - migrations/2026_07_15_add_indexes.py (modified 12 min ago)
  - migrations/2026_07_14_fix_constraints.py (modified 45 min ago)
  - migrations/2026_07_13_initial_schema.py (modified 2 hours ago)
[Confidence: 97%] Also detected 2 dependent entity definitions in models/

πŸ’» OS Compatibility Matrix

Operating System AgentSync Daemon CLI Tools Full Context Indexing Live Watch
🐧 Ubuntu 22.04+ βœ… Full Support βœ… Full Support βœ… Full Support βœ… Full Support
🍎 macOS 14+ (Intel) βœ… Full Support βœ… Full Support βœ… Full Support βœ… Full Support
🍎 macOS 14+ (Apple Silicon) βœ… Full Support βœ… Full Support βœ… Full Support βœ… Full Support
πŸͺŸ Windows 10/11 ⚠️ Beta (wsl2) βœ… Full Support ⚠️ Partial ⚠️ Partial
🐳 Docker (all hosts) βœ… Full Support βœ… Full Support βœ… Full Support βœ… Full Support

πŸ”Œ OpenAI API and Claude API Integration

AgentSync speaks directly to both APIs through a unified abstraction layer. Here's how the integration works:

OpenAI API (Codex, Cursor, Windsurf)

  • Context Formatting: AgentSync converts its internal context graph into Codex-optimized prompt prefixes, complete with token efficiency annotations.
  • Streaming Support: Real-time context updates flow through OpenAI's streaming endpoints, allowing agents to see changes as they happen.
  • Model-Specific Tuning: Automatically adjusts context complexity based on whether you're using GPT-4, GPT-4 Turbo, or GPT-3.5.

Claude API (Claude Code)

  • Claude Pack Protocol: AgentSync generates Claude-specific packs that Anthropic's models natively understand.
  • Multi-Turn Context Persistence: Maintains conversation state across Claude API calls, so follow-up questions don't lose context.
  • Tool Use Compatibility: Formats context as tool definitions when Claude operates in function-calling mode.

Unified Benefits

  • Single Authentication: Configure your API keys once β€” AgentSync handles routing to the correct service.
  • Fallback Strategy: If Claude API is rate-limited, AgentSync can automatically switch to OpenAI for non-critical queries.
  • Cost Optimization: The engine tracks token consumption per agent and can throttle low-priority synchronizations during peak usage.

🎯 SEO-Optimized Keywords Naturally Integrated

This tool is built for AI coding agent synchronization, multi-agent context management, and decentralized development pipelines. Whether you're working with Claude Code context packs, OpenAI Codex prompt optimization, Cursor AI workspace synchronization, Windsurf flow management, or MCP compliance, AgentSync provides the shared context layer that turns disjointed AI assistants into a cohesive development swarm. It supports real-time code context sharing, conflict-aware merge resolution, and responsive context tailoring for 2026's distributed AI development workflows.


⚠️ Disclaimer

AgentSync is a context synchronization tool designed to enhance AI agent collaboration. It does not:

  • Replace human code review
  • Automatically merge conflicting code changes without approval
  • Provide security guarantees for sensitive codebases (always use in conjunction with proper access controls)
  • Guarantee 100% accuracy in symbol resolution, especially across dynamically-typed languages

By using AgentSync, you acknowledge that context synchronization is a best-effort process. Always verify critical decisions made by AI agents against the original codebase. The authors of AgentSync are not responsible for unintended consequences arising from automated context sharing between AI agents.


πŸ“œ License

This project is licensed under the MIT License β€” see the LICENSE file for details.


πŸ† Why AgentSync Matters in 2026

The era of single-agent development is ending. We're entering a multi-agent ecosystem where five, ten, even fifty AI assistants collaborate on the same codebase. But without a shared context layer, they're just noise β€” each agent operating in its own bubble, making assumptions that contradict what another agent just established.

AgentSync is the connective tissue for this emerging paradigm. It's not about making one agent better β€” it's about making all agents better together. Like how neurons need synapses to form thought, AI agents need AgentSync to form intelligence.

Stop treating your AI agents as islands. Start treating them as a distributed intelligence network.


Download Build Status Documentation Discussions

AgentSync β€” Because context is the only thing your AI agents should share.

Releases

No releases published

Packages

 
 
 

Contributors

Languages