# Repository Briefing: promptise-com/Foundry
> Source: https://repoforai.com/repo/promptise-com/Foundry (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/promptise-com/Foundry
- **Official Docs / Website**: https://www.promptise.com/
- **Category**: Agents & Frameworks (智能体与框架)
- **Primary Language**: Python
- **License**: Apache-2.0
- **Engineering Health**: A+ (94/100 · Maintenance 35/35 · Adoption 19/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v1.12.0 (2026-12-03) — https://github.com/promptise-com/Foundry/releases
- **Review Snapshot**: 2026-12-03 (Note: v1.12.0 on 2026-12-03 shipped after this review; verify latest release notes)
- **Deployment / Stack Signals**: CLI, MCP, API, Docker
- **Momentum**: 898 ★ total (+1 24h / +1 7d) · 136 forks
- **Topics**: `agent-framework`, `agent-runtime`, `agentic-ai`, `agents`, `ai`, `ai-agents`, `ai-framework`, `artificial-intelligence`, `autonomous-agents`, `context`, `context-engineering`, `developer-tools`
- **When to Use**: Best for: Teams deploying tool-using assistants that need shared identity, tenant-scoped state, approval for sensitive writes and auditable operations. Skip if: A small stateless assistant needs only a few function calls, or your existing orchestration and policy stack already provides these controls.

## Overview
```text
### Architecture & Core Mechanics
Foundry is a Python SDK and runtime split into agent execution, tool interfaces and an operational harness. The async `build_agent` entrypoint combines model selection and instructions with native `@tool` functions or dynamically discovered MCP tools. Python type hints define native tool schemas; `ainvoke` drives a message-based run, and `shutdown` closes the agent. Input checks, tool calls, approval and audit can all be part of the same request path.

The `promptise` package uses a setuptools build backend with `setuptools-scm` for versioning and supports LangChain chat models. `promptise.toml` defines the project entry file, scripts and environment. `promptise run` executes that entry file and can instrument agents created by the program, so local debugging and HTTP serving do not require separate agent implementations. The MCP interface supports stdio, streamable HTTP and SSE.

### Key Capabilities & Differentiators
Model integrations span hosted providers such as OpenAI, Anthropic, Azure OpenAI, Gemini and Bedrock, as well as Ollama and Hugging Face. `FallbackChain` supports model failover. Conversation storage can use PostgreSQL, Redis, SQLite or memory; ChromaDB, Mem0 and Sentence Transformers are available for memory and embedding workflows. Traces expose tool calls, token use and cost, with OpenTelemetry and Prometheus among the observability integrations.

Governance features include tenant-scoped state and audit, agent identity through systems such as Entra ID or SPIFFE, and a tamper-evident audit chain. MCP server approval gates reject self-approval and deny on timeout. MCPcast turns OpenAPI or Swagger into an installable MCP server project with tests and a Dockerfile, regenerated from `mcpcast.plan.yaml`. It exposes reads by default, puts opted-in writes behind server-side approval, and offers an optional agent-based `--eval`.

### Trade-offs & Limitations
Compared with assembling a service directly on LangGraph, Foundry is attractive when tool discovery, approval, identity, state and runtime diagnostics need to be standardized across agents. A lower-level stack is a better fit when the team wants direct control of graph and state design or already has a serving and governance layer. For a single stateless assistant with a few Python tools, adopting the full runtime may add more configuration than it saves.

The package is classified as Beta even though it includes production startup features. Test tenant boundaries and approval behavior with your own storage, tools and identity providers. In particular, a server-side approval gate governs calls through that server, not any alternate path to the underlying API. Treat trace redaction as an integration test, especially when exporting telemetry or upgrading from older versions. Apache-2.0 supports commercial adoption, but model and service terms remain separate.

### Hardware & Deployment Guide
Install `promptise` on Python 3.10 or later and configure credentials for the chosen model provider. `promptise init --project my-bot` scaffolds the project; `promptise run --devtools` exposes live traces, `--tui` opens the terminal interface, `--serve` exposes an HTTP API, and `--prod` adds JSON logs, preflight checks and graceful SIGTERM handling. Docker and gVisor are supported for sandboxing, Kubernetes health probes are listed, and MCPcast generates a Dockerfile for its server output.

A hosted-model setup does not inherently need a GPU. An air-gapped deployment must also provision inference, security models, embeddings and storage locally, rather than just self-hosting the Python process. Size for the selected models, context lengths and concurrency. In v1.10.0, `.env` lookup stopped at the project root and streamed runs gained a deadline. v1.10.1 fixed a raw tool-result disclosure in tracing and observers despite scanning being enabled. v1.11.0 added keyless Azure OpenAI support and fixed runtime-agent MCP visibility in the TUI.
```

## Key Capabilities
```text
- Tool integration: Typed Python functions and MCP tool discovery over stdio, streamable HTTP or SSE
- Write controls: Server-side MCP approval gates reject self-approval and deny on timeout
- API conversion: MCPcast generates a package, tests and Dockerfile from a plan; writes are excluded by default
- State boundaries: Tenant-scoped memory, cache, conversations, rate limits and audit, with SQLite, PostgreSQL or Redis conversation storage
- Identity and audit: Entra ID, AWS IAM, Google Cloud, SPIFFE or OIDC integrations and a tamper-evident audit chain
- Operations: One project CLI for local runs, a TUI, an HTTP API and production startup with JSON logs and preflight checks
```

## Quick Start / Clone
```bash
pip install promptise
export OPENAI_API_KEY=sk-...
```
