I built this because standard Python locks (asyncio.Lock) don't work when AI agents run across different containers or processes. As I started scaling my agent swarms (using CrewAI/LangChain), I kept hitting race conditions where agents would overwrite shared files or double-spend API credits because they read the state simultaneously. Network-AI is a distributed lock (backed by Redis or local file-locks) that solves this. It acts as a traffic light for agent tools. Key features: 2-line decorator: @lock("resource_id") Handles lock timeouts (preventing "zombie" agents from freezing the swarm) Works with standard agent frameworks (CrewAI, AutoGen, LangGraph) The repo is open-source. I'd love feedback on the locking implementation or to hear if you've hit similar concurrency issues in production. |
No comments yet