PromptisePromptise
Docs
GitHub
Promptise - AI Framework LogoPromptise

The foundation layer for agentic intelligence. Build, secure and operate autonomous AI systems with Promptise Foundry.

pip install promptise

[01] Foundry

  • MCPcast
  • The Promptise Agent
  • Reasoning Engine
  • MCP
  • Agent Runtime
  • Prompt Engineering
  • Execution Engine
  • Agent Identity

[02] Resources

  • Documentation
  • GitHub
  • Guides
  • Learning Paths
  • Questions

[03] Company

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

© 2026 Promptise by Manser Ventures. All rights reserved.

Open source · Python

← 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.

[n.01/02]> 6 guides, in order
  1. 01What Is Agentic RAG? How It Differs from Classic RAGWhat 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 minOct 18, 2026
  2. 02Context Engineering for AI Agents: Context Window ManagementContext engineering for AI agents in Python: keep what matters in long runs, trim the rest, and cut input tokens 18x. Real token counts per step.Intermediate · 26 minOct 11, 2026
  3. 03AI 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 minOct 11, 2026
  4. 04Agentic 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 minOct 11, 2026
  5. 05LLM 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 minOct 11, 2026
  6. 06Self-Improving AI Agent: Learn From Tool Failures in PythonBuild an AI agent that learns from failed tool calls without fine-tuning. Real before-and-after numbers, plus the risks: bad lessons, leaks, poisoning.Intermediate · 22 minOct 11, 2026
[n.02/02]> go further

In the documentation

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

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→

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