Session Intelligence
A closed intelligence loop: your sessions end with a debrief, agents process overnight, and your next session starts with a briefing
Session Intelligence connects the end of one coding session to the start of the next. When you finish work, ACE captures what happened. Between sessions, agents analyze your changes. When you start again, you get a briefing of everything that was discovered.
Session Intelligence Loop
When you start a new coding session, the briefing hook calls the ACE API and injects agent intelligence into your AI's context. This means your AI immediately knows about contradictions found, quality issues flagged, patterns learned, and open issues — without you having to explain anything.
The briefing queries 6 data sources:
| Source | What it returns | Priority |
|---|---|---|
| observations | Agent findings — contradictions, quality issues, insights | Sorted by severity (critical first) |
| decisions | Proposed decisions awaiting your review | Most recent first |
| agent_events | Significant events: risks identified, relationships discovered, knowledge corrections | Most recent first |
| agent_runs | Agent activity summary — how many runs, failures, items processed | Grouped by agent |
| issues | Open issues (not time-filtered — always shows unresolved work) | Critical/high first |
| memories | Hot memories — things your AI keeps needing (access_count ≥ 3) | Most accessed first |
Example briefing output
This is what gets injected into your AI's context at session start:
API Endpoint
Returns agent intelligence from the last N hours (1–168). Default: 24 hours. Hours are read from your saved dashboard config (Settings → Session Hooks).
MCP Tool
Available on Pro, Founder, and Enterprise plans. Uses your weekly API budget.
CLI Command
Formats: markdown (for AI context), json, or default human-readable.
The PreCompact hook runs automatically when Claude Code compacts your conversation context. It parses the transcript and creates a work log in ACE with session statistics — edits, reads, writes, and bash commands.
What it captures:
Automatic: The PreCompact hook only fires on automatic compaction (when your context window fills up), not manual compaction. This ensures work logs reflect real session activity.
The debrief endpoint records a session summary as three separate entities, each serving a different purpose in the intelligence loop:
Work Log
What was done. Visible in the dashboard timeline. Includes summary, files changed, hours worked, and tasks completed.
Memory
Key learnings. Stored as session_debrief_{timestamp}. Retrievable by future recall() queries so context carries forward.
Observation
For agent processing. Agents pick up observations between sessions to detect patterns, flag risks, and discover relationships.
Request Body
{
"summary": "Implemented auth middleware and wrote tests",
"files_changed": ["src/auth.ts", "tests/auth.test.ts"],
"decisions_made": ["Use JWT over session tokens"],
"issues_encountered": ["CORS config needed for staging"],
"session_id": "optional-session-id",
"duration_minutes": 90
}API Endpoint
MCP Tool
CLI Command
ACE provides two MCP prompts that wrap the briefing and debrief into ready-to-use instructions for your AI tool.
start-session
Fetches your briefing and presents it as a structured context block. Use at the beginning of any session.
end-session
Guides you through recording a debrief with summary, files, decisions, and issues.
Claude Code (Automatic)
Zero setup required. Session hooks are automatically installed when you run ace login. The briefing hook, MCP config, and settings are all configured for you.
Install and login
npm install -g @ace3-memory/ace ace login
This automatically installs the session briefing hook, MCP server config, and Claude Code settings.
Start a Claude Code session
The session briefing automatically runs at the start of every session, injecting agent intelligence into your AI's context.
What gets installed: A session hook at ~/.claude/hooks/ace-session-start.sh that runs ace session start on every session. The hook and settings are added to your global Claude Code config so they work in every project.
Optional: Project-level hooks
To install hooks for a specific project instead of globally, run inside the project directory:
All AI Providers (MCP)
Session intelligence works with every MCP-compatible AI tool. Claude Code has automatic hooks, but the MCP tools work with Cursor, VS Code, Windsurf, ChatGPT, Gemini, and any MCP client.
.cursorrules or .windsurfrules: "At start, call ace_session_briefing. At end, call ace_session_debrief.".github/copilot-instructions.md or Continue rules file.ace_session_briefing at conversation start./start-session and /end-session.Between sessions, autonomous agents run on 2–4 hour cycles, processing the data captured by your debriefs and work logs. Their findings appear in your next session briefing.
Session Manager
Scans work logs, memories, and episodes for context gaps. Flags long periods without activity and surfaces relevant historical context when you resume.
Runs every 2h
Knowledge Guardian
Checks new debriefs for contradictions with existing knowledge. Catches stale data and knowledge graph drift before it causes problems.
Runs every 3h
Pattern Detector
Identifies recurring patterns across sessions. Consolidates observations into higher-level insights and identifies emerging risks.
Runs every 4h
Observation Consolidator
Merges related observations from different agents into consolidated insights. Reduces noise so your briefing contains high-signal findings.
Runs every 3h
All 10 agents contribute to session intelligence. The agents above are the most directly involved. See Agentic Intelligence for the full list.
| Command | What it does | When to use |
|---|---|---|
| ace session start | Fetches and displays the session briefing | Runs automatically via hook. Or run manually anytime. |
| ace session log "..." | Quick mid-session work log entry | After completing a milestone mid-session |
| ace session end --summary "..." | Records a debrief (work log + memory + observation) | When finishing a coding session |
Options
ace session start --hours 48 --format json ace session log "Fixed auth bug" --tags "bugfix,auth" --files "src/auth.ts" ace session end --summary "Shipped v2.1" --hours 3 --files-changed "src/api.ts,tests/api.test.ts"
Session hooks are configurable per namespace in the dashboard at Settings → Session Hooks.
Briefing settings
- • Lookback period (1–168 hours)
- • Which agents to use for briefings
- • Include/exclude: agent insights, open issues, proposed decisions, hot memories
Debrief settings
- • Auto-debrief on/off
- • Which agents process debriefs
- • Agent sequence mode (parallel, sequential, consensus)
- • Auto-learn from session patterns
The Session Coordinator maps agents to specific session phases. Each phase can run agents in parallel or sequential mode, with context flowing between phases.
5 session templates: Default, Development, Code Review, Incident Response, Learning. Each template pre-configures which agents run in which phase with appropriate execution modes.