org.llm4s.agent.harness
Members list
Packages
Type members
Classlikes
The events the harness middleware send, each an org.llm4s.agent.graph.EventType to match a StreamEvent with, as org.llm4s.agent.events.AgentEvents are.
The events the harness middleware send, each an org.llm4s.agent.graph.EventType to match a StreamEvent with, as org.llm4s.agent.events.AgentEvents are.
Durable (stored, replayed, no content): TodosUpdated. Live (current subscribers only): TodosProgress.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
HarnessEvents.type
One item of an agent's plan. id is assigned by the write_todos tool and stays with the item while the model keeps it in the list; it is never given to another item of the same thread.
One item of an agent's plan. id is assigned by the write_todos tool and stays with the item while the model keeps it in the list; it is never given to another item of the same thread.
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
A thread's plan, as TodoMiddleware.key stores it: the todos in order, and nextId, the number the next new todo's id takes, so no id is reused within the thread.
A thread's plan, as TodoMiddleware.key stores it: the todos in order, and nextId, the number the next new todo's id takes, so no id is reused within the thread.
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
A todo's id and status, without its content.
A todo's id and status, without its content.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
A plan for the agent: a write_todos tool that replaces the thread's todo list, and a prompt section that shows the list to the model on every model step (design §4.30).
A plan for the agent: a write_todos tool that replaces the thread's todo list, and a prompt section that shows the list to the model on every model step (design §4.30).
- The tool takes the whole list -
content,status(pending,in_progress,done) and, to keep an item, itsid- and stores it in TodoMiddleware.key. An item without an id keeps the id of an unclaimed todo with the same content, or takes a fresh one; an id is never reused within a thread. A list of more thanmaxTodositems, an item whose content is empty or overmaxTodoCharscode points, an id given twice, or an id the list does not have, is refused as a tool error the model sees. The tool lockstodos, so two calls in one model message run in turn, the second seeing the first's list. - The sections:
todos-guide, cacheable, on how to use the tool; andtodos, the current plan, while it is not empty. Both are bounded by the limits whatever the stored list holds: at mostmaxTodostodos are shown, each cut tomaxTodoCharscode points. - Events: each change emits a durable HarnessEvents.TodosUpdated (ids and statuses) and a live HarnessEvents.TodosProgress (the whole list).
The plan guides the model only: it never routes, filters tools, or changes a permission. write_todos is a tool like any other, so a PermissionMiddleware decides it by its default resource, invoke write_todos. An output Block restores the list to its value before the turn.
The key, and the lock schedule the tool's lock needs, are registered only by an agent family with a TodoMiddleware: adding one to an existing agent changes its graph's structure.
Value parameters
- maxTodoChars
-
the most code points one todo's content may hold; at least 1
- maxTodos
-
the most todos one list may hold; at least 1
Attributes
- Companion
- object
- Supertypes
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
TodoMiddleware.type
Where a Todo stands. On the wire, and in the write_todos schema: pending, in_progress, done.
Attributes
- Companion
- enum
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
TodoStatus.type
The plan after a change, content included; live only.
The plan after a change, content included; live only.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
The plan after a change, as ids and statuses in order; durable, so it carries no content.
The plan after a change, as ids and statuses in order; durable, so it carries no content.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all