Agents that adapt to every request instead of following a script.
Fixed workflows break the moment a request does not match the flowchart, and every new case means another branch to build and maintain. The execution engine lets the agent choose its own path at each step, within limits you set: short for easy questions, thorough for hard ones.
Stop maintaining a flowchart for every case.
Drawing a flowchart and hoping the model follows it is the usual approach. Promptise gives the agent the nodes and lets it compose its own execution path on every turn.
An easy question
A short path and done. The engine does not run steps the question does not need.
Act → AnswerA research task
Planning, several rounds of tools and observation, a check before the answer.
Plan → Act → Observe → Act → Reflect → AnswerA lookup that turned ambiguous
Halfway through, the agent can step back, think and re-route, without an if-statement from you.
Act → Think → Plan → Act → AnswerThe agent picks its next move, from the moves you allow.
In autonomous mode the model sees the available nodes as a menu, chooses one, runs it, looks at the result and chooses again, until it decides it is done.
See the menu
Every node in the pool is a capability with its own tools, blocks and guards.
Decide
The model picks the node that best fits the task so far.
Execute
That node runs with everything it was configured with.
Evaluate, repeat
The model reads the result, then picks the next node or finishes.
Free, but bounded
The path is not hardcoded, and it is not unlimited either. A step cap and a repeat setting bound every run, and when the agent runs inside the Agent Runtime, budgets and health checks bound it further.
from promptise.engine import ( AutonomousNode, PlanNode, PromptNode, SynthesizeNode,) autonomous = AutonomousNode( "agent", node_pool=[ PlanNode("plan"), PromptNode("act", inject_tools=True), SynthesizeNode("answer"), ], planner_instructions="You are a research assistant.", allow_repeat=True, # a node may run more than once max_steps=15, # hard cap per run)The right context in every call, and nothing else.
A generic framework puts everything in one prompt and hopes the window holds. Promptise assembles the prompt from context providers, each with its own priority and scope.
Priority decides what stays
Identity and rules go in first, then tools and memory, then conversation history. When the budget tightens, the lowest priority is trimmed first and history loses its oldest pairs, so the agent degrades gracefully instead of failing.
Recomputed every turn
Memory searches run, shared state updates, team messages arrive and tool results come in. The engine rebuilds the prompt each turn instead of pasting one static string.
Tools, peer agents, code and memory in one loop.
The engine does not only call tools. It treats everything the agent can reach as one capability set, and you declare it on build_agent() instead of wiring it by hand.
MCP tool servers
Discovered at runtime and exposed to the agent as typed tools.
Peer agents
Other agents the engine can delegate to, authenticated over HTTP.
Sandboxed code
Run generated code in an isolated sandbox.
Vector memory
Long-term recall that feeds the context assembly.
Guardrails
Scanners on input and output.
Semantic cache
Reuse answers to questions that mean the same thing.
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",)It catches its own bad output before your users do.
A ValidateNode can reject the last output and a CritiqueNode can flag it as weak. The engine does not throw. It routes execution back to an earlier node, with the reason in context.
No outer retry loop
The correction is part of the graph, not scaffolding around it. The model sees why the last attempt was rejected, so the next one can be better.
Nodes decide, you configure
Criteria, severity thresholds and the node to route back to are all arguments on the nodes themselves.
Shape it to your domain, piece by piece.
Swap the model per node, write your own node type, register a new context provider, compose strategies, add flags. The engine is a set of primitives, and the result ships as a reusable PromptGraph.
Node types
Twenty built in, plus your own.
Model per node
A cheap model for planning, a strong one for synthesis, a local one for private data.
Context providers
Fourteen provider types, and a custom one is a single class.
Strategies
Reasoning strategies that compose with the plus operator.
Flags
Eighteen typed flags for production behavior.
Hooks
Budget, cycle detection, logging, metrics and timing hooks around execution.
One engine for every agent you will build.
Dynamic graphs, autonomous path selection, context assembly, capability orchestration and self-correcting loops. Shape any layer, or take the defaults and ship.