Skip to main content

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.

Metadata

Release files for rotalabs-context 1.1.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 rotalabs-context 1.1.0
File Size Uploaded
rotalabs_context-1.1.0.tar.gz 385.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rotalabs-context 1.1.0
File Interpreter ABI Platform
rotalabs_context-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 402.4 kB

Release files / rotalabs_context-1.1.0.tar.gz

Download URL rotalabs_context-1.1.0.tar.gz
Size 385.9 kB
Tags Source
SHA-256 checksum
How to use checksums
9f166956cfabbb6aa4527af68521fb5a133df393445779d36a2681051459f3ff
BLAKE2b-256 checksum
How to use checksums
f2038915a5fe38f4626b827051ce9ee0786d9750acba506051320ff5099ad3bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.6

Release files / rotalabs_context-1.1.0-py3-none-any.whl

Download URL rotalabs_context-1.1.0-py3-none-any.whl
Size 16.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
34dd7c1e3b294414127b70a916acfeb9b217327395db069594187f2e09a9797d
BLAKE2b-256 checksum
How to use checksums
9d2881966524a427ee18ea22096dedeb4908febaff576644c0fe6ca7ec3341a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.6

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.0

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