rotalabs-context
Context intelligence for AI agents — Ingest, search, and subscribe to shared context across your AI systems.
Part of the Rotalabs trust intelligence research ecosystem.
Installation
pip install rotalabs-context
With local embedding support:
pip install rotalabs-context[local]
With Rotascale platform integration:
pip install rotalabs-context[platform]
Quick Start
from rotalabs_context import ContextEngine
# Local mode (zero config, SQLite backend)
ctx = ContextEngine()
# Platform mode (connects to Rotascale)
ctx = ContextEngine(
api_key="rot_...",
base_url="https://api.rotascale.com",
)
# Ingest context
result = ctx.ingest(
records=[
{"content": "User reported login issue", "title": "Support ticket #1234"},
{"content": "Auth service latency spike at 2pm UTC", "title": "Incident report"},
],
source="helpdesk",
tags=["support", "auth"],
scope="team:support",
)
# Search
results = ctx.search("login issues", top_k=5, mode="semantic")
for hit in results:
print(f"{hit.score:.2f} — {hit.title}")
# Subscribe to context updates
ctx.on("context.created", filter={"tags": ["support"]}, callback=my_handler)
Features
- Ingest: Push data from any pipeline; we add the "C" (embeddings, entities, relationships)
- Search: Semantic + keyword + hybrid search across all ingested context
- Subscribe: Real-time context propagation via events
- ACLs: Scope-based access control (global, team, agent, project, user)
- Pluggable backends: SQLite (local), PostgreSQL (self-hosted), Rotascale Platform (managed)
Pipeline Adapters
# Airflow
from rotalabs_context.adapters import AirflowContextOperator
# In your DAG
ingest_task = AirflowContextOperator(
task_id="ingest_to_context",
source="airflow-etl",
tags=["daily-batch"],
)
License
Apache-2.0 — See LICENSE for details.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rotalabs_context-1.1.0.tar.gz
(385.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rotalabs_context-1.1.0.tar.gz.
File metadata
- Download URL: rotalabs_context-1.1.0.tar.gz
- Upload date:
- Size: 385.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f166956cfabbb6aa4527af68521fb5a133df393445779d36a2681051459f3ff
|
|
| MD5 |
c3687533a4b55e05b8d9761888ac0817
|
|
| BLAKE2b-256 |
f2038915a5fe38f4626b827051ce9ee0786d9750acba506051320ff5099ad3bd
|
File details
Details for the file rotalabs_context-1.1.0-py3-none-any.whl.
File metadata
- Download URL: rotalabs_context-1.1.0-py3-none-any.whl
- Upload date:
- Size: 16.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34dd7c1e3b294414127b70a916acfeb9b217327395db069594187f2e09a9797d
|
|
| MD5 |
ae1aca723594882e0416d8f5087bc220
|
|
| BLAKE2b-256 |
9d2881966524a427ee18ea22096dedeb4908febaff576644c0fe6ca7ec3341a9
|