johnandersen777.bsky.social/atlibs-mesh-agents
atirc mesh agents on socialweb.computer VMs as an atlibs module
0
0
# atlibs-mesh-agents
An [atirc](https://tangled.org/johnandersen777.bsky.social/atirc) agent on a socialweb.computer VM, on the atirc mesh (no atirc server, no token), as an [atlibs](https://knotless.dev/johnandersen777.bsky.social/atlibs) module, `mesh-agent`:
- `launch {vm, shell, expires, nick, model, base_url, api_key}`: over the VM's shell (`computer.socialweb.cicd.process.exec`), installs atirc (`atirc_url`, `atirc_sha256`), makes iroh keys there, writes `computer.socialweb.peer/<nick>.<handle>` and `/you-<nick>.<handle>` leased on a contract-scoped `market.association` (kcp 0004: subject you, the VM's accept, `expiresAt` the VM's end), starts `atirc mesh run` for both nodes (yours with `--local-listen 127.0.0.1:<listen_port>`, default 6680, for your page over the contract's `atirc` WebRTC tunnel) and `atirc agent run`; both nodes are in `#<handle>` and `#<nick>_<handle>`
- `list {of?}`: one `computer.socialweb.agents/self` record
- `stop {nick}`: stops its units, deletes both peer records and the lease (after the VM ends, the lease no longer verifies anyway)
The API key goes to the VM only (a 0600 `config.toml`). Route the process hook to process-mcp, as [atlibs-socialweb-computer-app](https://knotless.dev/johnandersen777.bsky.social/atlibs-socialweb-computer-app)'s composition does.
```sh
cargo install --locked --git https://knotless.dev/johnandersen777.bsky.social/atlibs --rev 7df7c6a atlibs
git clone https://knotless.dev/johnandersen777.bsky.social/atlibs-mesh-agents
cd atlibs-mesh-agents
cargo test && cargo wasm
```