Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8a533f0158 |
@@ -18,35 +18,35 @@ nix run git+https://gitea.surma.technology/surma/sausage
|
||||
```
|
||||
|
||||
This creates a world in `./world` the first time (it builds the agent, which
|
||||
takes a few minutes), then starts it with a console. Later runs start the
|
||||
existing world. The two steps on their own:
|
||||
takes a few minutes) and then starts it with a console. Later runs start the
|
||||
existing world. The two steps also exist on their own:
|
||||
|
||||
```sh
|
||||
nix run git+https://gitea.surma.technology/surma/sausage -- init # creates ./world and builds the agent
|
||||
nix run git+https://gitea.surma.technology/surma/sausage -- run # starts the world and a console
|
||||
nix run git+https://gitea.surma.technology/surma/sausage -- init # create ./world
|
||||
nix run git+https://gitea.surma.technology/surma/sausage -- run # start it
|
||||
```
|
||||
|
||||
`init` asks for the API shape (`openai-responses` or `anthropic-messages`),
|
||||
the base URL, the model, and the token. It reads `SAUSAGE_API`,
|
||||
`SAUSAGE_BASE_URL`, `SAUSAGE_MODEL`, and `SAUSAGE_API_TOKEN` first. The
|
||||
values go to `world/actor/agent/data/config.json`. Both commands take another
|
||||
folder as an argument, for example `... -- run my-world`.
|
||||
values go to `world/actor/agent/data/config.json`. `init` and `run` take
|
||||
another folder as an argument, for example `-- run my-world`.
|
||||
|
||||
To keep a world on the newest version, run it in a loop:
|
||||
|
||||
```sh
|
||||
nix run git+https://gitea.surma.technology/surma/sausage#loop # ./world, created if needed
|
||||
nix run git+https://gitea.surma.technology/surma/sausage#loop -- my-world # an existing world
|
||||
nix run git+https://gitea.surma.technology/surma/sausage#loop # ./world
|
||||
nix run git+https://gitea.surma.technology/surma/sausage#loop -- my-world # an existing world
|
||||
```
|
||||
|
||||
The loop runs `nix run --refresh git+https://gitea.surma.technology/surma/sausage -- run my-world`.
|
||||
The loop runs the newest `sausage` from that URL (`nix run --refresh`).
|
||||
When the host crashes or an actor sends `@broker {"type":"exit"}`, the loop
|
||||
fetches the newest commit and starts it again. `/quit` ends the loop. Set
|
||||
`SAUSAGE_FLAKE` to run another flake URL instead, for example your fork.
|
||||
|
||||
From a clone (`git clone https://gitea.surma.technology/surma/sausage`), the
|
||||
same commands are `nix run`, `nix run -- init`, `nix run -- run` and
|
||||
`nix run .#loop`.
|
||||
To work on Sausage itself, clone it
|
||||
(`git clone https://gitea.surma.technology/surma/sausage`) and use `nix run`,
|
||||
`nix run .#loop` and `nix develop` in the checkout.
|
||||
|
||||
In the console:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user