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

← Learning paths> AI Engineering· featured
Intermediate path

Agentic Engineering with Promptise Foundry

Start the pathAll paths

The complete path to building AI agents in Python with Promptise Foundry, from your first agent to production. You start with what an agent is and how to build one, give it tools through the Model Context Protocol, add memory and retrieval, and choose reasoning patterns. Then you make it safe and dependable: guardrails, prompt injection defense, human approvals, tracing and debugging, cost limits and evals. The path ends with running agents in production: triggers, crash recovery, deployment and the promptise run project runner. Every guide explains one concept and shows runnable code.

71
Lessons
20.6 h
Reading time
Intermediate
Level
Free
Cost

The lessons

71 lessons

Read the lessons in order; they are arranged so each one prepares the next. Every lesson is a guide, so you can also open any of them on its own.

  1. [01]What 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 minOpen →
  2. [02]How 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 minOpen →
  3. [03]What 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 minOpen →
  4. [04]System 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 minOpen →
  5. [05]Best 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 minOpen →
  6. [06]AI 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 minOpen →
  7. [07]Streaming 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 minOpen →
  8. [08]Claude 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 minOpen →
  9. [09]Gemini 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 minOpen →
  10. [10]Azure 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 minOpen →
  11. [11]OpenRouter 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 minOpen →
  12. [12]Ollama 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 minOpen →
  13. [13]LLM 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 minOpen →
  14. [14]What 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 minOpen →
  15. [15]What 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 minOpen →
  16. [16]MCP 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 minOpen →
  17. [17]How 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 minOpen →
  18. [18]Build 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 minOpen →
  19. [19]MCP 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 minOpen →
  20. [20]FastAPI 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 minOpen →
  21. [21]OpenAPI 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 minOpen →
  22. [22]MCP 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 minOpen →
  23. [23]Build 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 minOpen →
  24. [24]MCP 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 minOpen →
  25. [25]Testing 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 minOpen →
  26. [26]Too 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 minOpen →
  27. [27]MCP 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 minOpen →
  28. [28]MCP 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 minOpen →
  29. [29]AI 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 minOpen →
  30. [30]AI 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 minOpen →
  31. [31]AI 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 minOpen →
  32. [32]Build 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 minOpen →
  33. [33]Context 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 minOpen →
  34. [34]How 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 minOpen →
  35. [35]LLM 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 minOpen →
  36. [36]MCP 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 minOpen →
  37. [37]MCP 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 minOpen →
  38. [38]Python 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 minOpen →
  39. [39]Self-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 minOpen →
  40. [40]AI 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 minOpen →
  41. [41]Code-Action Agents in Python: One Program vs 37 Tool CallsBuild a code-action agent in Python over an MCP server, test it against ReAct in 60 runs, and see why a tool budget set too low returns wrong answers.Advanced · 15 minOpen →
  42. [42]Multi-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 minOpen →
  43. [43]What 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 minOpen →
  44. [44]AI 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 minOpen →
  45. [45]Agentic 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 minOpen →
  46. [46]AI 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 minOpen →
  47. [47]Plan-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 minOpen →
  48. [48]Self-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 honest measured limits.Advanced · 16 minOpen →
  49. [49]CrewAI 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 minOpen →
  50. [50]Migrate 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 minOpen →
  51. [51]What 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 minOpen →
  52. [52]AI 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 minOpen →
  53. [53]AI 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 minOpen →
  54. [54]AI 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 minOpen →
  55. [55]Approval 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 minOpen →
  56. [56]What 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 minOpen →
  57. [57]AI 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 minOpen →
  58. [58]AI 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 minOpen →
  59. [59]AI 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 minOpen →
  60. [60]How 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 minOpen →
  61. [61]AI 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 minOpen →
  62. [62]How 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 minOpen →
  63. [63]AI 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 minOpen →
  64. [64]How 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 minOpen →
  65. [65]AI 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 minOpen →
  66. [66]Autonomous 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 minOpen →
  67. [67]Event-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 minOpen →
  68. [68]Durable 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 minOpen →
  69. [69]Deploy 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 minOpen →
  70. [70]What 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 minOpen →
  71. [71]LangGraph 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 minOpen →
Start lesson 01

Before you start

  • Comfortable writing Python (functions, async/await, virtual environments).
  • Basic idea of how large language models and prompts work.
  • An API key for a model provider such as OpenAI or Anthropic to run the examples.
  • No prior agent framework experience needed.

Skills you build

  • Building AI agents in Python
  • Tool calling and MCP servers
  • Agent memory and RAG
  • Agent reasoning patterns
  • Multi-agent systems
  • Guardrails and prompt injection defense
  • Human-in-the-loop approvals
  • Observability and debugging
  • Cost control
  • Testing and evals
  • Agent runtime and triggers
  • Deploying agents to production

By the end, you can

  1. 01Build a tool-using AI agent in Python with build_agent()
  2. 02Connect agents to MCP servers and build your own production MCP server
  3. 03Give agents memory and retrieval-augmented generation
  4. 04Pick and compose reasoning patterns and multi-agent setups
  5. 05Protect agents with guardrails, prompt injection defenses and human approvals
  6. 06Trace, debug and control the cost of every LLM and tool call
  7. 07Test agents with evals before you ship
  8. 08Run agents in production with triggers, crash recovery, promptise run and an HTTP API

Ready when you are.

71 lessons, in order. Each opens with the full list beside it, so you always know where you are and what comes next.

Start the pathThe guide library