- Agent: A program that loops: asks the AI what to do, runs the tools it asks for, and repeats until it has an answer.
- API key: Your secret password for the OpenAI API. Keep it in .env.
- Responses API: The OpenAI endpoint used in this course: POST /v1/responses.
- Model: Which AI to use, e.g. gpt-5.4-nano (cheap and fast).
- Instructions: The system prompt: how the AI should behave. Sent with every request, never stored in history.
- Input: What you send the AI: here, the whole conversation history.
- Output: The list of items the AI returns: messages, function calls, reasoning.
- History: The array holding the whole conversation. The AI’s only memory within a session.
- Role: Who said a message: user (you) or assistant (the AI).
- Tool: A function you describe to the AI. It can ask you to run it.
- function_call: An output item where the AI asks you to run a tool, with name, arguments and call_id.
- function_call_output: The item you add to history with a tool’s result, matched by call_id.
- call_id: The ID that links a tool result to the request it answers.
- Outer loop: Your back-and-forth chat with the agent.
- Inner loop: The agent’s own work: call AI → run tools → call AI… until no more tool calls.
- JSON Schema: A standard way to describe the shape of JSON: types, required keys, allowed values.
- strict: Tells the AI it must follow your schema exactly.
- enum: A JSON Schema list of the only allowed values.
- Structured output: Forcing the final answer into a JSON shape you define (text.format).
- Persona: The per-agent part of the instructions, e.g. “You are sarcastic…”.
- Context window: The maximum amount of text the AI can take in one request.
- Compacting: Replacing a long history with a short AI-written summary.
- Attribute: PHP metadata on a class, like #[CompactsAfter(30)], read with Reflection.
- Guidelines file: Project rules (LEO.md, like CLAUDE.md or AGENTS.md) added to the instructions.
- Memory: Long-term facts saved to a file by the remember tool, kept between sessions.
- Laravel Prompts: Package that gives text(), spin() and info() for terminal input and output.
