Promptise Foundry: the foundation layer for agentic intelligence
PyPI Python 3.10 to 3.13 Tests License: Apache 2.0 Docs GitHub stars **[Website](https://www.promptise.com)**  ·  **[Docs](https://docs.promptise.com/)**  ·  **[Quick start](https://docs.promptise.com/getting-started/quickstart/)**  ·  **[How it works](https://www.promptise.com/how-it-works)**  ·  **[Examples](https://docs.promptise.com/resources/examples/)**  ·  **[Discussions](https://github.com/promptise-com/foundry/discussions)**

## What Promptise is **The framework for agentic intelligence.** Promptise gives you everything an agentic system needs, in one place and working together from the first line: agents that think, safe ways for them to act in your systems, and a harness that keeps them running and accountable. You decide what your agent should do; Promptise takes care of everything around it. Start with one agent on your laptop and grow it into a fleet running real work, with the same framework and the same way of building all the way through. No rewrite in between, and nothing to stitch together yourself.
The three parts of every agentic system: Agent, Interface and Harness
| Layer | What it does for you | |---|---| | **Agent** · *it thinks* | Agents that work through a task step by step, check their own work and get it right. | | **Interface** · *it acts* | Safe access to your tools, your data and the systems you already run. | | **Harness** · *it operates* | Keeps your agents running around the clock, within budget, and accountable for everything they do. |
## Get started in 30 seconds ```bash pip install promptise export OPENAI_API_KEY=sk-... ``` ```python import asyncio from promptise import build_agent, tool @tool def order_status(order_id: str) -> dict: """Look up the status of an order.""" return {"order_id": order_id, "status": "shipped", "eta": "Friday"} async def main(): agent = await build_agent( model="openai:gpt-5-mini", instructions="You are a helpful support assistant.", extra_tools=[order_status], observe=True, # traces every step, token and cost ) result = await agent.ainvoke( {"messages": [{"role": "user", "content": "Where is order A-1001?"}]} ) print(result["messages"][-1].content) await agent.shutdown() asyncio.run(main()) ``` Any Python function with `@tool` becomes a tool; its type hints are the schema. To give the agent the tools of an MCP server, add it to `servers`; the agent discovers its tools by itself: ```python from promptise.config import HTTPServerSpec agent = await build_agent( model="openai:gpt-5-mini", servers={"tools": HTTPServerSpec(url="http://localhost:8000/mcp")}, ) ``` To start a full project instead, run `promptise init --project my-bot`. **Any model, one string.** `openai:gpt-5-mini` · `anthropic:claude-sonnet-4-5` · `azure:chat-prod` · `gemini:gemini-2.5-pro` · `bedrock:…` · `ollama:llama3.1`. The same string works in `build_agent()`, `.superagent` files and every CLI command, and `promptise models check ` tells you exactly what a provider still needs. → [Model setup](https://docs.promptise.com/getting-started/model-setup/)
## Run your project `promptise.toml` is to an agent project what `package.json` is to a Node project: it names the `main` file, the scripts and the environment the project needs. `promptise run` runs your program like `python main.py`; with dev tools, the terminal UI or the HTTP API it also instruments every agent the program builds, with no code changes. ```bash promptise init --project my-bot # promptise.toml, agent.py, main.py, .env.example promptise run # run main.py with the project's environment promptise run --devtools # live traces, tool calls, tokens and cost promptise run --tui # the full terminal UI promptise run --serve # an HTTP API for your agent promptise run --prod # JSON logs, preflight checks, graceful SIGTERM ``` `[scripts]` work like npm scripts (`promptise run dev`), and `--watch` restarts on every save. → [Projects & promptise run](https://docs.promptise.com/core/projects/) promptise run --tui: the chat with an agent, its tool calls inline, and live tokens and cost in the header
## One request, through the whole system A customer writes in at three in the morning. The runtime wakes the agent, its identity is established, the input is checked, it gathers context, plans, calls a tool through MCP, a person approves the refund, it checks its own work, answers, and every step lands in the audit trail.
One customer request handled across the Interface, Agent and Harness layers

Walk through all fourteen steps, with every module linked →


## Already have an API? MCPcast it. ```bash promptise mcpcast openapi.yaml --profile standard --auth env-token ``` MCPcast reads an OpenAPI or Swagger document and writes a real, reviewed MCP server: a small set of tools an agent can actually use, chosen and described for agents. Reads by default; writes only when you ask, and every one of them **approval-gated on the server**, so a person signs off before anything changes, whichever MCP client calls it.
MCPcast turns an OpenAPI spec into a reviewed MCP server
What comes out is a project, not a script: an installable package, a launcher, a generated test suite, `pyproject.toml`, a `Dockerfile` and a README, all regenerated from `mcpcast.plan.yaml`, the one file you edit. `--eval` grades the result A to F with a real agent before you ship, and plain `promptise mcpcast` opens a [guided setup](https://docs.promptise.com/mcpcast/guided-setup/) in the terminal. Above: the real output for the Swagger Petstore spec. → [MCPcast, end to end](https://docs.promptise.com/mcpcast/)
## Built for governance and structure For people and teams who need their agentic systems to be accountable: who did what, on whose behalf, within which limits. These are part of the framework, not something you add later. - **Multi-tenant, by construction.** Tag a request with a tenant, and every place data lives — [memory](https://docs.promptise.com/core/memory/), [cache](https://docs.promptise.com/core/cache/), [conversations](https://docs.promptise.com/core/conversations/), rate limits, [audit](https://docs.promptise.com/mcp/server/observability/) — stays separated per tenant. Two tenants who both have a user named `alice` can never see each other's data. It's a structural rule, not a filter you have to remember on every query. → [Multi-Tenant Platform guide](https://docs.promptise.com/guides/secure-multi-tenant-platform/) - **Human approval, enforced on the server.** Mark a tool as needing sign-off and the approval is required no matter which app calls it — including one you didn't write. Denies on timeout, rejects self-approval, records who approved what. → [Approval Gates](https://docs.promptise.com/mcp/server/approval-gates/) - **A real identity for each agent.** Agents authenticate as themselves to the APIs they call, backed by Microsoft Entra ID, AWS, Google Cloud, SPIFFE, or plain OIDC — so you can retire the shared API key, and every action traces to the person it acted for, even across agents calling agents. → [Agent Identity](https://docs.promptise.com/identity/overview/) - **Audit you can hand to a reviewer.** Every action is written to a tamper-evident chain, tied to the tenant and the user. Delete one user's cached answers, memories and recorded events with `purge_user()` when they ask. → [Auth & Security](https://docs.promptise.com/mcp/server/auth-security/) - **Runs offline.** The security models, embeddings, and vector store can all run locally — so the whole stack works air-gapped, for on-premises and regulated environments where data can't leave. → [Guardrails](https://docs.promptise.com/core/guardrails/) · [Model Setup](https://docs.promptise.com/getting-started/model-setup/)
## Everything Promptise ships
AGENT  ·  it thinks
**The Promptise Agent** One function turns any model into a production agent. [Explore →](https://docs.promptise.com/core/) `Setup`   [Build](https://docs.promptise.com/core/agents/building-agents/) · [Server config](https://docs.promptise.com/core/agents/server-specs/) · [Network server](https://docs.promptise.com/core/agents/network-server/) · [SuperAgent files](https://docs.promptise.com/core/agents/superagent-files/) · [Custom patterns](https://docs.promptise.com/core/agents/reasoning-patterns/) · [Cross-agent](https://docs.promptise.com/core/agents/cross-agent/) `Memory & state`   [Memory](https://docs.promptise.com/core/memory/) · [RAG](https://docs.promptise.com/core/rag/) · [Conversations](https://docs.promptise.com/core/conversations/) · [Semantic cache](https://docs.promptise.com/core/cache/) · [Context engine](https://docs.promptise.com/core/context-engine/) `Security`   [Guardrails](https://docs.promptise.com/core/guardrails/) · [Approval](https://docs.promptise.com/core/approval/) · [Auto-approval](https://docs.promptise.com/core/approval-classifier/) · [Sandbox](https://docs.promptise.com/core/sandbox/) `Performance`   [Tool optimization](https://docs.promptise.com/core/tool-optimization/) · [Fallback](https://docs.promptise.com/core/fallback/) · [Adaptive strategy](https://docs.promptise.com/core/adaptive-strategy/) `Execution`   [Streaming](https://docs.promptise.com/core/streaming/) · [Events](https://docs.promptise.com/core/events/) · [Observability](https://docs.promptise.com/core/observability/) `Reference`   [Config](https://docs.promptise.com/core/config/) · [Types](https://docs.promptise.com/core/types/) · [Default prompt](https://docs.promptise.com/core/default-prompt/) · [Callbacks](https://docs.promptise.com/core/callback-handler/) · [Tools](https://docs.promptise.com/core/tools/) · [Env resolver](https://docs.promptise.com/core/env-resolver/) · [Exceptions](https://docs.promptise.com/core/exceptions/) · [CLI](https://docs.promptise.com/core/cli/)
**Reasoning Engine** Reasoning as a graph you can read and change. [Explore →](https://docs.promptise.com/core/engine/) `Graph`   [Overview](https://docs.promptise.com/core/engine/) · [Nodes](https://docs.promptise.com/core/engine-nodes/) · [Edges](https://docs.promptise.com/core/engine-edges/) · [Flags](https://docs.promptise.com/core/engine-flags/) · [Internals](https://docs.promptise.com/core/engine-internals/) `Patterns & skills`   [Prebuilt patterns](https://docs.promptise.com/core/engine-prebuilts/) · [Skills](https://docs.promptise.com/core/engine-skills/) · [Skill registry](https://docs.promptise.com/core/skill-registry/) · [Custom reasoning](https://docs.promptise.com/guides/custom-reasoning/) `Runtime`   [Tool injection](https://docs.promptise.com/core/engine-tools/) · [Processors](https://docs.promptise.com/core/engine-processors/) · [Hooks](https://docs.promptise.com/core/engine-hooks/) · [Serialization](https://docs.promptise.com/core/engine-serialization/)
**Prompt Engineering** Prompts built like software, versioned and tested. [Explore →](https://docs.promptise.com/prompting/) `Build`   [PromptBlocks](https://docs.promptise.com/prompting/blocks/) · [ConversationFlow](https://docs.promptise.com/prompting/flows/) · [Builder](https://docs.promptise.com/prompting/builder/) · [Loader & templates](https://docs.promptise.com/prompting/loader-templates/) · [Shell injection](https://docs.promptise.com/prompting/shell-interpolation/) `Strategies`   [Strategies](https://docs.promptise.com/prompting/strategies/) · [Chaining](https://docs.promptise.com/prompting/chaining/) · [Context & variables](https://docs.promptise.com/prompting/context/) `Quality`   [Guards](https://docs.promptise.com/prompting/guards/) · [Inspector](https://docs.promptise.com/prompting/inspector/) · [Testing](https://docs.promptise.com/prompting/testing/) · [Suite & registry](https://docs.promptise.com/prompting/suite-registry/)
INTERFACE  ·  it acts
**MCP Server, Client & MCPcast** Build a tool once; every agent can use it. [Explore →](https://docs.promptise.com/mcp/) `Server`   [Guide](https://docs.promptise.com/guides/production-mcp-servers/) · [MCPcast an existing API](https://docs.promptise.com/mcp/server/mcpcast/) · [Fundamentals](https://docs.promptise.com/mcp/server/building-servers/) · [Routers & middleware](https://docs.promptise.com/mcp/server/routers-middleware/) · [Auth & security](https://docs.promptise.com/mcp/server/auth-security/) · [Multi-tenancy](https://docs.promptise.com/mcp/server/multi-tenancy/) · [Approval gates](https://docs.promptise.com/mcp/server/approval-gates/) · [Production](https://docs.promptise.com/mcp/server/production-features/) · [Caching](https://docs.promptise.com/mcp/server/caching-performance/) · [Observability](https://docs.promptise.com/mcp/server/observability/) · [Resilience](https://docs.promptise.com/mcp/server/resilience-patterns/) · [Queue](https://docs.promptise.com/mcp/server/queue/) · [Advanced](https://docs.promptise.com/mcp/server/advanced-patterns/) · [Deployment](https://docs.promptise.com/mcp/server/deployment/) · [Testing](https://docs.promptise.com/mcp/server/testing/) `Client`   [Guide](https://docs.promptise.com/mcp/client/) · [Tool adapter](https://docs.promptise.com/mcp/client/tool-adapter/)
HARNESS  ·  it operates
**Agent Runtime** Run agents unattended, on budget, recoverable. [Explore →](https://docs.promptise.com/runtime/) `Core`   [Processes](https://docs.promptise.com/runtime/processes/) · [Orchestration API](https://docs.promptise.com/runtime/api/) · [Manager](https://docs.promptise.com/runtime/runtime-manager/) · [Context & state](https://docs.promptise.com/runtime/context/) · [Lifecycle](https://docs.promptise.com/runtime/lifecycle/) · [Hooks](https://docs.promptise.com/runtime/hooks/) · [Conversation](https://docs.promptise.com/runtime/conversation/) `Governance`   [Mission](https://docs.promptise.com/runtime/governance/mission/) · [Budget](https://docs.promptise.com/runtime/governance/budget/) · [Health](https://docs.promptise.com/runtime/governance/health/) · [Secrets](https://docs.promptise.com/runtime/governance/secrets/) `Triggers`   [Overview](https://docs.promptise.com/runtime/triggers/) · [Cron](https://docs.promptise.com/runtime/triggers/cron/) · [Event & webhook](https://docs.promptise.com/runtime/triggers/event-webhook/) · [File watch](https://docs.promptise.com/runtime/triggers/file-watch/) `Journal & recovery`   [Overview](https://docs.promptise.com/runtime/journal/) · [Backends](https://docs.promptise.com/runtime/journal/backends/) · [Replay](https://docs.promptise.com/runtime/journal/replay/) · [Rewind](https://docs.promptise.com/runtime/journal/rewind/) `Config & scale`   [Options](https://docs.promptise.com/runtime/configuration/) · [Manifests](https://docs.promptise.com/runtime/manifests/) · [Meta-tools](https://docs.promptise.com/runtime/meta-tools/) · [Coordinator](https://docs.promptise.com/runtime/distributed/coordinator/) · [Discovery](https://docs.promptise.com/runtime/distributed/discovery-transport/) · [Dashboard](https://docs.promptise.com/runtime/dashboard/) · [CLI](https://docs.promptise.com/runtime/cli/)
**Agent Identity** An authenticated identity for every agent. [Explore →](https://docs.promptise.com/identity/overview/) `Core`   [Overview](https://docs.promptise.com/identity/overview/) · [Quickstart](https://docs.promptise.com/identity/quickstart/) · [Guide](https://docs.promptise.com/identity/guide/) · [Architecture](https://docs.promptise.com/identity/architecture/) · [Security](https://docs.promptise.com/identity/security/) · [Migration](https://docs.promptise.com/identity/migration/) `Providers`   [Microsoft Entra ID](https://docs.promptise.com/identity/providers/entra/) · [AWS IAM](https://docs.promptise.com/identity/providers/aws/) · [Google Cloud](https://docs.promptise.com/identity/providers/gcp/) · [SPIFFE / SPIRE](https://docs.promptise.com/identity/providers/spiffe/) · [Generic OIDC](https://docs.promptise.com/identity/providers/oidc/)
ALSO IN THE DOCS
Guides & labs [Building agents](https://docs.promptise.com/guides/building-agents/) · [Context lifecycle](https://docs.promptise.com/guides/context-lifecycle/) · [Code-action](https://docs.promptise.com/guides/code-action/) · [Production MCP servers](https://docs.promptise.com/guides/production-mcp-servers/) · [Agentic runtime](https://docs.promptise.com/guides/agentic-runtime/) · [Prompt engineering](https://docs.promptise.com/guides/prompt-engineering/) · [Multi-user systems](https://docs.promptise.com/guides/multi-user-systems/) · [Agent-to-MCP identity](https://docs.promptise.com/guides/multi-user-identity/) · [Secure multi-tenant platform](https://docs.promptise.com/guides/secure-multi-tenant-platform/) · [Multi-agent coordination](https://docs.promptise.com/guides/multi-agent-teams/)  •  **Labs:** [Customer support](https://docs.promptise.com/guides/lab-customer-support/) · [Data analysis](https://docs.promptise.com/guides/lab-data-analysis/) · [Code review](https://docs.promptise.com/guides/lab-code-review/) · [Pipeline observer](https://docs.promptise.com/guides/lab-pipeline-observer/)
API reference [Agent](https://docs.promptise.com/api/agent/) · [Config](https://docs.promptise.com/api/config/) · [Memory](https://docs.promptise.com/api/memory/) · [RAG](https://docs.promptise.com/api/rag/) · [Sandbox](https://docs.promptise.com/api/sandbox/) · [Observability](https://docs.promptise.com/api/observability/) · [Identity](https://docs.promptise.com/api/identity/) · [MCP server](https://docs.promptise.com/api/mcp-server/) · [MCP client](https://docs.promptise.com/api/mcp-client/) · [Prompts](https://docs.promptise.com/api/prompts/) · [Runtime](https://docs.promptise.com/api/runtime/) · [Cross-agent](https://docs.promptise.com/api/cross-agent/) · [SuperAgent](https://docs.promptise.com/api/superagent/) · [Utilities](https://docs.promptise.com/api/utilities/)
Start here [Installation](https://docs.promptise.com/) · [Extras](https://docs.promptise.com/getting-started/installation-extras/) · [Quick start](https://docs.promptise.com/getting-started/quickstart/) · [Cookbook](https://docs.promptise.com/getting-started/cookbook/) · [Why Promptise](https://docs.promptise.com/getting-started/why-promptise/) · [What is MCP?](https://docs.promptise.com/getting-started/what-is-mcp/) · [Model setup](https://docs.promptise.com/getting-started/model-setup/) · [Best LLMs](https://www.promptise.com/guides/view/best-llm-for-ai-agents) · [Key concepts](https://docs.promptise.com/getting-started/concepts/) · [Glossary](https://docs.promptise.com/getting-started/glossary/)  •  **More:** [Blog](https://docs.promptise.com/blog/) · [Showcase](https://docs.promptise.com/resources/showcase/) · [Examples](https://docs.promptise.com/resources/examples/) · [Migration](https://docs.promptise.com/resources/migration/) · [Changelog](https://docs.promptise.com/resources/changelog/) · [FAQ](https://docs.promptise.com/faq/) · [Contributing](https://docs.promptise.com/resources/contributing/)

## Works with what you already run | Area | Works with | |---|---| | **Models** | [OpenAI](https://openai.com) · [Anthropic](https://www.anthropic.com) · [Azure OpenAI & AI Foundry](https://ai.azure.com) · [Gemini & Vertex AI](https://ai.google.dev) · [Bedrock](https://aws.amazon.com/bedrock/) · [Mistral](https://mistral.ai) · [Groq](https://groq.com) · [Ollama](https://ollama.com) · [Hugging Face](https://huggingface.co) · any LangChain chat model · `FallbackChain` for failover → [Model setup](https://docs.promptise.com/getting-started/model-setup/) | | **Memory & vectors** | [ChromaDB](https://www.trychroma.com) · [Mem0](https://mem0.ai) · [Sentence Transformers](https://www.sbert.net) · local embeddings for air-gapped installs → [Memory](https://docs.promptise.com/core/memory/) | | **Conversations** | [PostgreSQL](https://www.postgresql.org) · [Redis](https://redis.io) · [SQLite](https://sqlite.org) · in-memory, with session ownership enforced → [Conversations](https://docs.promptise.com/core/conversations/) | | **Identity & auth** | [Microsoft Entra ID](https://www.microsoft.com/security/business/identity-access/microsoft-entra-id) · [AWS IAM](https://aws.amazon.com/iam/) · [Google Cloud](https://cloud.google.com) · [SPIFFE / SPIRE](https://spiffe.io) · [OIDC](https://openid.net/connect/) · JWT · OAuth 2.0 → [Agent Identity](https://docs.promptise.com/identity/overview/) | | **Observability** | [OpenTelemetry](https://opentelemetry.io) · [Prometheus](https://prometheus.io) · [Slack](https://slack.com) · [PagerDuty](https://www.pagerduty.com) · webhook · HTML · JSON · console → [Observability](https://docs.promptise.com/core/observability/) | | **Sandbox & deploy** | [Docker](https://www.docker.com) · [gVisor](https://gvisor.dev) · seccomp · capability dropping · [Kubernetes](https://kubernetes.io) health probes → [Sandbox](https://docs.promptise.com/core/sandbox/) | | **Protocols** | [Model Context Protocol](https://modelcontextprotocol.io) over stdio, streamable HTTP and SSE · [OpenAPI](https://www.openapis.org) · HMAC-chained audit logs |
---
**[Contributing](CONTRIBUTING.md)**  ·  **[Security](SECURITY.md)**  ·  **[Changelog](CHANGELOG.md)**  ·  **[License: Apache 2.0](LICENSE)** Built by Promptise · questions and ideas in Discussions · bugs in Issues Formerly DeepMCPAgent, a public preview of one part of this framework (MCP-native agent tooling).