Lesson 1. Agent Formula

An agent is not a model in itself, but a system of three parts: model (LLM) + context + tools. The model reasons, the context shows it the world, and the tools allow it to influence the world. A model without this framework is not yet an agent.

┌──────────┐   ┌──────────┐   ┌────────────┐
│  MODEL  │◀──│ CONTEXT │──▶│ TOOLS│
└  (LLM)   ┘   └ (eyes)  ┘   └  (hands)    ┘
reasons     world in prompt    acts

What to read

  • [Agent Formula] — why a model without a framework is not an agent
  • [Observation and Action Spaces] — what the agent sees and what it acts with
  • [Context as the Agent’s Eyes] — how the agent’s “vision” determines its capabilities

In code

The three parts of an agent are simply data and functions:

python
agent = {
    "model":   "sao10k/l3-lunaris-8b",                     # reasons
    "context": [{"role": "system",
                 "content": "You are an assistant"}],             # sees the world
    "tools":   {"time": get_time, "calc": calc},           # acts
}
js
const agent = {
  model:   "sao10k/l3-lunaris-8b",                        // reasons
  context: [{ role: "system", content: "You are an assistant" }], // sees the world
  tools:   { time: getTime, calc },                       // acts
};

For now, this is just a description – the loop that brings these three parts to life, we will assemble in lesson 2.

Practice

Come up with an agent for your task (reminders, job search, anything). Write down three lists: what it observes, what actions it can take, what context it needs to make decisions. This is your project for the entire course – by lesson 5 it will come to life in code.

Related: [Lesson 2. ReAct Cycle], [00. About the Course]