Agent Memory API
The Agent Memory API transforms TeamLoop from a knowledge graph you query into persistent memory for AI assistants. Instead of manually extracting entities, your AI assistant can simply say “remember this” and later “what do I know about X?”
Why Agent Memory?
Section titled “Why Agent Memory?”Standard RAG requires explicit workflows: query, extract, save. The Agent Memory API collapses this into natural conversation:
| Without Memory API | With Memory API |
|---|---|
| ”Search GitHub for auth decisions" | "Remember: we chose JWT for auth because of mobile SSO” |
| AI extracts entities manually | TeamLoop auto-extracts entities, relationships, dates |
| ”Show me the auth timeline" | "What do I know about auth?” |
| Raw entity list | Coherent summary with temporal context |
Three Tools
Section titled “Three Tools”teamloop_remember
Section titled “teamloop_remember”Store facts, decisions, or insights in natural language. TeamLoop automatically:
- Extracts entities (decisions, people, projects, components)
- Identifies relationships between them
- Generates embeddings for semantic search
- Detects conflicts with existing decisions
- Creates a journal entry for full-text recall
Example:
"Remember: We decided to switch from REST to GraphQL for the public API.Sarah proposed this in the March architecture review. The main reasonswere reducing over-fetching and supporting mobile clients. We consideredgRPC but ruled it out due to browser support."What gets created:
- DECISION entity: “Switch from REST to GraphQL for public API”
- PERSON entity: “Sarah”
- Relationships: DECIDED_BY, SUPERSEDES (if REST API decision exists)
- Conflict detection against any existing API architecture decisions
teamloop_recall
Section titled “teamloop_recall”Ask “what do I know about X?” and get a synthesized summary — not raw search results.
Scopes:
all(default) — Everything known about the topicrecent— Only memories from the last 30 daysdecisions— Only decision entities
Time context — Natural language time filters:
- “since January”
- “last month”
- “last 7 days”
- “this week”
Example:
Topic: "authentication architecture"Scope: "decisions"Time context: "since January"Returns: A coherent 2-4 paragraph summary describing the current state, key decisions with rationale, relevant people, and any unresolved conflicts.
teamloop_get_context
Section titled “teamloop_get_context”Get a comprehensive briefing on any topic. Combines entities, relationships, timeline, and conflicts into a structured overview.
Depth modes:
brief(default) — Key facts and decisions, top 10 entities, 1-hop relationshipsfull— Comprehensive analysis, 20 entities, 2-hop relationships, full timeline
Example:
Topic: "payments service"Depth: "full"Returns a structured briefing with:
- Current State — Where things stand now
- Key Decisions — Important choices with rationale and status
- Relationships — How entities connect (dependencies, ownership)
- Timeline — Chronological evolution of the topic
- Open Issues — Unresolved conflicts or pending decisions
Workflow
Section titled “Workflow”The Agent Memory API works best as part of a natural conversation flow:
Day 1: Learning
Section titled “Day 1: Learning”User: "What decisions were made about the database?"AI: [uses teamloop_query to search GitHub/Notion]AI: [uses teamloop_remember to store findings]→ "Remembered 4 entities: PostgreSQL adoption, schema migration strategy..."Day 5: New decision
Section titled “Day 5: New decision”User: "We're switching to CockroachDB for horizontal scaling"AI: [uses teamloop_remember]→ "Remembered 2 entities. Conflict detected: CockroachDB adoption <-> PostgreSQL adoption (87% similar)"Day 10: Context needed
Section titled “Day 10: Context needed”User: "Bring me up to speed on database decisions"AI: [uses teamloop_get_context with depth: "full"]→ Full briefing: original PostgreSQL decision, migration to CockroachDB, who was involved, timeline of changes, open conflict to resolveHow It Works Under the Hood
Section titled “How It Works Under the Hood”Remember flow
Section titled “Remember flow”- Natural language input sent to LLM for entity extraction
- LLM returns structured JSON with entities, relationships, dates
- Each entity is checked for duplicates, embedded, and saved
- DECISION entities trigger conflict detection (similarity > 85%)
- A journal entry is created with the raw text for full-text recall
- If no LLM is available, the content is saved as a single DOCUMENT entity
Recall flow
Section titled “Recall flow”- Topic is embedded and used for semantic search across entities and journal entries
- Results are filtered by scope and time context
- LLM synthesizes a coherent summary from the raw data
- If no LLM is available, results are returned as a structured list
Get Context flow
Section titled “Get Context flow”- Topic is embedded and top entities retrieved
- Related entities fetched via relationship graph traversal
- Conflicts gathered for decision entities
- Timeline built from entity events
- LLM generates structured briefing, or manual formatting as fallback
REST API
Section titled “REST API”The Agent Memory API is also available via REST endpoints:
| Method | Endpoint | Description |
|---|---|---|
| POST | /v1/mcp/remember | Store a memory |
| POST | /v1/mcp/recall | Recall memories (rate limited) |
| POST | /v1/mcp/get-context | Get topic briefing (rate limited) |
All endpoints require authentication and accept JSON request bodies.
- Use remember proactively — When you learn something in a conversation, remember it immediately. Knowledge is only useful if it’s stored.
- Recall before querying — Use
teamloop_recallbeforeteamloop_queryto check what’s already known. This is faster and doesn’t hit external integrations. - Tag memories — Adding tags to
teamloop_rememberhelps with organization and future filtering. - Resolve conflicts — When
teamloop_rememberdetects a conflict, address it. Either the new decision supersedes the old one, or they’re about different things. - Use get_context for onboarding — When starting work on an unfamiliar area, use
teamloop_get_contextwithdepth: "full"for a complete briefing.