Build a simple learning agent
In this project, we will build a simple learning agent that
- Given an outcome description (e.g.
my-project.outcome.md), the agent will check a user's work against the outcome and- Create a learning path for the user to follow to achieve the outcome (e.g.
my-project.path.md) - Track the user's progress at an interval (e.g. every 30s) to see what's changed and update the progress
- Give the user feedback on demand (e.g. "How am I doing?" what should I do next?)
- Create a learning path for the user to follow to achieve the outcome (e.g.
Setup
- Create the outcome file:
terminal.guide.outcome.md - Create the working directory:
terminal-guide/ - Create your agent script:
learning_agent.py- setup API keys in the
.envfile - setup the venv folder
- install the dependencies
- make your script executable:
chmod +x learning_agent.py - checkpoint functionality
- create a simple cli command e.g.
learning_agent.py checkpointthat will look at the outcome, compare with work so far, give next steps and feedback
- create a simple cli command e.g.
- setup API keys in the
Terminology
- Agent: A program that can act on its own behalf.
- Context: The information that the agent uses to act.
- Harness: The program that runs the agent and provides it with the context it needs to act.
- Loop: The program that runs the agent and provides it with the context it needs to act.
- Turn: The sequence of steps between an initial user prompt inference and final agent output/response.
- Tool: A function that the agent can call to perform a task.