Advanced Agentic Behaviors¶
A behavior is a way to steer what happens inside an agent: how it interprets a goal, which strategy it takes, which action it chooses next, and what it is and isn't allowed to say or do.
Workflows vs behaviors: a workflow orchestrates steps between components (policies, agents and nested workflows) according to a declared graph or a router. A behavior shapes the decision-making within one agent. Workflows decide who does what next; behaviors decide how an agent thinks and acts while doing it.
AgentGr.id gives you five levers for behavior, from the most static to the most adaptive:
| Chapter | Lever | Changes |
|---|---|---|
| 1. Identity and Persona | Specification: persona, prompting |
Who the agent is, its tone and standing instructions |
| 2. Planning and Selecting Behaviors | Behavior Controller | Which plan to follow and which action to take next |
| 3. Steering with Policies | Guardrail policies | What reaches the agent, and what leaves it |
| 4. Loading Know-How on Demand | Skills | Which instructions or procedures apply to this task |
| 5. Adapting from Outcomes | Evaluation, self-refinement and learning | How the agent corrects itself and improves over time |
1. Identity and Persona¶
The baseline behavior lives in the Agent Specification:
persona.role,persona.goalandpersona.personadescribe who the agent is and what it is trying to achieve.persona.default_system_messageis the standing instruction for model calls.- The
promptingsection holds prompt templates and rules.
Changing these changes behavior without changing code. To change them while the agent runs, without re-registering or redeploying, keep the values that should vary in the Agents Profile Manager. With sub-agent spawning, an agent can run a copy of itself with a different persona for part of a task:
critic = self.context.spawner.spawn_clone(
name="critic", persona={"role": "Critic", "goal": "Find weaknesses in the draft"})
2. Planning and Selecting Behaviors¶
On AgentGr.id a behavior is a unit of its own, defined separately from the agent's code, in the same way as a workflow. Behaviors are described as DSLs (and can also point to tools or execution types), kept in a pool of candidates, and chosen at runtime. The agent does not hard-code what to do next; it asks the Behavior Controller.
The Behavior Controller makes the two decisions at the heart of agent behavior, using LLMs with structured output:
- Planning (phase 1): turn a goal and context into a structured plan of candidate behaviors, each with its
dsl,tool_idorexecution_type. - Selection (phase 2): given the plan and the pool of candidate behavior DSLs, choose the one to execute next, returned as its
uid.
Candidate behaviors can be anything the agent can run: a DSL, a tool, a workflow, a delegation, a skill. Because every plan and selection is persisted, together with the candidate pool that was considered, you can audit why an agent behaved as it did. For goal-to-workflow planning with automatic replanning, see AgentWorkflowEngine.
| To learn | Read |
|---|---|
| How to configure the Behavior Controller in a specification and call it from an agent | Behavior Controller (Advanced › Advanced Agentic Sub-Systems) |
| How it works inside: components, task lifecycle and schemas | Behavior Controller (Deep Dive Key Concepts) |
| How plans are built and executed | Agent Planning System (Deep Dive Key Concepts) |
3. Steering with Policies¶
Policies steer behavior from outside the agent's code, and can be changed per deployment:
| Policy type | Steers |
|---|---|
message_transformer |
How incoming tasks are reshaped before the agent sees them |
pre_processor |
What content is allowed in: validation, redaction, injected instructions |
post_processor |
What is allowed out: filtering, formatting, refusing |
message_prechecker, rate_limiter |
Which tasks are accepted at all, and how many |
See Agentic Governance for how to write and attach them.
4. Loading Know-How on Demand¶
Skills change behavior per task. A subjective skill adds instructions and reference material to the prompt only when the task calls for it, for example a review checklist or a style guide. An objective skill replaces open-ended reasoning with a fixed, deterministic procedure for tasks that must always be done the same way. The skill store versions both, so a behavior change can be published, rolled out and rolled back like code.
5. Adapting from Outcomes¶
- Within a task: self-refinement evaluates each attempt against an expectation and feeds the failures back, so the agent corrects itself before answering.
- Across tasks: the Learner turns outcomes and feedback into reviewed lessons, and the Incorporator applies them when a similar problem comes up. See Loop Improvement.
- With people: human-in-the-loop checkpoints let a person approve, correct or redirect the agent at decision points.