Skip to main content

AgentGlue banner

AgentGlue

Middleware coordination for multi-agent systems.

GitHub release npm License

HilightsKey featuresHow it worksInstallQuick example

AgentGlue is a middleware layer that sits between your orchestrator and your tools, helping multi-agent systems coordinate overlapping work instead of repeating the same reads, searches, API calls, and state lookups over and over again.

📈 Hilights

Measured on the current 100-test benchmark suite and overlap-heavy multi-agent workloads:

  • 3.7× overall speedup across benchmarked scenarios
  • 73% total time saved (866.4ms → 234.9ms)
  • 76% cache hit rate across repeated shared work
  • 6.8× speedup on overlapping search-heavy scenarios
  • 5.0× speedup in the 10-agent heavy-overlap case
  • ~0.6ms median cache-check latency

More agents + more overlap = bigger wins.

✨ Key features

  • Exact-match dedup on tool name + args/kwargs hash
  • Single-flight / in-flight coalescing for concurrent identical calls
  • TTL result cache for repeated sequential calls
  • SQLite-backed cross-process cache for shared coordination across processes
  • Metrics and event recording for runtime inspection
  • Keep shared work coordinated across agents, tools, and processes
  • Stay framework-agnostic across OpenClaw, AutoGen, CrewAI, LangGraph, and custom systems

🧭 How it works

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃  🤖 Agent A    🤖 Agent B    🎯 Orchestrator       ┃  ← Intelligence Layer
┃                                                   ┃    Autonomous reasoning
┃  "Decide what to do"                              ┃    & task decomposition
┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
┃                 ⚙️  AgentGlue                     ┃  ← Coordination Layer
┃         (Coordination Middleware)                 ┃    The "glue" that binds
┃                                                   ┃    agents to resources
┃  ┌──────────┬──────────┬──────────┬──────────┐    ┃
┃  │ Dedup &  │  Rate    │ Task     │   Shared │    ┃    · Dedup & coalescing
┃  │coalescing│  Mgr     │ Locking  │   Cache  │    ┃    · Rate coordination
┃  └──────────┴──────────┴──────────┴──────────┘    ┃    · Task Locking
┃                                                   ┃    · Shared Cache
┃  "Know how to coordinate"                         ┃
┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
┃  🔧 Tools    📡 APIs    📁 Files    💾 Memory      ┃  ← Resource Layer
┃                                                   ┃    External capabilities
┃  "Do the actual work"                             ┃    & persistent storage
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

AgentGlue sits in the middle: agents keep their existing orchestration logic, tools keep their existing interfaces, and AgentGlue coordinates repeated work across both.

🛠 Install

1) Install the OpenClaw plugin

openclaw plugins install openclaw-agentglue

After install, restart the gateway:

systemctl --user restart openclaw-gateway

If you want to remove the plugins.allow security warning, add this to ~/.openclaw/openclaw.json:

{
  "plugins": {
    "allow": ["openclaw-agentglue"]
  }
}

Plugin docs: openclaw-agentglue/README.md

2) Install the Python package

From PyPI:

pip install agentglue

Or from source:

python3 -m venv .venv
source .venv/bin/activate
pip install -U pip
pip install -e .

⚡ Quick example

from agentglue import AgentGlue

glue = AgentGlue(shared_memory=False, rate_limiter=False, task_lock=False)

@glue.tool(ttl=60)
def search_code(query: str) -> str:
    return f"results for {query}"

print(search_code("sqlite sidecar", agent_id="agent-a"))
print(search_code("sqlite sidecar", agent_id="agent-b"))
print(glue.report())

🔌 Links

⚖️ Disclaimer

This project is a personal open-source project developed in authors' personal capacity. It is not affiliated with, endorsed by, or representing any employer or organization the authors are associated with. All work on this project is performed on personal time and with personal resources.

📄 License

MIT

Release files for agentglue 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agentglue 0.4.0
File Size Uploaded
agentglue-0.4.0.tar.gz 34.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for agentglue 0.4.0
File Interpreter ABI Platform
agentglue-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 53.9 kB

Release files / agentglue-0.4.0.tar.gz

Download URL agentglue-0.4.0.tar.gz
Size 34.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5b8d34c2002f74148a90b8556d8aff0aaf0e7acc9bc452462ac038761af450af
BLAKE2b-256 checksum
How to use checksums
9e7d20ebb5bf97c5025420c59b34f12cbcd3dc1b67a88f4689d2999783d529b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / agentglue-0.4.0-py3-none-any.whl

Download URL agentglue-0.4.0-py3-none-any.whl
Size 19.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fc8d0d14294ec57b356853a174f36b3985aece3fb7feaced0e5aed7ceffb92b6
BLAKE2b-256 checksum
How to use checksums
ef2cb7b84996c0cd953a14dea626bf6be15068cf5a9fbe81c61f968f89fb6f65
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page