Memory

Context Bridge

The context bridge gives agents a warm start at the beginning of every new session. Rather than starting from a blank slate, the agent receives a curated summary of recent sessions, any pending tasks the user left open, and semantically relevant memory — all assembled automatically before the first user message is processed.

What is injected

When a new session starts, the bridge assembles four pieces of context:

SourceContentLimit
Recent session summariesSummary, key decisions, and topics from the last 3 sessions with this agent3 sessions
Pending actionsTasks or follow-ups that were flagged but not resolved in previous sessionsAll open items
Semantic memoryMemory entries relevant to the current session's opening topicTop matches
User profileUser preferences and background (Tier 3)Full profile

Session summaries

When a session ends, the agent summarizes the conversation and saves it to the session_summaries table. Each summary includes:

  • summary — A 2–4 sentence narrative of what was discussed and decided
  • topics — Array of topic strings (e.g. ["authentication", "deployment"])
  • keyDecisions — Decisions made during the session
  • pendingActions — Items left open or deferred
  • messageCount / durationMinutes — Session metadata

Pending actions

If a previous session recorded pending actions (e.g. "follow up on PR #42", "revisit caching strategy"), the bridge surfaces them at the top of the next session's context. The agent can acknowledge and clear them, or carry them forward again.

How to enable

The context bridge is enabled per-agent in astra.yml:

yaml
agents:
  - id: engineering-assistant
    contextBridge:
      enabled: true
      recentSessions: 3      # how many past sessions to include
      includeProfile: true   # inject user profile preferences
Context bridge content is injected before the user's first message in the new session. It does not appear in the visible message history — it is injected as a system-level context block.

Relationship to other memory systems

The context bridge is distinct from the 5-tier memory system. It is session-scoped continuity, not long-term knowledge storage. Think of it as the agent remembering "what we were talking about" rather than "what I know about you."