PromptisePromptise
PlatformSoonEnterprise
DocsGitHub
Talk to usGet started
framework
[part 01/03]> The Agent

Ship AI agents your business can rely on.

Guardrails, memory, cost controls, failover and full traces come built in. Your team ships the agent, not the infrastructure around it.

GitHub
agentrequestreplyguardrailsguardrailstools over mcpmemory
A request is checked on the way in. The agent recalls memory, calls a tool over MCP, and the reply is checked on the way out.
  1. 01build_agent()
  2. 02Prompting
  3. 03Reasoning
  4. 04Execution engine
  5. 05Memory and cost
  6. 06Safety
  7. 07Any model
[n.01/09]> build_agent()

One call returns the whole agent.

Each capability is one argument. What you leave out costs nothing.

agent.pypython
agent = await build_agent(    model="openai:gpt-5-mini",    servers={"search": search_server},   # MCP tool servers    cross_agents={"analyst": analyst},   # peer agents    sandbox=True,                        # sandboxed code execution    memory=memory,                       # vector memory    guardrails=guardrails,               # input and output scanning    cache=cache,                         # semantic cache    agent_pattern="autonomous",)
what you getwaiting

search server connected · tools read from its schemas

peer agent analyst available as a tool

sandbox · memory · guardrails · cache enabled

ready

An agent that finds its own tools, remembers context, runs code in isolation, scans what goes in and out, and answers repeat questions from the cache.

[n.02/09]> demo to production

Skip the months of plumbing between demo and production.

Without a framework
modeltools · mcpmemoryguardrailsruntimetracingglue code at every joint

Build it all yourself.

Wire tool schemas by hand. Build a memory layer. Write guardrails from scratch. Glue caching, streaming and tracing together.

With build_agent()
modeltools · mcpmemoryguardrailsruntimetracingone install · one set of interfaces

Configure what you need.

Point at MCP servers and the tools appear. Add memory= and context is injected every turn. Add guardrails= and every message is scanned.

[n.03/09]> prompting

Prompts you can review, test and roll back.

Your prompts decide what customers are told. Promptise builds them from typed parts you can test, version and debug.

Prompting docs
[01] Typed blocks
block · prioritycontext windowidentityp10rulesp9output formatp8context slotp6sectionp5examplesp4dropped first

When context runs short, the least important part goes first.

The system prompt is assembled from eight block types, each with a priority. Identity and rules stay. Examples go first when the window is tight.

[02] Strategies
strategies.pypython
from promptise.prompts import analystfrom promptise.prompts.strategies import (    chain_of_thought, self_critique,    decompose, plan_and_execute,) # reason step by step, then critique the reasoningcareful = analyze.with_strategy(    chain_of_thought + self_critique,) # a perspective pairs with any strategyreview = careful.with_perspective(analyst)

Change how the model reasons, in one line.

Five strategies combine with the + operator. Four perspectives pair with any of them. Flows swap blocks as a conversation moves through its phases.

[03] Context
providers.pypython
from promptise.prompts import prompt, contextfrom promptise.prompts.context import memory_context class WeatherProvider:    """Inject current weather for location-aware agents."""     async def provide(self, ctx) -> str:        weather = await weather_api.get("Berlin")        return f"## Current weather\n{weather.summary}" @prompt(model="openai:gpt-5-mini")@context(WeatherProvider(), memory_context(limit=5))async def advise(question: str) -> str:    """Answer using the injected context: {question}"""

Every answer grounded in current information.

Context providers inject fresh data before each model call. A custom provider is a class with one provide method.

[04] Guards
guards.pypython
from promptise.prompts.guards import (    ContentFilterGuard, LengthGuard,    SchemaStrictGuard, OutputValidatorGuard,) guarded = respond.with_guards(    ContentFilterGuard(        blocked=["competitor_name"],        required=["disclaimer"],    ),    LengthGuard(min_length=100, max_length=2000),    SchemaStrictGuard(),    OutputValidatorGuard(check_policy),)

Bad output stops before it reaches your systems.

Guards run before and after generation. A guard that fails raises a GuardError instead of passing the output on.

[05] Version and test
test_analyst.pypython
from promptise.prompts import load_prompt, registryfrom promptise.prompts.testing import PromptTestCase analyst = load_prompt(    "prompts/analyst.prompt.yaml", register=True,)registry.rollback("analyst")         # back one version class TestAnalyst(PromptTestCase):    prompt = analyze     async def test_cites_sources(self):        with self.mock_llm("Revenue grew. source: 10-K"):            result = await self.run_prompt("Q3 revenue")            self.assert_contains(result, "source:")

A prompt change is reviewed like a code change.

Prompts live in versioned YAML files with rollback. PromptTestCase mocks the model, so tests run fast under pytest. The inspector shows which blocks went in and which guard failed.

Prompting docs
[n.04/09]> reasoning

Agents that think the way the job requires.

Design the process each agent follows: how it plans, checks and decides. Start from a prebuilt pattern, or compose your own from twenty node types.

The agent builds its own path from a pool of nodes. It decides the order at runtime.

step 1PlanBreak the task into subgoals.
step 2ThinkFind gaps, rate confidence.
step 3ActCall tools on your MCP servers.
step 4ObserveRead results, extract facts.
step 5ReflectSpot mistakes, suggest fixes.
not usedCritiqueArgue against the answer.
not usedValidateA gate that passes or routes back.
step 6SynthesizeCombine findings into the answer.
Different jobs, different thinking

A researcher should not reason like a support agent.

[01] Deep research

Plan, search, verify, synthesize.

Plan→Act→Observe→Validate→Synthesize
PromptGraph("researcher", nodes=[    PlanNode("plan", is_entry=True),    PromptNode("search", inject_tools=True),    ObserveNode("observe"),    ValidateNode("verify",        criteria=["Sources agree", "No contradictions"],        on_fail="search"),  # loop back if invalid    SynthesizeNode("report", is_terminal=True),])
[02] Code review

Analyze, challenge, justify.

Act→Think→Critique→Justify→Synthesize
PromptGraph("reviewer", nodes=[    PromptNode("read", inject_tools=True, is_entry=True),    ThinkNode("analyze"),    CritiqueNode("challenge", severity_threshold=0.3),    JustifyNode("evidence"),    SynthesizeNode("review", is_terminal=True),])
[03] Data analysis

Plan the queries before running them.

Plan→Act→Observe→Reflect→Synthesize
PromptGraph("analyst", nodes=[    PlanNode("plan_queries", is_entry=True),    PromptNode("execute", inject_tools=True,        flags={NodeFlag.RETRYABLE}),    ObserveNode("interpret"),    ReflectNode("verify"),    SynthesizeNode("report", is_terminal=True),])
[04] Support

Classify, retrieve, draft, check.

Think→Act→Plan→Validate→Synthesize
PromptGraph("support", nodes=[    ThinkNode("classify", is_entry=True),    PromptNode("search_kb", inject_tools=True),    PlanNode("draft_response"),    ValidateNode("policy_check",        criteria=["Professional tone",                  "No false promises"],        on_fail="draft_response"),    SynthesizeNode("respond", is_terminal=True),])
[05] Financial analysis

Every number traced to a source.

Act→Observe→Critique→Justify→Validate
PromptGraph("analyst", nodes=[    PromptNode("gather", inject_tools=True, is_entry=True,        flags={NodeFlag.RETRYABLE, NodeFlag.CRITICAL}),    ObserveNode("extract_numbers"),    CritiqueNode("challenge", severity_threshold=0.2),    JustifyNode("audit_trail"),    ValidateNode("accuracy_check",        criteria=["All numbers sourced"],        on_fail="gather"),    SynthesizeNode("report", is_terminal=True),])
[n.05/09]> execution engine

The agent picks its next step, from the steps you allow.

Short paths for easy questions. Thorough ones for hard questions. No flowchart to maintain.

turn 1 · path chosen at runtimeStartPlanThinkActObserveCritiqueReflectAnswer
123456

A pool you define

The agent only sees the nodes you give it.

Bounded runs

max_steps and allow_repeat cap every run.

A model per node

A cheap one to think, a strong one to synthesize.

Chosen at runtime

It reads each result, then picks the next node.

Done when it is done

It stops when the answer is ready, or at the cap.

Self-correction

Validate and Critique route back, with the reason in context.

  1. 1A pool you defineThe agent only sees the nodes you give it.
  2. 2Bounded runsmax_steps and allow_repeat cap every run.
  3. 3A model per nodeA cheap one to think, a strong one to synthesize.
  4. 4Chosen at runtimeIt reads each result, then picks the next node.
  5. 5Done when it is doneIt stops when the answer is ready, or at the cap.
  6. 6Self-correctionValidate and Critique route back, with the reason in context.
Let it choose
autonomous.pypython
PromptGraph("agent", nodes=[    PlanNode("plan", is_entry=True),    PromptNode("act", inject_tools=True),    ThinkNode("think"),    SynthesizeNode("answer", is_terminal=True),])# the agent picks the order at runtime
Or wire every edge
static.pypython
graph = PromptGraph("pipeline", mode="static", nodes=[    PromptNode("extract", is_entry=True),    PromptNode("analyze"),    PromptNode("report", is_terminal=True),])graph.sequential("extract", "analyze", "report")# always: extract -> analyze -> report
[n.06/09]> memory, tools and cost

It remembers your customers and spends only the tokens that matter.

memory
new messagewhere is my order?memoryprefers emailorder 1182 · shippedasked about returnslives in lyonpromptinjected before the call

It remembers, without being told to look.

Relevant memory is found and injected before each turn, with no retrieval call in your code. Scope it per user.

ChromaProvider · Mem0Provider · InMemoryProvider
tools

Tools come from your servers.

Point it at MCP servers. Each tool is read from its schema.

tool selection
3 of 40 sentmatched to the request

Only the tools a request needs.

Local embeddings match intent to tools, so forty tools do not ride along on every message.

optimize_tools="semantic"
semantic cache
what's my balance?show my balanceanswersimilarity 0.94 ≥ 0.92

One answer for the same question.

Questions that mean the same thing return the stored answer.

SemanticCache(similarity_threshold=0.92)
conversations
sess_a1sess_b7sess_c3postgres · sqlite · redis · memory

Sessions that persist and stay apart.

History per session and per user. Swap the store without touching app code.

observability
model · plan612 tok
tool · get_order120 ms
model · decide704 tok
tool · refundapproved
model · reply596 tok

Know exactly what the agent did.

observe=True captures every model turn, tool call, token count and retry. Export to OpenTelemetry, Prometheus or an HTML report.

streaming
tool_startLooking up your order
tool_endFound order 1182 · 0.4s
tokensYour order shipped on Monday and

Answers that appear as they form.

Users see which tool started, what it found, then the reply token by token.

[n.07/09]> safety

Protect your users, your data and your brand.

You pick the detectors. They scan what goes in and what comes out.

  1. 01

    Guardrails

    Six detectors on every message: injection and jailbreaks, PII across 69 patterns, credentials across 96 patterns, names and addresses, content safety, and your own rules.

    guardrails=
  2. 02

    Code sandbox

    Code the agent writes runs in an isolated container: read-only root, resource limits, dropped capabilities and a restricted network by default. gVisor is optional.

    sandbox=True
  3. 03

    Human approval

    Mark sensitive tools with glob patterns and execution pauses until a person decides. A denial comes back as a tool result, so the agent adapts.

    ApprovalPolicy(tools=["send_*", "delete_*"])
[n.08/09]> any model

Switch models as prices and quality change.

Instructions, tools, memory and guardrails stay exactly the same. Keys come from a .env beside your code and never appear in a log.

  • $ promptise models listEvery provider and what it needs.
  • $ promptise models check openai:gpt-5-miniWhether this string works right now.
  • $ promptise models env azureThe exact .env template.
models.pypython
from promptise import Model, build_agent # the common case: a stringagent = await build_agent(model="openai:gpt-5-mini", servers={}) # everything a provider can need, in one placeagent = await build_agent(    model=Model(        "gpt-4o",        provider="azure",        endpoint="https://acme.openai.azure.com/",        api_version="2024-10-21",        deployment="chat-prod",    ),    servers={},) # self-hosted works the same wayModel("llama3.1", provider="ollama", endpoint="gpu-box:11434")
[n.09/09]> when things fail

When something breaks, the agent degrades, not your service.

01

The provider goes down

A fallback chain switches to the next model. A circuit breaker per model prevents retry storms.

FallbackChain
02

The token budget runs out

BudgetHook stops the graph. The ExecutionReport records what was done.

BudgetHook
03

The agent loops

CycleDetectionHook spots the repeating pattern and ends the graph.

CycleDetectionHook
04

A tool crashes

RETRYABLE retries with backoff. CRITICAL aborts if the step is essential.

NodeFlag
05

A user sends an injection

The injection detector scores it before it reaches the model, and the event is logged.

guardrails
06

The output contains PII

Output scanning redacts matches before the reply reaches the user.

output scanning
> the framework

One framework, three parts.

Framework overview →
part 02 · The Interface

Any system, agent-ready through MCP.

part 03 · The Harness

Autonomous agents, under your control.

Build with the framework. Run it on the platform. Launch it with our engineers.

The Agent is open source under Apache 2.0. Install it and build. The platform and our engineers are there when you need more.

Get startedJoin early accessBook a call
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