Integration

Observations in, relevant context out.

MemState sits beside your agent as a dedicated memory service. The agent should only send observations (what it saw or concluded in this turn) and requests for context when it needs to reason. MemState decides how those observations become durable memory, when to merge duplicates, and when to let unused material fade — not your orchestration code and not the model prompt.

When MemState fits

Use MemState when facts must survive across sessions, when answers need a traceable source of truth, and when you do not want every team to reinvent ingestion, deduplication, and forgetting in application logic.

How the loop works

  1. Observe — after a turn, the integration forwards what the agent noticed: short text, structured fields, tool output, or a compact summary of the delta.
  2. Memorize — MemState maps that observation onto topics and fields, appends history where values change, and refreshes embeddings. Placement and merge policy live here.
  3. Ask — when the agent needs to think, it sends a natural-language question; MemState returns structured context from the topics that answer it (fields, summary, links), with optional history or neighbors when you ask for them. The response is memory you can reason over, not a similarity leaderboard.
  4. Maintain — after responses return, MemState runs revise and forget in the background. The agent never schedules those steps.

Pick the surface that matches your team

  • Application path — stable client API for production: observation-shaped writes and context queries.
  • Operator tools — UI-oriented routes for inspection, tuning, and support without widening the agent contract.
  • LLM-native path — optional chat-style entry when a model already sits inside a tool and policy wrapper you control.

Technical details

For install commands, example payloads, and field-level contracts, use the developer quickstart and API reference from the banner or sidebar. Those pages note where the reference service still expects explicit wire fields while observation-first routing is completed.