Skip to main content

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(...) — returns discover / interpret / search as AgentTool instances, window-aware when a ContextWindow is passed.
  • copass_ingest_tool(...) — returns ingest as an AgentTool so agents can promote content into durable sandbox storage.
  • CopassTurnRecorder — mirrors user / assistant turns into a ContextWindow with 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

copass_context_agents-0.4.3.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

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

copass_context_agents-0.4.3-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file copass_context_agents-0.4.3.tar.gz.

File metadata

  • Download URL: copass_context_agents-0.4.3.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for copass_context_agents-0.4.3.tar.gz
Algorithm Hash digest
SHA256 f5b1631ebad2322e2a94c722aaa13396d9e69c5bc439aa3527df3970a7337e4a
MD5 e4c873e2db18f8f64d1ae8eb87fecbfc
BLAKE2b-256 e0f978df24167a06baeff1e85c4424149147f457b2dee301ad27c2821889a6ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for copass_context_agents-0.4.3.tar.gz:

Publisher: release-python.yml on olane-labs/copass-harness

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file copass_context_agents-0.4.3-py3-none-any.whl.

File metadata

File hashes

Hashes for copass_context_agents-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7884bfcb9746c7ad6a4b070f63b482883e0caad29fec6d5dbde0037894963eb6
MD5 d4438a1d798d4dc397e525ae8e813c7d
BLAKE2b-256 e6a445239250f9c52b5e8cdaa658e6fb728e0cd7123e8c997ce6ccd155bdd90e

See more details on using hashes here.

Provenance

The following attestation bundles were made for copass_context_agents-0.4.3-py3-none-any.whl:

Publisher: release-python.yml on olane-labs/copass-harness

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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