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

> Learn how to build PaL, a Plan-and-Learn agent with Agno and Gemini 3 Flash. Create, execute, and adapt multi-step tasks while continuously learning—no fine-tuning or GPUs required.

- Published: 2025-12-18
- Author: Ashpreet Bedi
- Category: Engineering
- Canonical: https://agno-com-nine.vercel.app/articles/build-a-plan-and-learn-agent-with-agno-and-gemini-3-flash
- Markdown: https://agno-com-nine.vercel.app/articles/build-a-plan-and-learn-agent-with-agno-and-gemini-3-flash.md

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.

[gemini tweet video](https://www.youtube.com/embed/Cyy5avxd6pA)

## 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](https://github.com/agno-agi/agno/tree/main/cookbook/02_examples/04_gemini).
