Agents, memory and skills

Agents, memory and skills

What if AI could finish a whole task for you, not just answer a question? See how agents work, how they remember and how skills shape them.

A single prompt growing into a whole task list

From prompt to an agent

We prompt ChatGPT or Claude with a query and it responds. Add connectors and tools, and it can get things done too. But what if I want to hand over a complete task?

A flight route from Mumbai to Delhi

Flight booking task

Take this example: you want to book a flight from Mumbai to Delhi using ChatGPT. Without an agent, you would prompt every step:

  1. Give me flights on x date
  2. Filter those below ₹10k, cheapest first
  3. I prefer morning flights on x airline
  4. Add my details and take me to payment

A loop of plan, act and check around a goal

Agent loop

This is where an agent comes in. Instead of you prompting every step, the agent plans the steps, uses the right tools and completes the task end to end. If it gets stuck, it either asks for your input or makes the best choice for the goal.

A notepad for the current session beside a long-term notebook

The memory

How does an agent remember things as it works through the loop?

  • Short-term memory: the session’s context, with every message, tool call, result and instruction.
  • Long-term memory: details that last beyond a session, like your name, work and preferences.

So, what is an agent?

An agent is just a loop that plans steps, uses the available tools, uses your memory and checks its own output until the goal is complete.

But how can we take a generic agent and customise it for our own workflows?

A folder holding an instructions file and a scripts folder

Skills

A skill is just a folder with a set of plain-text instructions, plus extra scripts or tools if needed, that you give an agent to customise it for your use case.

Skill to tame the agent

Take our generic agent that knows how to book flights. To automate my weekend trip home, I could add a SKILL.md like this:

- Check my calendar for when
  I'm free
- Keep the fare below x
- Prefer airlines a, b and c,
  in that order

I could also add a calendar-checking script in the skill’s scripts/ folder.

Summary

  1. From prompt to agent: Instead of you prompting every step, an agent plans and finishes the whole task. It asks you only when stuck.
  2. Memory: Short-term memory is the current session. Long-term memory is your details across sessions.
  3. Agent: A loop that plans, uses tools and memory, and checks its work.
  4. Skills: A folder with a SKILL.md file and optional scripts that customises the agent for your workflow.