amiagent is the Amiga half of amimcp. It is a small TCP daemon that lets a
program on another machine work on this Amiga: run AmigaDOS commands, read and
write files, list drawers, report system state, capture the screen, and inject
mouse and keyboard input.
The other half is an MCP server that runs on a Mac or PC, which is how Claude
(Anthropic's LLM) talks to it. Nothing about the agent is specific to that,
though - the wire protocol is documented and simple enough to drive from a
shell script if you would rather.
It is written in plain C against the OS libraries, needs no third-party
dependencies, and runs on AmigaOS 2.0 upwards. Two builds are included:
amiagent 68000 - runs on any Amiga
amiagent.020 68020+ - slightly smaller and faster
WHAT IT DOES
* Run a command and get back its exit code, stdout and stderr. Commands run
in a child process, so one that hangs does not wedge the agent, and BREAK
sends it Ctrl-C remotely.
* Read and write files, list drawers with size, protection bits and dates.
* Report Kickstart, CPU, FPU, free Chip/Fast RAM and mounted volumes.
* Capture the screen - native truecolour/RTG via cybergraphics.library, any
screen, and optionally just a rectangle of it. Also a cheap checksum of a
region, for "has anything changed yet" without moving any pixels.
* Inject mouse and keyboard input, including relative motion for programs
that read raw deltas (SDL, so ScummVM and most games), held buttons for
Intuition menus and drags, and text through YOUR keymap so umlauts work.
NEW IN 0.5.3
Reading a file now uses a 64 KB buffer instead of 8 KB, so a transfer makes
an eighth as many round-trips to the filesystem - pulling a big file off a
real Amiga is noticeably quicker. On a machine too tight on memory to spare
the buffer it falls back to the old path, so nothing changes on a small
Amiga. No protocol change.
RUNNING IT
Bring your TCP/IP stack up first (Roadshow, AmiTCP, ...), then:
amiagent TOKEN=somesecret
It listens on port 7846 and prints that it is waiting. Ctrl-C stops it. To
start it at boot, add this to S:User-Startup AFTER your TCP/IP stack:
run >NIL: <path-to>/amiagent TOKEN=somesecret QUIET
SECURITY - PLEASE READ
amiagent runs whatever commands it is sent, and the connection is NOT
encrypted. Always set a TOKEN, keep it on a LAN you trust, and never forward
the port through your router. Without a TOKEN, anything on the network can
run any command on this machine.
Source, the MCP server, the protocol document and the issue tracker:
https://github.com/thomas-luebker/amimcp
Distributed under the licence in the archive.
|