ContextSeek semantic context substrate for agent systems.
Project description
ContextSeek
Semantic context infrastructure for AI agents. 中文文档
Overview
Agent self-evolution is taking shape along two technical paths. One extracts and solidifies experience from runtime behavior (e.g. Hermes, OpenHuman). The other evolves the context infrastructure beneath the agent—organizing, updating, and linking context automatically—without modifying agent execution logic.
ContextSeek focuses on the latter. It turns one-off, task-level gains into compounding value across context lifecycles, so heterogeneous agent systems can share a single semantic layer for retrieval, provenance, and evolution.
Three constraints still stand in the way: heterogeneous integration—Memory, Trace, and related components expose incompatible APIs and semantic conventions; insufficient retention—runtime experience is consumed in the prompt window and rarely becomes reusable capability; missing provenance—outputs lack traceable evidence chains. ContextSeek is a unified semantic context layer between LLMs and agent runtimes, converging these capabilities in a single object model: everything is a ContextItem, retrievable and traceable, with automatic progression through raw → extracted → knowledge → skill.
Quick Start
pip install contextseek
from contextseek import ContextSeek
ctx = ContextSeek.from_settings() # reads .env or environment variables
# Write
ctx.add(
"OceanBase is a financial-grade distributed database supporting HTAP workloads",
scope="acme/db/engineer",
source="wiki",
)
# Retrieve (ranked SearchHits; L1 summaries by default)
for hit in ctx.retrieve("distributed database", scope="acme/db/engineer", k=10):
print(f"[{hit.item.stage.value}] score={hit.score:.2f} | {hit.item.summary[:60]}")
Configure via .env (see .env.example) or ContextSeekSettings in code. A storage backend, an embedding provider, and an LLM are the three required pieces.
Documentation
- Getting started (EN) / 快速上手 (ZH): installation,
.envsetup, and a walkthrough of the core operations. - Client API reference: full method signatures for
add,retrieve,expand,compact,dream,evidence_chain, and more. - Configuration reference: all environment variables and
ContextSeekSettingsfields. - DataPlugs: how to ingest from RAG pipelines, memory stores, execution traces, and skill / tool registries.
- Examples: annotated scripts for common workflows.
- AppWorld eval / τ-bench eval: optional evaluation harnesses with their own setup requirements.
How it works
- Unified object model — all context — memory, knowledge, traces, skills — is a
ContextItem. Items carry mandatoryProvenance(source type, source id, confidence) and typedLinkedges (supports, refutes, derives, supersedes), enabling a fullEvidenceChainDAG with confidence propagation. - Content tiers — L0 (~100 tokens) feeds embedding recall. L1 (~2 k tokens) is the default surface returned by
retrieve(). L2 (full body) is available on demand viaexpand(). - Retrieval orchestrator — keyword + vector hybrid recall, optional LLM reranking, and scope-based routing. Returns ranked
SearchHitrows. Exposes tool specs for OpenAI and Anthropic agents viactx.tools(). - EvolutionEngine — watches for items that can be merged, resolved, advanced in stage, or distilled into skills. Runs incrementally after writes or on an explicit
compact()call. - DreamEngine — idle-time pattern consolidation and cross-cluster hypothesis generation, triggered via
dream(). - HTTP + MCP servers — expose the same operations over FastAPI and the Model Context Protocol for remote agent integrations.
Related Projects
- seekvfs — underlying virtual filesystem
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 contextseek-0.1.0.tar.gz.
File metadata
- Download URL: contextseek-0.1.0.tar.gz
- Upload date:
- Size: 450.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d005e9e33d9c2de42d9785c572fad91fe7f73348f1d9fc0fb74c985803dd610
|
|
| MD5 |
3f8083369cc450d2bb3144088762bc99
|
|
| BLAKE2b-256 |
79a922fe6f4de99d4efc2dde79e9d40d5344524da3aaad7052214669f7ce1997
|
Provenance
The following attestation bundles were made for contextseek-0.1.0.tar.gz:
Publisher:
release.yml on ob-labs/contextseek
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
contextseek-0.1.0.tar.gz -
Subject digest:
9d005e9e33d9c2de42d9785c572fad91fe7f73348f1d9fc0fb74c985803dd610 - Sigstore transparency entry: 1629558658
- Sigstore integration time:
-
Permalink:
ob-labs/contextseek@249caef673ec665ef0e60f53aab60ee67913dca6 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/ob-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@249caef673ec665ef0e60f53aab60ee67913dca6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file contextseek-0.1.0-py3-none-any.whl.
File metadata
- Download URL: contextseek-0.1.0-py3-none-any.whl
- Upload date:
- Size: 172.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f9f0fbe821eb0815f2d34300067e1edb1fd5d84a59be17ab8e1eeec9d4e5cae
|
|
| MD5 |
ab76c46ee601770e7af34074f78952e7
|
|
| BLAKE2b-256 |
fbe0872f84be46c4ddc3badb1ba119541744326cd6c403a7fa025d7517833d80
|
Provenance
The following attestation bundles were made for contextseek-0.1.0-py3-none-any.whl:
Publisher:
release.yml on ob-labs/contextseek
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
contextseek-0.1.0-py3-none-any.whl -
Subject digest:
1f9f0fbe821eb0815f2d34300067e1edb1fd5d84a59be17ab8e1eeec9d4e5cae - Sigstore transparency entry: 1629558684
- Sigstore integration time:
-
Permalink:
ob-labs/contextseek@249caef673ec665ef0e60f53aab60ee67913dca6 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/ob-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@249caef673ec665ef0e60f53aab60ee67913dca6 -
Trigger Event:
push
-
Statement type: