Shells and kernels

A terminal and a notebook, on the record.

A computer is a device with channels. Its shell is a real pseudo-terminal; its kernel runs notebook cells in Python. An agent with a standing grant types and runs as a person does, and the host records each input before it is written.

Two channels of a computer

The grant first, then the record, then the keys.

The host opens a channel only for a principal with a grant on the unit. Each input is a command record, written with who sent it, before it reaches the shell or the kernel. What comes back is recorded too.

How an agent drives a computer's shell and kernelAn agent calls the local host's MCP server. The host refuses to open a channel without a standing grant on the computer unit. With one, it records each command with the agent as its principal, then writes it to the pseudo-terminal or the Python kernel. The terminal's bytes and the kernel's replies are recorded as the device's records.An agentagent:case-studiesStanding granton the unit pc-1The commandrecordwith by: the agentshella pseudo-terminalpythona notebook kernelRepliesbytes · outputs ·stateHow an agent drives a computer's shell and kernelAn agent calls the local host's MCP server. The host refuses to open a channel without a standing grant on the computer unit. With one, it records each command with the agent as its principal, then writes it to the pseudo-terminal or the Python kernel. The terminal's bytes and the kernel's replies are recorded as the device's records.An agentagent:case-studiesStanding granton the unit pc-1The command recordwith by: the agentshella pseudo-terminalpythona notebook kernelRepliesbytes · outputs · state

Run for this page

Refused, granted, four cells.

A host started on this computer in an empty home, with one physical world and one computer unit in it. The agent asked to open the kernel before it held a grant, and was refused. With a grant on the unit, it ran four cells.

desk/worlds/desk/world.tsx#pc-1.pythonreal records · a host in a scratch home · 2026-11-04
open python   agent:case-studies   refused: holds no grant to open …world.tsx#pc-1.python
grant         account:owner        agent:case-studies on pc-1 (grants.json)
open python   agent:case-studies   state open
execute       agent:case-studies   f"Python {platform.python_version()}"   ok   'Python 3.12.3'
execute       agent:case-studies   squares = [n * n for n in range(1, 11)]; sum(squares)   ok   385
execute       agent:case-studies   class Card: def _repr_html_ … Card()    ok   text/html <b>385</b>
execute       agent:case-studies   1 / 0                                   error ZeroDivisionError: division by zero

The terminal

One line typed, the terminal's answer kept.

On the same unit the agent opened the shell and typed one line. The shell printed the kernel's name and Python's answer, then exited. The bytes are the stream's data.bin; each chunk has a reply record that says when it came.

The shell's prompt and the rest of its output are left out of this page: they name the computer and its user.

input record, by agent:case-studies, written before the shell saw it
1
reply records timing the terminal's 272 bytes
3
the shell's exit code
0

This computerStanding grants

typed   echo "kernel $(uname -s) $(uname -m)"; python3 -c "print(6 * 7)"; exit
out     kernel Linux aarch64
out     42
state   exited 0
来源文件 desk/worlds/desk/world.tsx#pc-1.shell输出 case-studies/shells-and-kernels/stats.json工具 scripts/sites/case-studies.mjs shells-and-kernels运行于 This computer (dell-gb10-1): a local host in a scratch home, no platform link时间

Give an agent a terminal.

Grant it a computer unit, and it types and runs cells on the record.