The agent lifecycle
An agent’s interaction with Hyper spans three phases: session start, active work, and session end. Configure your AI client’s hooks to trigger these phases automatically so no memory step gets skipped.SessionStart — Brief and orient
When a new session begins, the agent calls The briefing is not a raw dump of workspace documents — it’s a curated summary generated for this specific agent, prioritizing what’s most likely to be relevant to the session ahead. Agents should treat the briefing as ground truth for the current session and not ask follow-up questions about basic context it contains.
connect(). Hyper authenticates the session, identifies the active workspace, and returns a briefing: a synthesized digest of the team’s current state, recent decisions, active goals, and any blockers.Per-message — Query before answering
During an active session, agents should call
ask() or ask_with_history() when a user asks something that might have an established answer in workspace memory — architecture questions, past decisions, team ownership, active constraints.ask() returns the current synthesized answer. ask_with_history() returns the same answer plus the history of how that decision evolved over time, so the agent (and user) can trace the reasoning behind the current state.Running these calls in the background — before composing a response — keeps latency low. The agent doesn’t need to surface the retrieval step to the user unless the retrieved context is directly relevant to the reply.Stop — Observe and remember
When a session ends, the agent reviews the conversation and calls If the agent discovered that something in workspace memory is outdated or wrong during the session, it calls
remember() for anything worth preserving. This is the most important step: a session that produces a decision, surfaces a constraint, or changes a status and doesn’t call remember() is dead knowledge.correct() here — not remember().Writing for future agents
Every memory an agent writes should be readable by a future agent that has zero session context. Write with that reader in mind: Tag observations clearly. When an agent adds an inference or interpretation — not a direct user statement — it should mark it:Memory writing checklist for agents
Memory writing checklist for agents
Before calling
remember(), confirm the content passes these checks:- Is it durable? Will it still be true and relevant in a week?
- Is it team-relevant? Would another agent or teammate benefit from knowing this?
- Does it include the WHY? Is the rationale captured, not just the outcome?
- Is it already in memory? If yes, use
correct()to update, notremember()to duplicate. - Is it inferential? If the agent derived it rather than the user stating it, is it tagged with
[agent note]?
Handling contradictions
Agents will sometimes encounter a conflict between what a user says in a session and what’s stored in workspace memory. Handle this explicitly — never silently fix a contradiction. The correct pattern:- Flag the conflict to the user. “Workspace memory says we use Supabase Auth, but you’ve mentioned Firebase. Which is current?”
- Let the user confirm before writing any correction.
- Call
correct()with the confirmed truth, notremember()with the new version alongside the old.
If an agent is operating in a fully automated pipeline with no human in the loop and encounters a contradiction, it should halt the memory write and surface the conflict in its output for a human to resolve.
Background vs. foreground calls
Not all Hyper calls need to be visible to the user:| Call | Recommended mode | Reason |
|---|---|---|
connect() | Foreground (show briefing) | Users benefit from seeing the current state |
ask() | Background | Retrieval enriches answers; users don’t need to see the lookup |
ask_with_history() | Foreground when history is relevant | Show the history when a user explicitly asks “how did we get here?” |
remember() | Background with summary | Log silently; surface a brief “Saved to memory” confirmation |
correct() | Foreground | Always confirm corrections with the user before writing |
mute() | Foreground | Users should know when incognito mode is active |
Access control for agents
Agents inherit the permissions of the authenticated user whose session they’re running in. An agent running in an admin’s session can write to org-level documents through the memory pipeline. An agent running in a member’s session is restricted to the member’s own areas and the shared feed.Admin agent
Writes from admin sessions propagate to org/identity.md, org/decisions.md, and org/goals.md through the synthesis pipeline.
Member agent
Writes from member sessions go to people//* and feed.md. Org-level writes are still routed and synthesized but cannot override protected sections.