PromptisePromptise
PlatformSoonEnterprise
DocsGitHub
Talk to usGet started
Promptise - AI Framework LogoPromptise

The full-stack framework for agentic systems. Build with the framework. Run it on the platform. Launch it with our engineers.

pip install promptise

[01] Product

  • Framework
  • Platform (coming soon)
  • Enterprise
  • How it works
  • Contact

[02] Framework

  • The Agent
  • The Interface
  • The Harness

[03] Resources

  • Documentation
  • GitHub
  • Why Promptise
  • Use cases
  • Roadmap
  • Guides
  • Learning Paths
  • Questions

[04] Company

  • About
  • Terms of Service
  • Privacy Policy
  • Cookie Policy
  • Subprocessors

© 2026 Promptise by Manser Ventures. All rights reserved.

hello@promptise.com
← Guides> Topic

Memory, context and RAG

A model only knows what is in its context window on the current call. Everything an agent seems to remember, from the conversation so far to facts about a user or documents from a knowledge base, has to be chosen and placed there by the program. Doing that well is called context engineering, and it decides both answer quality and token cost.

These guides start with context engineering as a whole, then cover the main sources of context: long-term memory that persists between conversations, and retrieval-augmented generation (RAG) where the agent decides when and what to search. The last guide covers semantic caching and model fallback, which reuse earlier answers and keep the agent working when a provider fails. Read the first guide first; it gives the vocabulary the others build on.

13
guides
2
Beginner
10
Intermediate
1
Advanced
4 h
of reading
01

Start here

What Is Agentic RAG? How It Differs from Classic RAG

What agentic RAG is: an agent decides when and what to search, searches again if needed and cites sources. How it works, an example, RAG vs agentic RAG.

Beginner · 7 minRead the guide →

Then read on, in this order

12 guides

  1. 02Context Engineering for AI Agents: Context Window ManagementContext engineering for AI agents: decide what the model sees on each step, return less from tools, and keep long runs small without losing the question.Intermediate · 26 minIntermediate · 26 min→
  2. 03Context Compaction for AI Agents: Trim vs SummarizeContext compaction for AI agents: drop, trim or summarize, what each keeps on a real transcript, why agents forget file paths, and how to compact safely.Advanced · 20 minAdvanced · 20 min→
  3. 04Tool Result Too Large? Keep an AI Agent's Context SmallTool result too large for your AI agent? Page, filter and count at the tool, return errors instead of rows, and see what each design costs in tokens.Intermediate · 16 minIntermediate · 16 min→
  4. 05AI Agent Memory in Python: Short-Term and Long-TermGive your AI agent memory that lasts: chat history per session, long-term facts across sessions, kept per user. Python code with real output.Intermediate · 18 minIntermediate · 18 min→
  5. 06Per-User Agent Memory Isolation: Stop Leaks Between UsersWhy shared AI agent memory leaks between users, how per-user scopes and role-gated team notes stop it, and a canary test that proves the isolation works.Intermediate · 18 minIntermediate · 18 min→
  6. 07How to Test AI Agent Memory: Recall Evals in PythonHow to test AI agent memory with recall evals in Python: retrieval recall@k, then end-to-end cases for updates, dates, abstention and isolation.Intermediate · 20 minIntermediate · 20 min→
  7. 08Agentic RAG in Python: Give Your AI Agent a Search ToolBuild a RAG AI agent in Python: index your docs, give the agent a search tool, cite sources, and make it say "I don't know". Real code, real output.Intermediate · 21 minIntermediate · 21 min→
  8. 09Vectorless RAG: Tree Search Over Long DocumentsVectorless RAG explained: how tree search over a document outline replaces vector search, when it beats embeddings and when not, with a runnable agent.Intermediate · 18 minIntermediate · 18 min→
  9. 10Source Provenance for Research Agents: Track Each ClaimSource provenance for research agents: tie every claim to a source the agent read and an exact quote, check it in code, and stop fake statistics.Intermediate · 16 minIntermediate · 16 min→
  10. 11Long-Running AI Tasks: Write a Brief That Lasts HoursHow to brief an AI agent for a long-running task: a done list, milestones, a progress log, stop rules and handoff notes, with real prompts and a template.Beginner · 13 minBeginner · 13 min→
  11. 12LLM Semantic Cache and Model Fallback in PythonReduce LLM API costs with a semantic cache and survive provider outages with model fallback. Real hits, tokens and a simulated outage, in Python.Intermediate · 23 minIntermediate · 23 min→
  12. 13Self-Improving AI Agent: Learn From Tool Failures in PythonBuild a self-improving AI agent in Python that learns from failed tool calls without fine-tuning, and keep bad lessons, leaks and poisoned rules out.Intermediate · 22 minIntermediate · 22 min→

Other topics

  • Building AI agents in Python
  • Models and providers
  • Tools and the Model Context Protocol (MCP)
  • Agent reasoning patterns
  • Multi-agent systems
  • Guardrails and security
  • Human approvals (human-in-the-loop)
  • Observability and debugging
  • Cost control and rate limits
  • Testing and evals
  • Runtime, triggers and deployment
  • Frameworks and comparisons
  • AI at work
  • AI for leaders
  • Enterprise AI agents

In the documentation

  • Context enginedocs ↗
  • Memorydocs ↗
  • RAGdocs ↗
  • Semantic cachedocs ↗

Build it with Promptise Foundry.

The code in these guides runs on Promptise Foundry, an open-source Python framework for AI agents and MCP servers.

QuickstartAll guides