soev for developers
soev-inspectReference

Commands

soev-inspect: list, export and inspect the threads of a trace store, in the browser or as text.

A store is a trace file, a directory of trace files, a SQLite file (.db) or a Postgres trace store (postgresql://…?schema=NAME). An inspect command replays each model call with the agents --agents names, in this process: the code in this environment builds the requests.

soev-inspect

soev-inspect [-h] {serve,list,export,export-call,outline,call,message,diff,search} ...

soev-inspect serve

List and show threads in the browser

soev-inspect serve [-h] --agents AGENTS [--resources RESOURCES] [--model MODEL]
                          [--port PORT] [--no-browser] [--reload]
                          [source] [thread_id]
ArgumentDefaultDescription
--agentsrequiredmodule:NAME of a mapping from each agent name to its Agent, for example myapp.agents:AGENTS. The module is imported from the current directory.
--resourcesmodule:NAME of a function that takes an agent and returns its resources for a replay (soev_inspect.OfflineResources)
--modelrebuild every turn as if its input had named this model
sourcethe first source; more can be added in the page
thread_idthe thread to open first
--port00 picks a free port
--no-browserdo not open the page in a browser
--reloadrestart when a Python file under this directory changes

soev-inspect list

The source's threads, newest first

soev-inspect list [-h] [--agent AGENT] [--limit LIMIT] [--before BEFORE] [--json] source
ArgumentDefaultDescription
sourcerequireda trace file or directory, a .db file or a postgresql:// URI
--agentonly the threads of this agent
--limit50threads per page
--beforethe last thread id of the previous page
--jsonprint the page as JSON

soev-inspect export

Copy threads into a directory or a store

soev-inspect export [-h] [--agent AGENT] [--limit LIMIT] source target [thread_ids ...]
ArgumentDefaultDescription
sourcerequireda trace file or directory, a .db file or a postgresql:// URI
--agentonly the threads of this agent
--limit50threads per page
targetrequireda directory of trace files, a .db file or a postgresql:// URI
thread_idsthe threads to copy; every listed thread when left out

soev-inspect export-call

One call's request as built, as a JSON file that probe run --recorded replays

soev-inspect export-call [-h] --agents AGENTS [--resources RESOURCES] [--model MODEL]
                                source [thread_id] call target
ArgumentDefaultDescription
sourcerequireda trace file or directory, a .db file or a postgresql:// URI
--agentsrequiredmodule:NAME of a mapping from each agent name to its Agent, for example myapp.agents:AGENTS. The module is imported from the current directory.
--resourcesmodule:NAME of a function that takes an agent and returns its resources for a replay (soev_inspect.OfflineResources)
--modelrebuild every turn as if its input had named this model
thread_idmay be left out when the source holds one thread
callrequired
targetrequiredthe JSON file to write

soev-inspect outline

Every event, numbered, with the model calls marked

soev-inspect outline [-h] --agents AGENTS [--resources RESOURCES] [--model MODEL] [--json]
                            source [thread_id]
ArgumentDefaultDescription
sourcerequireda trace file or directory, a .db file or a postgresql:// URI
--agentsrequiredmodule:NAME of a mapping from each agent name to its Agent, for example myapp.agents:AGENTS. The module is imported from the current directory.
--resourcesmodule:NAME of a function that takes an agent and returns its resources for a replay (soev_inspect.OfflineResources)
--modelrebuild every turn as if its input had named this model
thread_idleave it out when the source holds one thread
--jsonprint the same content as JSON

soev-inspect call

One call's messages and tools, each with its size

soev-inspect call [-h] --agents AGENTS [--resources RESOURCES] [--model MODEL] [--json]
                         source [thread_id] call
ArgumentDefaultDescription
sourcerequireda trace file or directory, a .db file or a postgresql:// URI
--agentsrequiredmodule:NAME of a mapping from each agent name to its Agent, for example myapp.agents:AGENTS. The module is imported from the current directory.
--resourcesmodule:NAME of a function that takes an agent and returns its resources for a replay (soev_inspect.OfflineResources)
--modelrebuild every turn as if its input had named this model
thread_idleave it out when the source holds one thread
--jsonprint the same content as JSON
callrequiredthe number of the call, as outline shows it

soev-inspect message

One message of one call in full

soev-inspect message [-h] --agents AGENTS [--resources RESOURCES] [--model MODEL] [--json]
                            [--sent] [--lines LINES]
                            source [thread_id] call message
ArgumentDefaultDescription
sourcerequireda trace file or directory, a .db file or a postgresql:// URI
--agentsrequiredmodule:NAME of a mapping from each agent name to its Agent, for example myapp.agents:AGENTS. The module is imported from the current directory.
--resourcesmodule:NAME of a function that takes an agent and returns its resources for a replay (soev_inspect.OfflineResources)
--modelrebuild every turn as if its input had named this model
thread_idleave it out when the source holds one thread
--jsonprint the same content as JSON
callrequiredthe number of the call, as outline shows it
messagerequiredthe number of the message, as call shows it
--sentas the inference client would send it
--linesA:B, a range of lines counted from 1

soev-inspect diff

What changed since the previous call

soev-inspect diff [-h] --agents AGENTS [--resources RESOURCES] [--model MODEL] [--json]
                         source [thread_id] call
ArgumentDefaultDescription
sourcerequireda trace file or directory, a .db file or a postgresql:// URI
--agentsrequiredmodule:NAME of a mapping from each agent name to its Agent, for example myapp.agents:AGENTS. The module is imported from the current directory.
--resourcesmodule:NAME of a function that takes an agent and returns its resources for a replay (soev_inspect.OfflineResources)
--modelrebuild every turn as if its input had named this model
thread_idleave it out when the source holds one thread
--jsonprint the same content as JSON
callrequiredthe number of the call, as outline shows it

Where text occurs in the events and messages

soev-inspect search [-h] --agents AGENTS [--resources RESOURCES] [--model MODEL] [--json]
                           source [thread_id] text
ArgumentDefaultDescription
sourcerequireda trace file or directory, a .db file or a postgresql:// URI
--agentsrequiredmodule:NAME of a mapping from each agent name to its Agent, for example myapp.agents:AGENTS. The module is imported from the current directory.
--resourcesmodule:NAME of a function that takes an agent and returns its resources for a replay (soev_inspect.OfflineResources)
--modelrebuild every turn as if its input had named this model
thread_idleave it out when the source holds one thread
--jsonprint the same content as JSON
textrequiredthe text to find

On this page