Skip to content

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?”

Standard RAG requires explicit workflows: query, extract, save. The Agent Memory API collapses this into natural conversation:

Without Memory APIWith Memory API
”Search GitHub for auth decisions""Remember: we chose JWT for auth because of mobile SSO”
AI extracts entities manuallyTeamLoop auto-extracts entities, relationships, dates
”Show me the auth timeline""What do I know about auth?”
Raw entity listCoherent summary with temporal context

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 reasons
were reducing over-fetching and supporting mobile clients. We considered
gRPC 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

Ask “what do I know about X?” and get a synthesized summary — not raw search results.

Scopes:

  • all (default) — Everything known about the topic
  • recent — Only memories from the last 30 days
  • decisions — 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.

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 relationships
  • full — 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

The Agent Memory API works best as part of a natural conversation flow:

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..."
User: "We're switching to CockroachDB for horizontal scaling"
AI: [uses teamloop_remember]
→ "Remembered 2 entities. Conflict detected: CockroachDB adoption
<-> PostgreSQL adoption (87% similar)"
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 resolve
  1. Natural language input sent to LLM for entity extraction
  2. LLM returns structured JSON with entities, relationships, dates
  3. Each entity is checked for duplicates, embedded, and saved
  4. DECISION entities trigger conflict detection (similarity > 85%)
  5. A journal entry is created with the raw text for full-text recall
  6. If no LLM is available, the content is saved as a single DOCUMENT entity
  1. Topic is embedded and used for semantic search across entities and journal entries
  2. Results are filtered by scope and time context
  3. LLM synthesizes a coherent summary from the raw data
  4. If no LLM is available, results are returned as a structured list
  1. Topic is embedded and top entities retrieved
  2. Related entities fetched via relationship graph traversal
  3. Conflicts gathered for decision entities
  4. Timeline built from entity events
  5. LLM generates structured briefing, or manual formatting as fallback

The Agent Memory API is also available via REST endpoints:

MethodEndpointDescription
POST/v1/mcp/rememberStore a memory
POST/v1/mcp/recallRecall memories (rate limited)
POST/v1/mcp/get-contextGet 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_recall before teamloop_query to check what’s already known. This is faster and doesn’t hit external integrations.
  • Tag memories — Adding tags to teamloop_remember helps with organization and future filtering.
  • Resolve conflicts — When teamloop_remember detects 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_context with depth: "full" for a complete briefing.