Skip to main content

Context intelligence for AI agents - Ingest, search, and subscribe to shared context across your AI systems

Project description

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

AGPL-3.0 — See LICENSE for details.

Project 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.0.0.tar.gz (382.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rotalabs_context-1.0.0-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file rotalabs_context-1.0.0.tar.gz.

File metadata

  • Download URL: rotalabs_context-1.0.0.tar.gz
  • Upload date:
  • Size: 382.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for rotalabs_context-1.0.0.tar.gz
Algorithm Hash digest
SHA256 c2857272b71813fa44ba78f1c7878728fec2a27e366b34b0c904d5c5c60b89db
MD5 4aff9a59e799a6c5a7fe3d6b1fa2d442
BLAKE2b-256 f95878b1911d119af3dc05896e2cc5d7a8ff31d73e971f79412f8b4b58f7795f

See more details on using hashes here.

File details

Details for the file rotalabs_context-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: rotalabs_context-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for rotalabs_context-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a5177f4ad8151e8039959662fac14908d01451c00654e75f11ae9644d40f28b8
MD5 54b82917d6bbf7e40d20389cd207cf23
BLAKE2b-256 0b2f0eaef87b678fd189ba779949859e172a0ea394101478c64ec4c16923a52d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page