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

AI engineering guides: building AI agents in Python

These guides are about building software around language models: AI agents that call tools, the MCP servers that provide those tools, and everything needed to run them in production. Each one explains a concept and then shows runnable Python code using Promptise Foundry, an open-source agent framework, though the ideas carry over to other frameworks.

Topics run from a first agent and connecting MCP servers, through memory, retrieval, reasoning patterns and multi-agent systems, to guardrails, human approval, observability, evals, cost control and deployment. Beginner guides assume you know Python but not agents. For a guided route, the topic hubs put related guides in reading order.

147
guides
20
Beginner
106
Intermediate
21
Advanced
43 h
of reading
01

Start here

ReAct Agent Pattern: Tool Execution Loop Explained Simply

The ReAct agent pattern explained simply: what an agent does after it calls a tool, a loop written by hand, the same agent in Promptise, where it breaks.

Beginner · 14 minRead the guide →

146 guides

Beginner19

  1. 01Leaked LLM API Key? Rotate and Audit in 30 MinutesLeaked an OpenAI, Anthropic or other LLM API key? A 30-minute checklist: revoke and rotate, check usage and spend, find the source, and stop the next leak.Beginner · 8 minGuardrails and securityBeginner · 8 minGuardrails and security→
  2. 02AI Agent Monitoring Dashboard in the TerminalMonitor AI agents in a terminal dashboard: process states, triggers, context state, logs and events, plus commands to suspend, resume and inject runs.Beginner · 15 minRuntime, triggers and deploymentBeginner · 15 minRuntime, triggers and deployment→
  3. 03What Is an Agentic Runtime? AI Agent Runtimes ExplainedAn agentic runtime runs AI agents as long-lived processes with triggers, state, crash recovery and budgets. See how it differs from frameworks and hosts.Beginner · 13 minRuntime, triggers and deploymentBeginner · 13 minRuntime, triggers and deployment→
  4. 04LangChain vs MCP: Differences and How They Work TogetherLangChain vs MCP: MCP is a protocol that serves tools, LangChain is an agent framework. How they differ, when to use each, and a runnable MCP agent.Beginner · 16 minTools and the Model Context Protocol (MCP)Beginner · 16 minTools and the Model Context Protocol (MCP)→
  5. 05What Is MCP (Model Context Protocol)? A Developer's GuideWhat MCP is and how it works: hosts, clients, servers, tools, resources, transports and SDK 2.x. Build a small MCP server and connect an agent to it.Beginner · 18 minTools and the Model Context Protocol (MCP)Beginner · 18 minTools and the Model Context Protocol (MCP)→
  6. 06What Is an LLM Guardrail? Types, Examples and LimitsWhat an LLM guardrail is: a check on what goes into and out of a model. Input, output and tool guardrails, a real example, and what guardrails can't do.Beginner · 7 minGuardrails and securityBeginner · 7 minGuardrails and security→
  7. 07OpenRouter AI Agent with MCP: Many Models in PromptiseBuild an OpenRouter AI agent with MCP tools: one key for many models, route only to providers that support tools, add attribution headers, and fix errors.Beginner · 11 minModels and providersBeginner · 11 minModels and providers→
  8. 08How to Run, Debug and Deploy an AI Agent in PythonRun, debug and deploy a Python AI agent project with one command: a package.json-style manifest, live traces, a terminal UI, JSON logs and an API.Beginner · 15 minObservability and debuggingBeginner · 15 minObservability and debugging→
  9. 09What Is an AI Agent Framework? When You Need OneWhat an AI agent framework does: the tool loop, model access, limits, approvals and tracing. When you need one and when plain API calls are enough.Beginner · 7 minFrameworks and comparisonsBeginner · 7 minFrameworks and comparisons→
  10. 10Gemini AI Agent with MCP: Use Google Models in PromptiseBuild a Gemini AI agent with MCP tools: get an AI Studio key, pick a current model id, set reasoning effort, use Vertex AI on Google Cloud, fix errors.Beginner · 11 minModels and providersBeginner · 11 minModels and providers→
  11. 11What Is an AI Agent? Definition, How It Works, ExamplesWhat an AI agent is: a model that calls tools in a loop until a goal is met. How the loop works, a real example, agents vs chatbots and workflows, FAQs.Beginner · 7 minBuilding AI agents in PythonBeginner · 7 minBuilding AI agents in Python→
  12. 12Azure OpenAI Agent with MCP: Use Deployments in PromptiseBuild an Azure OpenAI agent with MCP tools: deployment vs model name, endpoint, API version or the v1 API, Entra ID sign-in, and fixes for common errors.Beginner · 12 minModels and providersBeginner · 12 minModels and providers→
  13. 13What 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 minMemory, context and RAGBeginner · 7 minMemory, context and RAG→
  14. 14What Is Tool Calling? LLM Function Calling ExplainedWhat tool calling (function calling) is: how an LLM asks your code to run a function, the JSON schema it sees, parallel calls, and how it differs from MCP.Beginner · 7 minTools and the Model Context Protocol (MCP)Beginner · 7 minTools and the Model Context Protocol (MCP)→
  15. 15Claude AI Agent with MCP: Use Anthropic Models in PromptiseBuild a Claude AI agent with MCP tools: set the Anthropic key and model id, use effort instead of temperature, add prompt caching, and fix common errors.Beginner · 11 minModels and providersBeginner · 11 minModels and providers→
  16. 16Ollama AI Agent with MCP: Run Local Models in PromptiseRun an AI agent on a local Ollama model with MCP tools: pick a tool-calling model, set the context length, reach a remote Ollama, and fix common errors.Beginner · 11 minModels and providersBeginner · 11 minModels and providers→
  17. 17What Is Human in the Loop AI? Approvals for AI AgentsWhat human in the loop AI means for agents: a person approves risky tool calls before they run. How approval gates work, an example, and common mistakes.Beginner · 7 minHuman approvals (human-in-the-loop)Beginner · 7 minHuman approvals (human-in-the-loop)→
  18. 18How to Build an AI Agent in Python (2026 Guide)Build an AI agent in Python step by step: write the tool loop, serve tools over MCP, add model fallback, approvals and limits. Runnable code, real output.Beginner · 20 minBuilding AI agents in PythonBeginner · 20 minBuilding AI agents in Python→
  19. 19How to Connect MCP Servers to Your AI Agent in PythonGive your AI agent real tools with the Model Context Protocol. Connect local and remote MCP servers to a Python agent, step by step, with code you can run.Beginner · 12 minTools and the Model Context Protocol (MCP)Beginner · 12 minTools and the Model Context Protocol (MCP)→

Intermediate106

  1. 20Tool Parameters Array Type Must Have Items: The FixFix the tool parameters array type must have items error: why VS Code and strict providers reject MCP tool schemas, and how to fix and test them.Intermediate · 12 minTools and the Model Context Protocol (MCP)Intermediate · 12 minTools and the Model Context Protocol (MCP)→
  2. 21Who Decides When an AI Agent Is Done? Checks and JudgesWho decides when an AI agent is done? Stop conditions, self-checks, success criteria in code, a separate LLM judge and budgets as a backstop, with code.Intermediate · 16 minTesting and evalsIntermediate · 16 minTesting and evals→
  3. 22Scheduled AI Agent With Push Notifications (ntfy, Pushover)Build a scheduled AI agent with push notifications: a cron trigger, a notify tool for ntfy or Pushover, budgets, and alerts only when something changed.Intermediate · 18 minRuntime, triggers and deploymentIntermediate · 18 minRuntime, triggers and deployment→
  4. 23How to Revoke an AI Agent's Credentials: Incident StepsHow to revoke an AI agent's credentials: stop the agent, revoke API keys, OAuth tokens, cloud roles and MCP keys, end sessions, verify and audit.Intermediate · 18 minGuardrails and securityIntermediate · 18 minGuardrails and security→
  5. 24Microsoft Agent Framework Alternatives (2026), ComparedMicrosoft Agent Framework alternatives compared: LangGraph, OpenAI Agents SDK, Pydantic AI, Google ADK, CrewAI and Promptise, plus LangGraph in Foundry.Intermediate · 18 minFrameworks and comparisonsIntermediate · 18 minFrameworks and comparisons→
  6. 25Tool 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 minMemory, context and RAGIntermediate · 16 minMemory, context and RAG→
  7. 26AI Agent Approval Timeouts: Fail Closed, Default DenyWhat should happen when nobody approves an AI agent's tool call? Deny on timeout, never cache consent, bind each approval to one call, escalate in time.Intermediate · 18 minHuman approvals (human-in-the-loop)Intermediate · 18 minHuman approvals (human-in-the-loop)→
  8. 27Parallel Coding Agents on One Repo: Avoid ConflictsHow to run parallel coding agents on one repo without conflicts: a git worktree per agent, scoped tasks, lockfile fixes, and merging one branch at a time.Intermediate · 17 minMulti-agent systemsIntermediate · 17 minMulti-agent systems→
  9. 28Idempotent Tool Calls: Make AI Agent Retries SafeIdempotent tool calls make AI agent retries safe: where retries come from, why timeouts duplicate actions, and how to add idempotency keys, with real code.Intermediate · 18 minTools and the Model Context Protocol (MCP)Intermediate · 18 minTools and the Model Context Protocol (MCP)→
  10. 29Reasoning Effort for AI Agents: When High HurtsReasoning effort for AI agents: how low, medium, high and xhigh work at OpenAI, Anthropic and Google, when high effort hurts, and how to measure it.Intermediate · 15 minModels and providersIntermediate · 15 minModels and providers→
  11. 30Run Coding Agents in Dev Containers SafelyHow to run coding agents like Claude Code and Codex in a dev container safely: an egress allowlist, no sudo, read-only Git hooks, and checks that prove it.Intermediate · 18 minGuardrails and securityIntermediate · 18 minGuardrails and security→
  12. 31Vectorless 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 minMemory, context and RAGIntermediate · 18 minMemory, context and RAG→
  13. 32Source 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 minMemory, context and RAGIntermediate · 16 minMemory, context and RAG→
  14. 33Decision Models for AI Agents: Route, Gate and ClassifyDecision models for AI agents return probabilities, not text. Learn how they work and how to route, gate and classify with them, with runnable Python code.Intermediate · 20 minModels and providersIntermediate · 20 minModels and providers→
  15. 34LiteLLM Alternatives: LLM Gateways Compared (2026)LiteLLM alternatives in 2026: Bifrost, Portkey, Agent Router, Kong and managed LLM gateways compared, how to migrate, and when you need no gateway.Intermediate · 18 minModels and providersIntermediate · 18 minModels and providers→
  16. 35How 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 minMemory, context and RAGIntermediate · 20 minMemory, context and RAG→
  17. 36Hidden Text Prompt Injection: Sanitize Pages for AI AgentsStop hidden text prompt injection: strip CSS-hidden text, comments and invisible characters from web pages, scan what is left, and limit agent tools.Intermediate · 18 minGuardrails and securityIntermediate · 18 minGuardrails and security→
  18. 37How to Review AI-Generated Code: A Practical ChecklistHow to review AI-generated code: a checklist for intent, tests, invented APIs and packages, security and dead code, plus a script for the first pass.Intermediate · 18 minTesting and evalsIntermediate · 18 minTesting and evals→
  19. 38AI Agent Tool Failures: Stop Unsafe WorkaroundsWhen a tool fails, AI agents improvise and reach the same data another way. Stop unsafe workarounds with clear errors, narrow tools and deny rules.Intermediate · 16 minTools and the Model Context Protocol (MCP)Intermediate · 16 minTools and the Model Context Protocol (MCP)→
  20. 39Per-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 minMemory, context and RAGIntermediate · 18 minMemory, context and RAG→
  21. 40Stop Secrets Leaking Into LLM Logs and TracesHow API keys and tokens end up in LLM logs and traces, and how to redact them from tool results, observability and log lines before anything is stored.Intermediate · 18 minGuardrails and securityIntermediate · 18 minGuardrails and security→
  22. 41uv Dependency Cooldowns and Pins for Python AI AppsSet a uv dependency cooldown with exclude-newer, pin exact versions in a hashed lockfile and install only from it, so a poisoned release never reaches you.Intermediate · 8 minGuardrails and securityIntermediate · 8 minGuardrails and security→
  23. 42Jev vs Clef vs OpenAI Decisions API Compared (2026)Jev vs Clef vs OpenAI Decisions API, from each vendor's docs: prices, limits, request formats, images and self-hosting, plus how to test them on your data.Intermediate · 18 minModels and providersIntermediate · 18 minModels and providers→
  24. 43Build a Personal AI Agent: Memory, Reminders, ChatBuild a personal AI agent you host: chat over a signed webhook, memory that survives restarts, and reminders on a cron trigger, with runnable code.Intermediate · 25 minBuilding AI agents in PythonIntermediate · 25 minBuilding AI agents in Python→
  25. 44Agent Skills vs MCP Tools: When to Use EachAgent Skills vs MCP tools: what SKILL.md skills and MCP servers are, how each uses context and permissions, when to use which, and an agent using both.Intermediate · 16 minTools and the Model Context Protocol (MCP)Intermediate · 16 minTools and the Model Context Protocol (MCP)→
  26. 45Small Local Models for Tool Calling: What BreaksWhy small local models fail at tool calling: templates, parser bugs, short context, bad arguments and loops, with a fix for each and a runnable replay.Intermediate · 18 minModels and providersIntermediate · 18 minModels and providers→
  27. 46Make Your SaaS Agent-Ready: MCP, OpenAPI or BothMake your SaaS agent-ready: when to ship an MCP server, an OpenAPI spec or both, what to expose to agents, how auth works, and a runnable example.Intermediate · 18 minTools and the Model Context Protocol (MCP)Intermediate · 18 minTools and the Model Context Protocol (MCP)→
  28. 47AI Agent Irreversible Actions: Cap Destructive Tool CallsLimit destructive actions by an AI agent: mark tools irreversible, cap them per run, add human approval, audit refusals, and know what rewind can't undo.Intermediate · 20 minRuntime, triggers and deploymentIntermediate · 20 minRuntime, triggers and deployment→
  29. 48Multi-Agent Event Bus: Chain Agents With EventsConnect AI agents with a pub/sub event bus: topics and wildcards, chaining agents on events and failures, full queues, and LangGraph and CrewAI compared.Intermediate · 20 minRuntime, triggers and deploymentIntermediate · 20 minRuntime, triggers and deployment→
  30. 49AI Agent Event Filters: Skip Runs Before the LLMFilter events before the LLM call in an AI agent: a safe expression language, Python function filters, errors caught at config time, and LLM calls saved.Intermediate · 16 minRuntime, triggers and deploymentIntermediate · 16 minRuntime, triggers and deployment→
  31. 50AI Agent Manifest: Declare a Long-Running Agent in YAMLDeclare a long-running AI agent in a YAML manifest: tools, triggers, state, journal, budgets and hooks, with strict validation and real CLI output.Intermediate · 20 minRuntime, triggers and deploymentIntermediate · 20 minRuntime, triggers and deployment→
  32. 51AI Agent Retries and a Dead Letter Queue for Failed RunsRetry failed AI agent runs with exponential backoff, catch what still fails in a dead letter queue, redeliver it, and keep tool side effects idempotent.Intermediate · 20 minRuntime, triggers and deploymentIntermediate · 20 minRuntime, triggers and deployment→
  33. 52AI Agent Escalation: Page a Human When Limits HitMake an AI agent escalate to a human when a budget, health check or mission judge trips: targets, payloads, and routing to Slack or PagerDuty via a relay.Intermediate · 18 minRuntime, triggers and deploymentIntermediate · 18 minRuntime, triggers and deployment→
  34. 53AI Agent CLI: Start, Stop and Inspect Running AgentsRun AI agents from the command line: start a runtime in the background, check status, follow logs, restart, stop and rewind. Real terminal output.Intermediate · 20 minRuntime, triggers and deploymentIntermediate · 20 minRuntime, triggers and deployment→
  35. 54Test Autonomous AI Agents Without Waiting for TriggersTest a scheduled or event-driven AI agent in pytest: inject ticks, script the model, freeze the clock, and assert on journal, dead letters and hooks.Intermediate · 20 minRuntime, triggers and deploymentIntermediate · 20 minRuntime, triggers and deployment→
  36. 55AI Agent Lifecycle Hooks: Run Code on Agent EventsAI agent lifecycle hooks: run code when an agent starts, queues a task, builds a prompt or is refused. Block, rewrite, shell hooks and fail-closed rules.Intermediate · 20 minRuntime, triggers and deploymentIntermediate · 20 minRuntime, triggers and deployment→
  37. 56Rewind an AI Agent: Roll Back State and ConversationRewind an AI agent to an earlier point: roll back its state and conversation from the journal, preview the plan, and compare with LangGraph time travel.Intermediate · 18 minRuntime, triggers and deploymentIntermediate · 18 minRuntime, triggers and deployment→
  38. 57Best AI Agent Observability Tools (2026), ComparedThe best AI agent observability tools in 2026 compared: LangSmith, Langfuse, Phoenix, Datadog and more on tool tracing, cost, evals, PII, OTel and price.Intermediate · 20 minObservability and debuggingIntermediate · 20 minObservability and debugging→
  39. 58Best Local LLM for AI Agents: Ollama Models by GPU (2026)The best local LLM for AI agents by GPU size: Ollama models that call tools well, VRAM and context needs, LM Studio and vLLM setup, and the pitfalls.Intermediate · 20 minModels and providersIntermediate · 20 minModels and providers→
  40. 59AI-Based PII Detection and Redaction Tools for LLM AppsAI-based PII detection and redaction for LLMs: regex, NER, Presidio, cloud DLP and LLM detectors compared, with code to mask prompts, tool output and logs.Intermediate · 20 minGuardrails and securityIntermediate · 20 minGuardrails and security→
  41. 60FastMCP Alternatives for Production MCP Servers (2026)FastMCP alternatives compared: the official MCP Python and TypeScript SDKs, Promptise Foundry and more, for auth, multi-tenancy, observability and deploys.Intermediate · 16 minTools and the Model Context Protocol (MCP)Intermediate · 16 minTools and the Model Context Protocol (MCP)→
  42. 61NeMo Guardrails vs Guardrails AI: Which to Choose (2026)NeMo Guardrails vs Guardrails AI compared: validators vs Colang rails, setup, model-call cost, license, the same PII check in both, and a decision table.Intermediate · 18 minGuardrails and securityIntermediate · 18 minGuardrails and security→
  43. 62LangChain Alternatives: 11 Agent Frameworks Compared (2026)Compare 11 LangChain alternatives for AI agents, from LangGraph and Pydantic AI to CrewAI: features, the same agent in four, and how to migrate.Intermediate · 20 minFrameworks and comparisonsIntermediate · 20 minFrameworks and comparisons→
  44. 63MCP Middleware for Servers: Auth, Logging, Rate LimitsMCP middleware adds auth, audit logs, rate limits, caching and timeouts to every tool call. How the pipeline and ordering work in FastMCP and Promptise.Intermediate · 18 minTools and the Model Context Protocol (MCP)Intermediate · 18 minTools and the Model Context Protocol (MCP)→
  45. 64AutoGen Docker Task Isolation: Secure the Code ExecutorSet up AutoGen Docker task isolation: configure DockerCommandLineCodeExecutor, run one container per task, cut the network, set limits and fix errors.Intermediate · 20 minGuardrails and securityIntermediate · 20 minGuardrails and security→
  46. 65Best LLM Guardrails Tools (2026): 9 Platforms ComparedThe best LLM guardrails platforms in 2026 compared: NeMo, Guardrails AI, Azure, Bedrock, Lakera and more on injection, PII, latency, offline use and cost.Intermediate · 20 minGuardrails and securityIntermediate · 20 minGuardrails and security→
  47. 66AI Agent Health Monitoring: Catch Silent FailuresMonitor AI agent behavior in production: catch empty replies, rising error rates, stuck calls and loops, then log, pause or escalate. Real output.Intermediate · 18 minRuntime, triggers and deploymentIntermediate · 18 minRuntime, triggers and deployment→
  48. 67AI Agent Webhook Trigger: Run an Agent on HTTP EventsTrigger an AI agent from a webhook: HMAC signatures for GitHub and Stripe, replay protection, response codes, filters and payload injection scans.Intermediate · 20 minRuntime, triggers and deploymentIntermediate · 20 minRuntime, triggers and deployment→
  49. 68AI Agent File Watcher: Process New Files AutomaticallyRun an AI agent when files land in a folder: events, debouncing, half-written files, archiving processed files and avoiding loops. Code and real output.Intermediate · 18 minRuntime, triggers and deploymentIntermediate · 18 minRuntime, triggers and deployment→
  50. 69AI Agent Auto-Restart: Restart Policies and TimeoutsAuto-restart an AI agent on failure: restart policies, backoff, restart limits, run timeouts and lifetime recycling, plus an alert when it gives up.Intermediate · 18 minRuntime, triggers and deploymentIntermediate · 18 minRuntime, triggers and deployment→
  51. 70Run Multiple AI Agents: One Runtime, Many ProcessesRun multiple AI agents in one runtime: add and remove processes, load manifests, share notifications, contain failures and shut down cleanly on SIGTERM.Intermediate · 18 minRuntime, triggers and deploymentIntermediate · 18 minRuntime, triggers and deployment→
  52. 71AI Agent Secrets Management: Scoped, Expiring CredentialsManage AI agent secrets safely: scope credentials per agent, expire and rotate them, keep them out of prompts and logs, and audit each access. Real output.Intermediate · 17 minRuntime, triggers and deploymentIntermediate · 17 minRuntime, triggers and deployment→
  53. 72Pause and Resume an AI Agent: Lifecycle States ExplainedPause and resume a running AI agent: the eight lifecycle states, valid transitions, suspend and resume from code or HTTP, and what happens to queued work.Intermediate · 16 minRuntime, triggers and deploymentIntermediate · 16 minRuntime, triggers and deployment→
  54. 73Goal-Driven AI Agents: Missions With an LLM JudgeGive an AI agent a goal and let an LLM judge decide when it is done: success criteria, confidence thresholds, limits and costs. Runnable code, real output.Intermediate · 18 minRuntime, triggers and deploymentIntermediate · 18 minRuntime, triggers and deployment→
  55. 74Message a Running AI Agent: Inbox, Directives and AskSend instructions to a running AI agent without a restart: directives, context, corrections and questions, with TTLs, rate limits and safe scanning.Intermediate · 16 minRuntime, triggers and deploymentIntermediate · 16 minRuntime, triggers and deployment→
  56. 75AI Agent State Between Runs: Context, Keys and AuditKeep AI agent state between runs: a key-value context with writable keys and an audit trail, how it differs from memory, and how to recover it on restart.Intermediate · 17 minRuntime, triggers and deploymentIntermediate · 17 minRuntime, triggers and deployment→
  57. 76AI Agent Control API: Manage Running Agents Over HTTPManage running AI agents over HTTP: deploy, stop and restart them, patch budgets and prompts, send messages, and secure the API. Real curl calls.Intermediate · 20 minRuntime, triggers and deploymentIntermediate · 20 minRuntime, triggers and deployment→
  58. 77AI Agent Cron Jobs: Run an Agent on a ScheduleRun an AI agent on a cron schedule: time zones and DST, runs that overlap, missed ticks, idempotent jobs, and tests that don't wait. Real output.Intermediate · 18 minRuntime, triggers and deploymentIntermediate · 18 minRuntime, triggers and deployment→
  59. 78AI 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 minTesting and evalsIntermediate · 18 minTesting and evals→
  60. 79AI 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 minObservability and debuggingIntermediate · 16 minObservability and debugging→
  61. 80AI 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 minGuardrails and securityIntermediate · 17 minGuardrails and security→
  62. 81Migrate from AutoGen: Agent Framework, AG2 and MoreAutoGen is archived. Compare migration paths (Microsoft Agent Framework, AG2, Promptise), map agents, group chats and termination, and port an example.Intermediate · 18 minMulti-agent systemsIntermediate · 18 minMulti-agent systems→
  63. 82CrewAI 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 minMulti-agent systemsIntermediate · 17 minMulti-agent systems→
  64. 83How to Deploy an AI Agent with Docker (2026 Guide)Deploy an AI agent with Docker: a Dockerfile, env vars and secrets, health checks, graceful shutdown, and docker compose with the agent's MCP server.Intermediate · 18 minTools and the Model Context Protocol (MCP)Intermediate · 18 minTools and the Model Context Protocol (MCP)→
  65. 84LangGraph 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 minFrameworks and comparisonsIntermediate · 18 minFrameworks and comparisons→
  66. 85AI 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 minTools and the Model Context Protocol (MCP)Intermediate · 18 minTools and the Model Context Protocol (MCP)→
  67. 86How 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 minObservability and debuggingIntermediate · 20 minObservability and debugging→
  68. 87AI 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 minObservability and debuggingIntermediate · 18 minObservability and debugging→
  69. 88What 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 minBuilding AI agents in PythonIntermediate · 18 minBuilding AI agents in Python→
  70. 89MCP 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 minTools and the Model Context Protocol (MCP)Intermediate · 20 minTools and the Model Context Protocol (MCP)→
  71. 90AI Agent Reasoning Patterns in Python: From ReAct to DebateHow AI agent reasoning patterns work, from ReAct to plan-and-execute, reflection, debate and code-action, and how to choose and switch them in Python.Intermediate · 15 minAgent reasoning patternsIntermediate · 15 minAgent reasoning patterns→
  72. 91Build 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 minTools and the Model Context Protocol (MCP)Intermediate · 25 minTools and the Model Context Protocol (MCP)→
  73. 92Best AI Agent Frameworks (2026): Python Options ComparedThe best AI agent frameworks in 2026 by use case: LangGraph, Pydantic AI, OpenAI Agents SDK, CrewAI, Google ADK and more, with the same agent in nine.Intermediate · 24 minTools and the Model Context Protocol (MCP)Intermediate · 24 minTools and the Model Context Protocol (MCP)→
  74. 93Durable 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 minRuntime, triggers and deploymentIntermediate · 16 minRuntime, triggers and deployment→
  75. 94MCP 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 minTools and the Model Context Protocol (MCP)Intermediate · 20 minTools and the Model Context Protocol (MCP)→
  76. 95AI 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 minCost control and rate limitsIntermediate · 18 minCost control and rate limits→
  77. 96AI 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 minTools and the Model Context Protocol (MCP)Intermediate · 15 minTools and the Model Context Protocol (MCP)→
  78. 97Testing 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 minTools and the Model Context Protocol (MCP)Intermediate · 16 minTools and the Model Context Protocol (MCP)→
  79. 98LLM 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 minTools and the Model Context Protocol (MCP)Intermediate · 14 minTools and the Model Context Protocol (MCP)→
  80. 99Context 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 minTools and the Model Context Protocol (MCP)Intermediate · 26 minTools and the Model Context Protocol (MCP)→
  81. 100Build 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 minTools and the Model Context Protocol (MCP)Intermediate · 18 minTools and the Model Context Protocol (MCP)→
  82. 101Streaming 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 minBuilding AI agents in PythonIntermediate · 14 minBuilding AI agents in Python→
  83. 102MCP 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 minTools and the Model Context Protocol (MCP)Intermediate · 22 minTools and the Model Context Protocol (MCP)→
  84. 103LLM 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 minModels and providersIntermediate · 23 minModels and providers→
  85. 104AI 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 minHuman approvals (human-in-the-loop)Intermediate · 25 minHuman approvals (human-in-the-loop)→
  86. 105Deploy 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 minRuntime, triggers and deploymentIntermediate · 15 minRuntime, triggers and deployment→
  87. 106System 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 minBuilding AI agents in PythonIntermediate · 24 minBuilding AI agents in Python→
  88. 107AI Agent Guardrails in Python: Block Injection, Redact PIIAdd guardrails to an AI agent in Python: block prompt injection, redact PII and leaked API keys, write custom rules, and test them against real attacks.Intermediate · 19 minGuardrails and securityIntermediate · 19 minGuardrails and security→
  89. 108AI 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 minMemory, context and RAGIntermediate · 18 minMemory, context and RAG→
  90. 109Self-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 minTools and the Model Context Protocol (MCP)Intermediate · 22 minTools and the Model Context Protocol (MCP)→
  91. 110How 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 check which tools an AI agent calls, in Python.Intermediate · 24 minTesting and evalsIntermediate · 24 minTesting and evals→
  92. 111Build 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 minTools and the Model Context Protocol (MCP)Intermediate · 24 minTools and the Model Context Protocol (MCP)→
  93. 112MCP 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 minTools and the Model Context Protocol (MCP)Intermediate · 23 minTools and the Model Context Protocol (MCP)→
  94. 113Event-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 minRuntime, triggers and deploymentIntermediate · 22 minRuntime, triggers and deployment→
  95. 114MCP 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 minTools and the Model Context Protocol (MCP)Intermediate · 19 minTools and the Model Context Protocol (MCP)→
  96. 115Too Many MCP Tools? How to Fix LLM Tool Selection in PythonToo many MCP tools cost tokens and lead an LLM agent to the wrong one. Learn how semantic tool selection works, how to check it offline and how to tune it.Intermediate · 18 minTools and the Model Context Protocol (MCP)Intermediate · 18 minTools and the Model Context Protocol (MCP)→
  97. 116AI 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 minObservability and debuggingIntermediate · 18 minObservability and debugging→
  98. 117AI 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 minBuilding AI agents in PythonIntermediate · 18 minBuilding AI agents in Python→
  99. 118Best LLM for AI Agents (2026): Picks, Prices, How to TestThe best LLM for AI agents in 2026 by use case, from public agent benchmarks and vendor prices, why the boards disagree, and how to test models yourself.Intermediate · 20 minBuilding AI agents in PythonIntermediate · 20 minBuilding AI agents in Python→
  100. 119MCP 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 minTools and the Model Context Protocol (MCP)Intermediate · 20 minTools and the Model Context Protocol (MCP)→
  101. 120Approval 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 minGuardrails and securityIntermediate · 21 minGuardrails and security→
  102. 121OpenAPI 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 minTools and the Model Context Protocol (MCP)Intermediate · 15 minTools and the Model Context Protocol (MCP)→
  103. 122AI Agent Human in the Loop: Approve Tool Calls in PythonAdd human-in-the-loop approval to an AI agent in Python: a person approves, rejects or edits each refund, email or delete before the tool runs.Intermediate · 20 minTools and the Model Context Protocol (MCP)Intermediate · 20 minTools and the Model Context Protocol (MCP)→
  104. 123Agentic 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 minMemory, context and RAGIntermediate · 21 minMemory, context and RAG→
  105. 124AI 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 minGuardrails and securityIntermediate · 18 minGuardrails and security→
  106. 125MCP 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 minTools and the Model Context Protocol (MCP)Intermediate · 20 minTools and the Model Context Protocol (MCP)→

Advanced21

  1. 126SPIFFE vs AWS IAM Roles vs Entra ID for AI AgentsSPIFFE vs AWS IAM roles vs Entra ID for AI agents: what an SVID is, how each gives an agent its own identity, and how to federate them, with runnable code.Advanced · 18 minGuardrails and securityAdvanced · 18 minGuardrails and security→
  2. 127Policy as Code for AI Agent Tool Calls: OPA vs ApprovalPolicy as code for AI agent tool calls: when deterministic rules beat human approval or model judgment, and how to check each call with OPA before it runs.Advanced · 20 minHuman approvals (human-in-the-loop)Advanced · 20 minHuman approvals (human-in-the-loop)→
  3. 128LangChain Multi-Tenant Isolation: Tenants, Quotas, MemoryLangChain multi-tenant isolation: what LangChain and LangGraph provide, what you build yourself, per-tenant rate limits and quotas, and the Promptise way.Advanced · 20 minGuardrails and securityAdvanced · 20 minGuardrails and security→
  4. 129Audit-Grade Agent Traces Without Storing Prompt ContentAudit-grade agent traces without storing prompt content: what to record, keyed digests, hash chains, per-tenant keys, verification and a tamper check.Advanced · 18 minObservability and debuggingAdvanced · 18 minObservability and debugging→
  5. 130Does the Harness Matter? Test One Model Across HarnessesDoes the agent harness matter? How to test one model across coding agent harnesses fairly, with hidden tests, repeated trials and one meter for token cost.Advanced · 20 minTesting and evalsAdvanced · 20 minTesting and evals→
  6. 131AI Agent Kill Switch: Detect, Downgrade and Stop an AgentAn AI agent kill switch that works: detect bursts and loops, downgrade the agent to read-only, pause or stop it over an API, and revoke its credentials.Advanced · 18 minRuntime, triggers and deploymentAdvanced · 18 minRuntime, triggers and deployment→
  7. 132On-Behalf-Of Auth for AI Agents: Act as Each UserHow AI agents act on behalf of each user: OAuth token exchange (RFC 8693), audience-bound tokens, the act claim, and a runnable MCP example with output.Advanced · 22 minGuardrails and securityAdvanced · 22 minGuardrails and security→
  8. 133Context 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 minMemory, context and RAGAdvanced · 20 minMemory, context and RAG→
  9. 134MCP 2026-07-28 Migration: Make Your MCP Server StatelessMigrate an MCP server to the stateless 2026-07-28 spec: what changed, how to replace sessions and elicitation, and a runnable before and after in Python.Advanced · 22 minTools and the Model Context Protocol (MCP)Advanced · 22 minTools and the Model Context Protocol (MCP)→
  10. 135AI Agent Network Egress: Limit Where Agents Can ConnectLimit AI agent network egress: give agent code no network, route the rest through an allowlist proxy, and make tools refuse private IPs and redirects.Advanced · 18 minGuardrails and securityAdvanced · 18 minGuardrails and security→
  11. 136LLM Confidence Calibration: Test Scores on a Labeled SetLLM confidence calibration on a labeled set: measure Brier score and reliability, compare stated confidence, logprobs and decision models, then fix it.Advanced · 25 minModels and providersAdvanced · 25 minModels and providers→
  12. 137Custom AI Agent Triggers: Wake an Agent From Any SourceBuild a custom AI agent trigger for any queue or source: the trigger protocol, registering a type, acknowledging jobs, clean stops and use in manifests.Advanced · 22 minRuntime, triggers and deploymentAdvanced · 22 minRuntime, triggers and deployment→
  13. 138Distributed AI Agents: Run Agents Across Many MachinesRun AI agents across multiple servers: a coordinator, node registration, health checks and remote control, and what to do when one node dies.Advanced · 22 minRuntime, triggers and deploymentAdvanced · 22 minRuntime, triggers and deployment→
  14. 139SPIFFE for AI Agents: Workload Identity Without API KeysUse SPIFFE and SPIRE for AI agent identity: X.509 vs JWT-SVIDs, calling APIs and MCP servers, cloud workload identity compared, with runnable code.Advanced · 20 minGuardrails and securityAdvanced · 20 minGuardrails and security→
  15. 140Code-Action Agents in Python: One Program vs 37 Tool CallsBuild a code-action agent in Python over an MCP server: the model writes one program that calls your tools in a Docker sandbox, within a budget you set.Advanced · 15 minTools and the Model Context Protocol (MCP)Advanced · 15 minTools and the Model Context Protocol (MCP)→
  16. 141Autonomous AI Agent Runtime: Budgets, Crash Recovery, APIRun an autonomous AI agent runtime in Python: budgets for irreversible actions, restarts, kill -9 recovery, missions and an API, tested on real runs.Advanced · 18 minRuntime, triggers and deploymentAdvanced · 18 minRuntime, triggers and deployment→
  17. 142Self-Modifying AI Agent in Python: Open Mode & LimitsBuild a self-modifying AI agent in Python with Promptise open mode: meta-tools, hot reload, the guardrails that bound it, and the limits to plan for.Advanced · 16 minAgent reasoning patternsAdvanced · 16 minAgent reasoning patterns→
  18. 143MCP Authentication in Python: API Keys, JWT and OAuthMCP authentication in Python on one server: API keys, JWTs and OAuth client credentials with JWKS, plus roles, scopes, 401s and agent token forwarding.Advanced · 20 minTools and the Model Context Protocol (MCP)Advanced · 20 minTools and the Model Context Protocol (MCP)→
  19. 144AI Agent Identity: Authenticate Agents to MCP ServersGive your AI agent its own verifiable identity: short-lived JWTs from your IdP, checked by MCP servers with JWKS. Real runs, refresh and honest limits.Advanced · 22 minTools and the Model Context Protocol (MCP)Advanced · 22 minTools and the Model Context Protocol (MCP)→
  20. 145Plan-and-Execute Agents in Python: Beyond the ReAct LoopBuild a plan, act, verify, reflect agent in Python with the Promptise Reasoning Graph, then compare it with ReAct on one task: accuracy, calls, tokens.Advanced · 15 minAgent reasoning patternsAdvanced · 15 minAgent reasoning patterns→
  21. 146Multi-Tenant AI Agents: Keep Each Customer's Data ApartBuild a multi-tenant AI agent in Python: per-user tokens, tenant-scoped MCP tools and isolated sessions, with runs proving one tenant can't read another.Advanced · 18 minTools and the Model Context Protocol (MCP)Advanced · 18 minTools and the Model Context Protocol (MCP)→

Topics in this category

  • Model Context Protocol (MCP)51
  • Deployment40
  • Tool Calling29
  • Observability22
  • Cost Control21
  • Human-in-the-Loop19
  • Authentication and Access Control18
  • Evals and Testing17
  • Model Selection and Routing16
  • Guardrails15

Topic hubs

  • Runtime, triggers and deployment→
  • Tools and the Model Context Protocol (MCP)→
  • Guardrails and security→
  • Frameworks and comparisons→
  • Models and providers→
  • Memory, context and RAG→

Other categories

  • Prompt Engineering54
  • AI at Work18
  • AI Leadership12
  • LLM Security10
  • Enterprise AI8

Search every guide.

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

All guidesLearning paths