Copass context-engineering primitives (retrieval tools, ingest tool, Context Window turn recorder) for copass-core-agents
Project description
copass-context-agents
Copass context-engineering primitives for copass-core-agents.
Three provider-neutral pieces every Copass-aware agent uses:
copass_retrieval_tools(...)— returnsdiscover/interpret/searchasAgentToolinstances, window-aware when aContextWindowis passed.copass_ingest_tool(...)— returnsingestas anAgentToolso agents can promote content into durable sandbox storage.CopassTurnRecorder— mirrors user / assistant turns into aContextWindowwith fire-and-forget pushes and author-prefix provenance.
These are the primitives the provider adapter packages — copass-anthropic-agents, copass-google-agents — compose into their run() / stream() loops. The descriptions come from copass_config so every Copass surface (TS adapters, MCP server, CLI) shows the LLM identical tool semantics.
Install
pip install copass-context-agents
Usually a transitive dep — pip install copass-anthropic-agents / copass-google-agents pulls it in.
Usage
from copass_core import CopassClient
from copass_context_agents import (
copass_retrieval_tools,
copass_ingest_tool,
CopassTurnRecorder,
)
client = CopassClient(...)
window = await client.context_window.create(sandbox_id=sandbox_id)
tools = [
*copass_retrieval_tools(client=client, sandbox_id=sandbox_id, window=window),
copass_ingest_tool(
client=client,
sandbox_id=sandbox_id,
data_source_id=my_source_id,
default_source_type="decision",
author="agent:support-bot",
),
]
recorder = CopassTurnRecorder(window=window, author="agent:support-bot", include_author_prefix=True)
# ...wire into your provider's stream loop; see copass-anthropic-agents or
# copass-google-agents for the full wiring.
See the provider adapter packages for the full CopassManagedAgent / CopassGoogleAgent integrations that wire these primitives into discover-as-step-1 + auto-record flows.
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 copass_context_agents-0.1.0.tar.gz.
File metadata
- Download URL: copass_context_agents-0.1.0.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
278c648f31ba9d854de52f536b7d461809d66fd223e12545a548a3735b213796
|
|
| MD5 |
e2f63d321cfdcd5667c64d582481043a
|
|
| BLAKE2b-256 |
576cc4c700a51b7ba2c40ab899fd7c1385901c8e49e4bb022e65a24fb46dd1fe
|
File details
Details for the file copass_context_agents-0.1.0-py3-none-any.whl.
File metadata
- Download URL: copass_context_agents-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92e40ca8475e99a580183fe5f8f5075e50ce80c49ee432de73b7b67dfb6d4122
|
|
| MD5 |
3a26aa2b324314e9690207c99188074b
|
|
| BLAKE2b-256 |
6c3c63a3447c4ca93214294eaac7e7adfd6e5974897d702de3a51f6bc21fcd7b
|