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