Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add agents/promptise-com/foundry/building-agentsgit clone --depth 1 https://github.com/promptise-com/FoundryWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.05180 |
| Opus 5 | $0.00000 | $0.02590 |
| Sonnet 5 | $0.00000 | $0.01036 |
| Haiku 4.5 | $0.00000 | $0.00518 |
Grade A, and why
building-agents scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 493 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Building Agents
Create intelligent agents that connect to MCP servers, discover tools automatically, and execute tasks with full observability.
Quick Example
import asyncio
from promptise import build_agent
from promptise.config import HTTPServerSpec
async def main():
agent = await build_agent(
servers={
"weather": HTTPServerSpec(url="http://localhost:8000/mcp"),
},
model="openai:gpt-5-mini",
)
result = await agent.ainvoke({
"messages": [{"role": "user", "content": "What is the weather in Zurich?"}]
})
print(result["messages"][-1].content)
await agent.shutdown()
asyncio.run(main())
Concepts
Promptise agents are built around three ideas:
- MCP-first tool discovery -- You point the agent at one or more MCP servers via the
serversdict. On startup it connects to every server, lists all available tools, and converts them into LangChain-compatible tools automatically. - Opt-in capabilities -- Observability, memory, sandbox execution, cross-agent delegation, and prompt flows are all disabled by default. Enable each one with a single parameter and the agent wires everything together.
- Unified return type --
build_agent()always returns aPromptiseAgent. It wraps the underlying LangGraph ReAct agent and exposes a consistent interface regardless of which capabilities are active.
Walkthrough
The build_agent() Function
build_agent() is the primary entry point for creating agents. It is an async function that connects to MCP servers, discovers tools, and returns a ready-to-use agent.
from promptise import build_agent
from promptise.config import StdioServerSpec, HTTPServerSpec
agent = await build_agent(
# Required -----------------------------------------------
servers={
"files": StdioServerSpec(command="python", args=["-m", "file_server"]),
"api": HTTPServerSpec(url="https://api.example.com/mcp"),
},
model="openai:gpt-5-mini",
# Optional -----------------------------------------------
instructions="You are a helpful data analyst.",
trace_tools=True, # print every tool call to stdout
observe=True, # enable observability
memory=None, # MemoryProvider instance
memory_auto_store=False, # auto-persist exchanges
sandbox=True, # sandboxed code execution
observer=None, # shared ObservabilityCollector
observer_agent_id=None, # agent id for shared observer
cross_agents=None, # peer agents for delegation
extra_tools=[], # additional BaseTool instances
flow=None, # ConversationFlow for multi-turn prompts
)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 493 lines · 0 tokens per session scan A ae820768f458
building-agents is an agent published in the GitHub repository promptise-com/Foundry (869 stars, last pushed 12d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 5,180 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other agents, from other repositories
agent-orchestration-context-manager
Elite AI context engineering specialist mastering dynamic context management, vector databases, knowledge graphs, and intelligent memory systems. Orchestrates context across multi-agent workflows, enterprise AI systems, and long-running projects with 2024/2025 best practices. Use PROACTIVELY for complex AI…
backend-development-tdd-orchestrator
Master TDD orchestrator specializing in red-green-refactor discipline, multi-agent workflow coordination, and comprehensive test-driven development practices. Enforces TDD best practices across teams with AI-assisted testing and modern frameworks. Use PROACTIVELY for TDD implementation and governance.
team-lead
Team orchestrator that decomposes work into parallel tasks with file ownership boundaries, manages team lifecycle, and synthesizes results. Use when coordinating multi-agent teams, decomposing complex tasks, or managing parallel workstreams.
basic-agents
A basic agent uses a predefined strategy with a simple execution flow that works for most common use cases. It accepts a string input (a question, request, or task description) and sends this input to the configured LLM. The LLM may decide to call provided tools. The agent will execute the tools and send the results…
functional-agents
With functional agents, you implement the logic as a function that handles user input, interacts with LLMs, calls tools if necessary, and produces the final output. Compared to graph-based agents, this usually means faster prototyping with the following downsides.
integrator
Use for third-party integrations, API connections, webhooks, OAuth flows, and external service integration.