Ch 4, The Runtime Loop Flashcards: The Claw AI Agent Ecosystem (Ava S. Barron)

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/24

flashcard set

Earn XP

Description and Tags

Concept flashcards for Ch 4, The Runtime Loop, based on The Claw AI Agent Ecosystem by Ava S. Barron (ISBN 979-8-2526-0474-9).

25 Terms

1
New cards

Steps in one agent turn

Event received, context assembly, model call, response parsing, tool execution, follow-up model call, memory update, response delivery.

2
New cards

Response parsing branch

Text only: skip to memory update and delivery. Tool calls: execute, append results, call the model again, and repeat until no tools remain.

3
New cards

Session history default

The whole session history loads every turn; without pruning it grows unbounded and the user pays for all of it on each message.

4
New cards

Model-tool-memory sub-loop

Validate the call, execute the tool, append the result, call the model again; repeat until the response is text only.

5
New cards

Tool results as cost multiplier

Each appended result is billed again on every later model call within the same turn.

6
New cards

Tool call validation checks

Tool existence, schema conformance, permission tier, and rate limit. A failure returns to the model as a tool error result.

7
New cards

Limit of tool validation

It checks format and permission tier, not whether the outcome matches user intent; that is SOUL.md's and AGENTS.md's job.

8
New cards

Wrong tool selection

The most insidious tool-generation failure, since the call may succeed while doing the wrong thing. Prevent it with explicit do-not-use lines in SKILL.md.

9
New cards

End-of-session memory write

A model call that turns session history into a structured summary in memory/YYYY-MM-DD.md; it can be routed to a cheaper model.

10
New cards

What not to log

Verbatim transcripts, facts already in USER.md or MEMORY.md, credentials, full private documents, and unconfirmed speculation.

11
New cards

Memory security boundary

Memory files are plaintext readable by anyone with filesystem access. Log that a communication happened and its action items, not its content.

12
New cards

Why promote to MEMORY.md

Only today's and yesterday's logs load by default, so durable facts must move to MEMORY.md to stay in context.

13
New cards

Session

Stored state with history, start time, owner (user plus channel), and memory log path. Kept in SQLite by default; survives restarts.

14
New cards

Session isolation key

By default sessions are separate per channel and per peer, which prevents personal and work context from bleeding together.

15
New cards

Summarize vs truncate

Summarize the oldest turns at the soft threshold to keep continuity; truncate at the hard threshold as a backstop that drops them.

16
New cards

Heartbeat benefits

Proactive task triggering, system health checks, advancing background tasks, and memory maintenance.

17
New cards

Heartbeat model choice

Almost always a local or cheap model; typical heartbeat work fits a 1B-3B parameter local model.

18
New cards

Cache-friendly context ordering

Load stable content first, keep timestamps out of the system context, and keep tool schema order fixed.

19
New cards

cacheControlTtl

How long cached blocks persist; default 300 seconds. Raise it when interactions are hourly or less frequent.

20
New cards

Silent memory write failure

For example, disk quota exceeded: the reply looks normal but nothing persists. Monitor workspace disk and alert at 80%.

21
New cards

Context accumulation problem

Long multi-tool tasks pile results into one turn's context. Mitigate by compressing results, limiting verbosity, or splitting into separate turns.

22
New cards

Task checkpointing

For tasks over five tool calls, track the plan and progress in tasks_in_progress.md so a restart can resume instead of losing work.

23
New cards

Graceful shutdown

Enable maintenance mode, wait for in-progress turns to drain, then stop the container.

24
New cards

maxTurnDurationSeconds

Per-turn timeout so a hanging tool call can't block the queue forever. Set it near the 99th percentile of legitimate turn length.

25
New cards

Identity file reload

Identity files load at session start, so edits to SOUL.md or AGENTS.md during a session need a session restart.