Build a plan-and-learn agent with Agno and Gemini 3 Flash

Ashpreet Bedi
December 18, 2025
3 min read

We recently got early access to Gemini 3 Flash, so…

Meet PaL, a Plan and Learn agent that:

  • Creates plans and executes them step by step
  • Learns from successful runs
  • Gets smarter over time without fine-tuning or retraining

PaL isn’t just another agent pattern. It’s a disciplined loop for building agents that don’t fall apart as tasks get more complex. Let’s break it down.

The problem with most agents is that they pick one of two modes: 

Rigid

These agents plan everything, even trivial questions like “what’s 2+2?” They overthink, add latency, and waste tokens on tasks that don’t need structure.

Chaotic

These agents jump straight into execution. They move fast but lose track of progress, forget earlier decisions, and often stall halfway through multi-step tasks.

Both approaches break down in real-world workflows.

PaL adapts to the task at hand

PaL agents don’t get stuck in a single mode. Instead, the agent decides when structure is necessary and when it’s not. 

Simple question? Just answer. Multi-step task? Plan, execute, verify.

The secret sauce behind PaL

PaL works because three critical pieces come together:

1) Gemini 3 Flash

Fast enough for interactive planning. Smart enough to reason through multi-step tasks without heavy scaffolding.

2) Agno session state

Agno’s session state tracks progress across turns. It doesn’t “wake up confused” on every response.

3) Self-learning

PaL actively remembers what worked and reuses it later.

Together, these three components enable PaL to track:

  • The current objective
  • Which step it’s on
  • What’s completed vs. what’s still pending

The result: complex tasks don’t get lost, context survives across turns, and progress compounds instead of resetting.

Complex tasks don't get lost. Context survives. Progress compounds.

PaL agent get smarter over time without additional GPU-heavy training

PaL doesn’t rely on fine-tuning or retraining. After completing a task, it asks a simple but powerful question:

“What pattern here could help future tasks?”

If something worked, such as a decomposition strategy, a verification step, or a retry rule, PaL saves that insight to a knowledge base. The next time it sees a similar task, it searches what worked before and applies it immediately.

  • No fine-tuning
  • No retraining
  • No GPUs required

Just accumulated operational wisdom.

The PaL cycle

PaL follows a simple four-step loop:

1) Plan

Break the goal into clear steps, each with explicit success criteria.

2) Execute

Run one step at a time. Verify results before moving on.

3) Adapt

If reality changes, revise the plan. Add steps. Remove steps. Keep going.

3) Learn

Save reusable patterns that worked so future tasks start smarter.

Simple. Disciplined. Compounds over time.

Try it yourself

PaL is built with Agno + Gemini 3 Flash. If you’re building agents that need to survive real workflows, this is a pattern worth stealing. Here’s a link to the code