Models and agents

Agentic Prompting

An agent is a loop: the model decides on an action, the application executes it (a tool call), the result is added to the context, and the model decides again until the task is done. Prompting an agent means defining tools, goals, limits, and when to stop or ask a human.

What Are AI Agents?0:49 · beginner

How tool calling worksBeginner

The application sends tool definitions (name, description, JSON schema for arguments) with the request. The model replies with a structured call instead of text. The application validates and executes it, then sends the result back as a tool message. The model never runs code itself.

user → model → tool_call{name, args} → app validates + executes
     → tool result → model → … → final answer

Planning and decompositionIntermediate

Agents perform better when asked to plan, execute one step at a time, and check progress. Multi-agent systems split roles (planner, coder, reviewer) across separate model calls.

Budgets, retries, and human approvalIntermediate

Set limits on steps, tokens, time, and spend. Retry failed tool calls with backoff, but stop after a few attempts. Require human approval for irreversible actions such as deleting data, spending money, or deploying.

Tool securityAdvanced

Tool results are untrusted input: a web page or file can contain instructions aimed at the model. Authorize every tool call in code, scope credentials narrowly, and mark tool output as data. PromptFlowEngine’s Agent & MCP security policy allows, confirms, or blocks tool calls before they run.

In PromptFlowEngineAdvanced

The AI development lifecycle (preview) runs a requirement through analysis, specification, architecture, and a task plan with two human approval gates and verified test evidence, an example of a governed multi-step workflow.

Key takeaways

  • The model proposes; the application executes and authorizes.
  • Bound every loop: steps, tokens, time, money.
  • Treat tool output as untrusted data.
See the agent firewall in the Demo Center