Hello, API
Every call starts from scratch
A program talks to a model through an API: it sends text over the network and gets an answer back. One such exchange is a call. The server remembers nothing between calls. In a chat the model seems to remember. In fact the app resends the whole conversation every time. In your agent, the tool loop will do that.
Who says what: roles
A call carries a list of messages, each with a role. The user role is the human’s words. The assistant role is the model’s earlier replies; you send them back so it sees the whole conversation. The system prompt goes separately: a standing instruction in the system parameter. For example: “You help a travel agency. Keep answers short.”
More on Way of the Agent
- Course programThe first three modules are free: start in the browser or the app, no card needed.
- Daily drill casesReal situations from building agents - with the answer and why.
- Library: guides, skills and promptsReady prompt templates, grouped into collections.
- AI ChroniclesSourced stories from the history of AI.
- ConceptsPlain-language explainers of agent engineering.
- Learn AI agentsApps and courses for learning AI agents, compared honestly.
Still in this lesson: 3 more cards, a quiz of 5 questions, XP and stars - in the course.
Continue the lesson on the Path