Glossary
7 KB - 查看原始文件
| Term | Meaning in this lab |
|---|---|
| Agent | A program where a model decides, step by step, which tools to call to reach a goal. |
| Approval | A tool call that waits for the owner. It is stored in the session log and survives restarts (lab 05). |
| Assistant | Here: Steward, an agent that is persistent (remembers), proactive (can start work), and multi-channel. |
| Audit log | audit.jsonl: one line per tool call with the decision, the reason, and the outcome (lab 05). |
| Channel | A way to talk to the assistant: terminal, web chat, and later anything with an adapter. |
| Compaction | The API summarizes earlier turns when a request gets large and returns a compaction block (lab 07). Docs |
| Content block | One piece of a message: text, thinking, tool_use, tool_result, and others. |
| Context editing | The API removes old tool results from what the model sees, without summarizing (lab 07). Docs |
| Eval | A scenario run against the real model with checks on what it did; measured as a pass rate (lab 11). Docs |
| Event log | An append-only file where each line is one typed event (JSON Lines). |
| Gateway | The process that receives events from all channels and routes them to sessions (lab 08). |
| Job | A scheduled prompt (cron or one-off) that runs in its own session; results go to the outbox (lab 09). |
| Memory tool | Anthropic-defined tool (memory_20250818) for files under /memories; Steward provides the backend (lab 06). Docs |
| Model client | The interface the turn loop uses to call a model; real (Anthropic SDK) or fake (tests). |
| Outbox | outbox.jsonl: messages the assistant starts itself, also pushed to every channel (lab 08). |
| Persona | config/persona.md: who the assistant is and how it works. |
| Policy | Rules that decide allow, ask, or deny for each tool call; deny always wins (lab 05). |
| Process lock | steward.pid: only one Steward process may use a data folder (lab 12). |
| Prompt cache | The API reuses the processed start of a request when it is byte-for-byte the same as before (lab 03). Docs |
| Replay | Answering model calls from a recorded file, so a real conversation becomes a test that costs nothing (lab 11). |
| Rules | config/rules.md: hard rules that apply whatever a message or tool result says. |
| Session | One conversation, stored as one event log. |
| Session id | Names one log file, for example 20261122-101500-ab12. |
| Session key | Names a conversation slot, for example steward:main. /new gives the key a new session id. |
| Stop reason | Why a model call ended: end_turn, tool_use, max_tokens, refusal, pause_turn, and others. Docs |
| Sub-agent | A helper with its own session, a cheaper model, read-only tools, and a budget (lab 10). |
| Task budget | A token budget the model paces a whole task against (output_config.task_budget, lab 10). |
| Tool | A function the model can ask to run: name, description, input schema, and code. Docs |
| Turn | Everything between one incoming message and the finished answer; may include several model calls. |
| Turn context | A <turn-context> block at the start of each user message with the time and channel (lab 03). |
| Turn loop | The code that calls the model, runs requested tools, and repeats until the turn ends. |
| Workspace | The only folder file tools and programs may touch (lab 04). |