Excited to announce the first release of my open-source project: Contex!
Contex is a semantic context routing engine for AI agents. Sounds complicated? Don't worry, it is.
When you have multiple, specialized AI agents (code reviewer, documentation writer, API assistant, etc), each needs different slices of your project's context. The naive approach is to dump the entire project into every agent's prompt, but that isn't scalable or efficient. The other option is to manually curate what each agent gets, but that comes with a lot of overhead.
Contex uses semantic matching to automatically route relevant context. Agents describe what they need in natural language (i.e. "API configuration and endpoints"), and Contex finds and delivers matching data using sentence transformers + hybrid search.
Key features:
- Schema-free: Publish TOON, CSV, JSON, YAML, TOML, Markdown, or plain text
- Real-time: Redis pub/sub or webhooks for instant updates
- Event sourcing: Complete audit trail for debugging and compliance
- Multi-project: Isolated namespaces with RBAC
- Python SDK: pip install contex-python
The interesting bits:
1. Agents only get context they actually need (semantic similarity scoring)
2. When you publish new data, agents automatically get notified if it's relevant
3. Event sourcing lets you time-travel debug (i.e. "what did this agent know at 3pm?")
It's MIT licensed and runs in Docker. I use it internally for Cahoots (my multi-agent task decomposition platform) and it's been solid.
Would love feedback on:
- Is this a real problem for others building agent systems?
- What other context routing patterns have you tried?
- Are there use cases I'm missing?
GitHub: https://lnkd.in/gk5wRWiJ
PyPI: https://lnkd.in/gSTNcwCq
Happy to answer questions!