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> Library> Level

Intermediate guides: from a working prototype to a reliable system

Intermediate guides are for readers who have written prompts or built a small LLM feature and now want it to work reliably. Most of the AI agent guides sit here: production MCP servers, memory and retrieval, guardrails, human approval, observability, evals, cost control and deployment, each with runnable Python.

On the prompting side they cover the mental model series, long-form writing, long-context prompting, Program-of-Thought and routing between small and large models. The security guides at this level cover prompt injection defences for agents, secure prompt design, input and output validation, monitoring and a production checklist. You should be comfortable with Python and with the basic parts of a prompt; if a term is new, a beginner guide explains it.

[n.01/02]> 80 guides

AI Engineering49

  1. 01AI Agent Evals in CI: Run Them on Every Pull RequestRun AI agent evals in CI on every pull request: test tool choice, arguments, answers and safety, keep cost and flakiness down, with GitHub Actions.Intermediate · 18 minOct 18, 2026
  2. 02AI Agent Cost Tracking: Tokens and Cost per Run and UserTrack AI agent token usage and cost per model call, run, user and agent: price tables, cost ledgers, alerts and limits. Runnable code with real output.Intermediate · 16 minOct 18, 2026
  3. 03AI Agent Production Checklist: What to Check Before LaunchAn AI agent production checklist: security, approvals, guardrails, limits, cost, observability, evals, deployment and incident response, with code.Intermediate · 17 minOct 18, 2026
  4. 04Migrate from AutoGen: Agent Framework, Promptise and MoreAutoGen is archived. Compare migration paths (Microsoft Agent Framework, AG2, Promptise), map agents, group chats and termination, and port an example.Intermediate · 18 minOct 18, 2026
  5. 05CrewAI Alternatives: 7 Options and How to Migrate (2026)CrewAI alternatives compared: why teams look, 7 options and when each fits, a crew rebuilt in Promptise, and a map of crews, agents, tasks and flows.Intermediate · 17 minOct 18, 2026
  6. 06How to Deploy an AI Agent with Docker (2026 Guide)Deploy an AI agent with Docker: a Dockerfile, env config and secrets, health checks, graceful shutdown and docker compose with an MCP server. Tested.Intermediate · 18 minOct 18, 2026
  7. 07LangGraph Alternatives: 7 Options and How to Migrate (2026)LangGraph alternatives compared: why teams look, 7 options and when each fits, the same agent in LangGraph and Promptise, and a concept map to migrate.Intermediate · 18 minOct 18, 2026
  8. 08AI Agent Prompt Injection: How to Defend Against ItHow indirect prompt injection reaches AI agents through tool results, and how to defend: untrusted-data prompts, scanners, approval gates, least privilege.Intermediate · 18 minOct 18, 2026
  9. 09How to Evaluate AI Agents: Evals, LLM Judges and pass^kHow to evaluate AI agents: write golden and refusal tasks, grade tool calls in code, calibrate an LLM judge, measure pass^k and gate CI on the results.Intermediate · 20 minOct 18, 2026
  10. 10AI Agent Stuck in a Loop? How to Detect and Stop ItWhy AI agents get stuck in loops and how to stop them: detect repeated tool calls, cap tool calls per run, and write tool results that end the loop.Intermediate · 18 minOct 18, 2026
  11. 11What Is an Agent Harness? Parts and How to Build OneWhat an agent harness is and how to build one: the tool loop, context compaction, token budgets, loop guards and verification, with runnable code.Intermediate · 18 minOct 18, 2026
  12. 12MCP vs CLI for AI Agents: Tokens, Security, When to Use EachMCP vs CLI tools for AI agents: where the tokens go, prompt caching, per-user security and when to use each or both, with runnable code and real output.Intermediate · 20 minOct 18, 2026
  13. 13AI Agent Reasoning Patterns in Python: 9 Patterns TestedReAct, plan-and-execute, reflection, debate and code-action on the same three tasks, 12 runs each: which agent reasoning patterns were right, at what cost.Intermediate · 15 minOct 15, 2026
  14. 14Build an Authenticated MCP Server for Your AI Agent (Python)An MCP server authentication tutorial in Python: JWT login and roles, an agent that acts for each user, an attack script and a verified audit log.Intermediate · 25 minOct 15, 2026
  15. 15Python AI Agent Frameworks Compared: Which to Choose (2026)Compare Promptise, LangGraph, CrewAI, Pydantic AI, OpenAI Agents SDK, smolagents and LlamaIndex: features, the same agent in each, and which to choose.Intermediate · 22 minOct 18, 2026
  16. 16Durable AI Agents: Crash Recovery and Safe ResumeHow to make an AI agent survive a crash: journal its progress, resume from the last step, and use idempotency keys so side effects never run twice.Intermediate · 16 minOct 18, 2026
  17. 17MCP Security Best Practices: A Checklist for MCP ServersMCP security best practices as a checklist: token audience binding, per-tool scopes, input validation, human approval, rate limits and signed audit logs.Intermediate · 20 minOct 18, 2026
  18. 18AI Agent Cost Control: Budgets That Stop Runaway SpendHow to control AI agent costs: per-run and daily budgets that refuse tool calls before they run, token caps, iteration limits, and what each one misses.Intermediate · 18 minOct 18, 2026
  19. 19AI Agent Audit Logging: Tamper-Evident Logs in PythonLog every AI agent tool call to an HMAC-chained file, then catch edits, deletions and reordering with one command. Real tamper tests, real output.Intermediate · 15 minOct 11, 2026
  20. 20Testing MCP Servers in Python: pytest Without a Live ServerTest an MCP server in Python without running it: auth, guards, middleware, resources, prompts, error envelopes and job queues in 35 pytest tests, plus CI.Intermediate · 16 minOct 11, 2026
  21. 21LLM Tool Rate Limiting: Per-Client Limits for MCP ServersRate limit LLM tool calls per client, tenant and tool on a Python MCP server: a real load test, the error the agent sees, and how to retry it.Intermediate · 14 minOct 11, 2026
  22. 22Context 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
  23. 23Build a Production MCP Server in Python (Step by Step)Build an MCP server in Python ready for real agents: typed tools, clear errors, API keys with roles, rate limits, a tamper-evident audit log and tests.Intermediate · 18 minOct 11, 2026
  24. 24Streaming LLM Responses with FastAPI: Tokens and Tool CallsStream an AI agent's tool calls and answer from FastAPI to a web page with Server-Sent Events, with cancellation, errors and an EventSource page.Intermediate · 14 minOct 11, 2026
  25. 25MCP Transports: stdio vs Streamable HTTP vs SSE (Python)stdio vs Streamable HTTP vs SSE, shown on the wire with curl, then an MCP server over HTTP in production: Host checks, auth, health checks and scaling.Intermediate · 22 minOct 11, 2026
  26. 26FastAPI MCP Server: Turn Your FastAPI App into MCP ToolsTurn your FastAPI app into an MCP server for Claude and AI agents: fix auth, names and descriptions, gate writes, and test it with a real agent.Intermediate · 22 minOct 11, 2026
  27. 27LLM 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
  28. 28AI Agent Notifications: Webhook and Slack Alerts in PythonGet alerted when your AI agent fails a tool call, hits a guardrail or budget, or needs approval. Webhooks, Slack and Python callbacks, with real payloads.Intermediate · 25 minOct 11, 2026
  29. 29Deploy AI Agents in Production: Long-Running Python AgentsRun an AI agent as a long-lived Python process: cron and webhook triggers, state between runs, a journal, budgets that pause it, and honest limits.Intermediate · 15 minOct 11, 2026
  30. 30System Prompt Best Practices for AI Agents in PythonBuild agent system prompts from reusable blocks, switch them by conversation phase, and test them like code. Real Python runs, honest limits.Intermediate · 24 minOct 11, 2026
  31. 31AI Agent Guardrails in Python: Block Injection, Redact PIIAdd guardrails to an AI agent in Python: block prompt injection, redact PII and leaked API keys, add custom rules, and test it all. Real runs, real misses.Intermediate · 19 minOct 11, 2026
  32. 32AI 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
  33. 33Self-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
  34. 34How to Test LLM Prompts and AI Agents in PythonUnit test LLM prompts with pytest, catch prompt regressions in CI, grade outputs with an LLM judge and evaluate agent tool calls. Real runs, real costs.Intermediate · 24 minOct 11, 2026
  35. 35Build a Multi-Agent System in Python (and When Not To)Build a coordinator that delegates to specialist AI agents in Python, trace every call, and see what a multi-agent system really costs.Intermediate · 24 minOct 11, 2026
  36. 36MCP Server Caching, Timeouts and Circuit Breakers in PythonKeep an MCP server fast when its API is flaky: caching, retries with backoff, timeouts, a circuit breaker and limits, with real before and after numbers.Intermediate · 23 minOct 11, 2026
  37. 37Event-Driven AI Agents: Webhook, Cron and File TriggersRun an AI agent on a GitHub webhook, a cron schedule or a new file, with signed webhooks and real prompt-injection tests. Python code that runs.Intermediate · 22 minOct 11, 2026
  38. 38MCP Long-Running Tasks: Background Jobs in PythonRun slow MCP tools as background jobs in Python: submit, poll progress, retry failures and cancel, with a real agent, real runs and honest limits.Intermediate · 19 minOct 11, 2026
  39. 39Too Many MCP Tools? LLM Tool Selection, MeasuredWhat 122 tools do to an LLM agent's accuracy, tokens and latency, measured, and how semantic tool selection fixes it in Python, with honest limits.Intermediate · 18 minOct 11, 2026
  40. 40AI Agent Observability: Trace Tool Calls, Tokens and CostTrace every LLM call and tool call your AI agent makes, with tokens, latency and cost, then use the trace to find the exact step that went wrong.Intermediate · 18 minOct 11, 2026
  41. 41AI Agent YAML: Define and Run an Agent From a Config FileDefine an AI agent in a YAML file: model, instructions and MCP servers. Validate it, run it from the CLI or Python, keep secrets out, review it in Git.Intermediate · 18 minOct 11, 2026
  42. 42Best LLM for AI Agents: Test and Switch Models in PythonFind the best LLM for your AI agent with a tool-calling eval, then switch between OpenAI, Anthropic, Azure, Bedrock, Gemini and Ollama in one line.Intermediate · 22 minOct 11, 2026
  43. 43MCP Server Monitoring: Prometheus, OpenTelemetry and LogsMonitor an MCP server in Python: Prometheus metrics, JSON logs, OpenTelemetry traces and alerts that show which tools are slow, failing or abused.Intermediate · 20 minOct 11, 2026
  44. 44Approval Fatigue: Auto-Approve Safe AI Agent ActionsStop rubber-stamping AI agent actions. Auto-approve routine tool calls with rules, send only risky ones to a human, and log why. Real Python runs.Intermediate · 21 minOct 11, 2026
  45. 45OpenAPI to MCP: Turn Any REST API into an MCP ServerTurn an OpenAPI spec into a working MCP server in minutes. Read-only by default, human approval on every write, and tested by a real agent.Intermediate · 15 minOct 11, 2026
  46. 46AI Agent Human in the Loop: Approve Tool Calls in PythonMake your AI agent ask a human before it refunds, emails or deletes. Approve or reject tool calls in Python, with real runs and honest limits.Intermediate · 20 minOct 11, 2026
  47. 47Agentic 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
  48. 48AI Agent Code Execution Sandbox: Run LLM Code SafelyLet an AI agent write and run Python in a Docker sandbox: analyse a CSV, try real escape attempts, set limits, and learn where the sandbox stops.Intermediate · 18 minOct 11, 2026
  49. 49MCP Tools vs Resources vs Prompts (With Python Examples)When to use an MCP tool, resource or prompt, and how to build each in Python: resource templates, prompt arguments, tests and feeding them to an agent.Intermediate · 20 minOct 11, 2026

Prompt Engineering21

  1. 50Can LLMs Simulate Users? Role-Play, Personas and LimitsCan LLMs simulate users or customers? The simulator view of LLMs, what research says about personas, two real role-plays that went wrong, and fixes.Intermediate · 5 minOct 18, 2026
  2. 51Does AI Boost Productivity? The LLM as Cognitive MultiplierDoes AI make you more productive? What field studies show about the jagged frontier, and how to use an LLM to sharpen your judgment. Real plan example.Intermediate · 5 minOct 18, 2026
  3. 52How LLMs Generate Text: Next-Token Probabilities ExplainedHow LLMs generate text one token at a time: probabilities, temperature, top-p, and why early words commit the rest. Real example of a verdict-first error.Intermediate · 5 minOct 18, 2026
  4. 53Why LLM Output Is Untrusted Input: Design for InjectionWhy to treat LLM output as untrusted: indirect prompt injection, OWASP LLM risks, a real injected support ticket, and design rules that contain the damage.Intermediate · 5 minOct 18, 2026
  5. 54Why LLMs Mirror You: Sycophancy, Bias and Leading PromptsWhy LLMs agree with you: sycophancy from human-feedback training and bias from human text. Prompts that get honest feedback, with a real rating example.Intermediate · 5 minOct 18, 2026
  6. 55How LLM Tool Calling Works: The Model Never Runs ToolsHow LLM tool calling works: the model writes a request, your code runs it. A real two-step refund exchange and design rules for tools, results and gates.Intermediate · 4 minOct 18, 2026
  7. 56Prompts as Code: The LLM as a Probabilistic CompilerTreat prompts as code: write specs, enforce output shape with structured outputs, surface assumptions and test every change. Real date-extraction example.Intermediate · 5 minOct 18, 2026
  8. 57Prompts as Interfaces: Design Prompts Like API ContractsDesign prompts like API contracts: delimited inputs, a fixed output, a defined failure path, versions and tests. A real classifier prompt before and after.Intermediate · 4 minOct 18, 2026
  9. 58LLM as a Judge vs a Jury: Making AI Evaluations ReliableLLM-as-a-judge explained: position, length and self-preference bias, and how a jury of swapped orders, rubrics and mixed models fixes it. Real example.Intermediate · 5 minOct 18, 2026
  10. 59Why LLMs Fail Modified Puzzles: Pattern-Matching BiasWhy LLMs answer the famous version of a changed puzzle: training-data priors, research on counterfactual tasks, a real failure and how to prompt around it.Intermediate · 5 minOct 18, 2026
  11. 60How Context Shapes LLM Output: The Model Continues ItWhy LLMs copy the patterns in your context, flaws included: next-token prediction, Codex and multi-turn research, a real example and three fixes.Intermediate · 4 minOct 18, 2026
  12. 61Why LLMs Get Niche Facts Wrong: Popularity and Training DataWhy LLMs know popular facts but invent niche ones: accuracy tracks how often a fact appears in training data. When to retrieve instead. Real example.Intermediate · 5 minOct 18, 2026
  13. 62AI Code Hallucinations: Why Plausible Output Fools YouWhy LLM code looks right but fails: plausibility vs correctness, hallucinated packages, a real regex that broke, and how to verify output by running it.Intermediate · 4 minOct 18, 2026
  14. 63Are LLMs Black Boxes? What You Can and Can't InspectAre LLMs black boxes? Why model explanations can hide the real cause, and what you can inspect instead: context, tool calls, counterfactual tests.Intermediate · 5 minOct 18, 2026
  15. 64LLMs as Lossy Compression: Why They Can't Quote ExactlyWhy an LLM is a lossy compression of its training data: it keeps gist and loses exact wording, quotes and URLs. What to ask it for, with a real example.Intermediate · 4 minOct 18, 2026
  16. 65Why LLMs Give Similar Answers (and How to Get Variety)Why LLMs repeat the same kind of answer: mode collapse after RLHF. Get real variety with sets, named axes and verbalized sampling. Real naming example.Intermediate · 5 minOct 18, 2026
  17. 66ReAct Agent From Scratch in Python: The Reason-Act LoopBuild a ReAct agent from scratch in Python: the Thought, Action, Observation loop, a 60-line controller with a real trace, and how it maps to tool calling.Intermediate · 8 minOct 18, 2026
  18. 67Long-Form LLM Writing: Control Length, Structure, StyleGenerate long-form content with an LLM: outlines with word budgets, one section per call, style rules you can check in code. Real 1,200-word example.Intermediate · 8 minOct 18, 2026
  19. 68Long-Context Prompting: Placement, Structure and RAGLong-context prompting tactics: where to put documents and the question, how to tag sources, quote-then-answer, and when to retrieve instead of stuffing.Intermediate · 8 minOct 18, 2026
  20. 69What Are PAL and Program-of-Thought Prompting?PAL and Program-of-Thought prompting explained: the model writes code, an interpreter computes the answer. How they differ, when to use them, real example.Intermediate · 7 minOct 18, 2026
  21. 70LLM Routing: When to Use a Small vs Large ModelLLM routing explained: rules, LLM routers, learned routers and cascades to send each request to the cheapest model that works. A real router misroute.Intermediate · 7 minOct 18, 2026

LLM Security6

  1. 71LLM Output Validation: Check Responses Before You Use ThemValidate LLM output before you act on it: schema, grounding and consistency checks, safe handling of links, SQL and HTML, and when to retry or escalate.Intermediate · 10 minOct 18, 2026
  2. 72LLM Supply Chain Security: Models, Packages, Data and ToolsLLM supply chain security as a checklist: inventory models, data and tools, pin and verify hashes, load safe formats, check provenance and plan fallbacks.Intermediate · 9 minOct 18, 2026
  3. 73LLM Input Validation: Why Regex Fails and What WorksValidate LLM input in layers: limits, Unicode normalization, field rules and a scope classifier. Real examples of regex failing and what catches attacks.Intermediate · 9 minOct 18, 2026
  4. 74LLM Security Monitoring: Detect Attacks With Audit LogsMonitor LLM apps for attacks: what security events to log, which signals mean trouble, detection rules in Python, and alerting without alert fatigue.Intermediate · 10 minOct 18, 2026
  5. 75LLM Security Checklist for Production SystemsAn LLM security checklist for production: prompts and secrets, injection, RAG access, output handling, tools, dependencies, limits, monitoring, sign-off.Intermediate · 10 minOct 18, 2026
  6. 76LLM Security Risks: The OWASP Top 10 for LLM Apps ExplainedMap the LLM attack surface: each OWASP Top 10 for LLM apps risk with an example and first defense, how attacks chain, and which controls to build first.Intermediate · 11 minOct 18, 2026

Prompt Security2

  1. 77Secrets in Prompts: System Prompt Leakage and Safe PatternsWhy API keys and access rules in a system prompt leak, a real extraction attempt, and patterns that keep secrets in tools, code and secret managers.Intermediate · 9 minOct 18, 2026
  2. 78Secure Prompt Design: Separate Instructions From DataSecure prompt design: keep untrusted text as data with message roles, delimiters, spotlighting, explicit rules and output schemas. A real before and after.Intermediate · 9 minOct 18, 2026

Compliance1

  1. 79EU AI Act for LLM Developers: Obligations and Dates (2026)What the EU AI Act means for LLM developers: roles, risk categories, Article 50 transparency, high-risk and GPAI duties, and dates after the 2026 Omnibus.Intermediate · 14 minOct 18, 2026

LLM Systems1

  1. 80LLM Agent Orchestration Patterns: Supervisor, HandoffLLM agent orchestration patterns: single agent, chaining, routing, supervisor-workers and handoffs. When each fits and what the controller must enforce.Intermediate · 8 minOct 18, 2026
[n.02/02]> go further

Topics at this level

  • Model Context Protocol (MCP)24
  • LLM Mental Models16
  • Evals and Testing12
  • Cost Control8
  • Observability8
  • Prompt Injection8
  • Tool Calling8
  • Guardrails7
  • Agent Runtime6
  • How LLMs Work6

Other levels

  • Beginner guides36
  • Advanced guides24

Categories

  • AI Engineering71
  • Prompt Engineering54
  • LLM Security10

Search every guide.

The library lists all guides with filters for topic, level, category and reading time.

All guidesLearning paths