Skip to content

[contexto]: Exploration report for Pi Agent integration #137

Description

@sm86

Goal

Produce a written exploration report on what it would take to integrate Contexto with Pi Agent, before committing to build work. Sister ticket to #134 (Hermes), but discovery-only.

Why exploration first

We don't yet know whether Pi Agent's plugin / context surface maps cleanly onto our existing ContextoBackend + lifecycle hooks (afterTurn, compact, assemble, dispose), or whether it requires a different shape entirely (e.g. middleware, callback, sidecar). Building blind risks either an awkward adapter or a half-finished integration.

Deliverable

A short report (markdown, in docs/explorations/pi-agent.md or similar) covering:

  1. Pi Agent plugin/extension surface — link the relevant docs; summarize the lifecycle and extension points.
  2. Mapping to Contexto lifecycle — which Pi Agent hooks line up with afterTurn / compact / assemble / dispose; what's missing or differently shaped.
  3. Compaction ownership — does Pi Agent own the context window (sliding-window analog) or always delegate?
  4. Token-budget signals — does Pi Agent expose anything like tokenBudget / currentTokenCount / firstKeptEntryId?
  5. Packaging — separate package (@ekai/contexto-pi) vs second entry in @ekai/contexto; what the install story looks like.
  6. Recommendation — build now, build later, or don't build. With a one-paragraph justification.

Acceptance criteria

  • Report committed to the repo and linked from this issue
  • Recommendation is explicit (not "we could go either way")
  • Follow-up build ticket opened if recommendation is "build"

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions