Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0951ba18e1 |
@@ -11,24 +11,23 @@ change its own code.
|
|||||||
## Start
|
## Start
|
||||||
|
|
||||||
You need [Nix](https://nixos.org/download) with flakes, and an API token for
|
You need [Nix](https://nixos.org/download) with flakes, and an API token for
|
||||||
an LLM (OpenAI Responses or Anthropic Messages API).
|
an LLM (OpenAI Responses or Anthropic Messages API). No clone needed:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
git clone https://gitea.surma.technology/surma/sausage && cd sausage
|
nix run git+https://gitea.surma.technology/surma/sausage -- init # creates ./world and builds the agent (a few minutes)
|
||||||
nix run -- init # creates ./world and builds the agent (a few minutes)
|
nix run git+https://gitea.surma.technology/surma/sausage -- run # starts the world and a console
|
||||||
nix run -- run # starts the world and a console
|
|
||||||
```
|
```
|
||||||
|
|
||||||
`init` asks for the API shape (`openai-responses` or `anthropic-messages`),
|
`init` asks for the API shape (`openai-responses` or `anthropic-messages`),
|
||||||
the base URL, the model, and the token. It reads `SAUSAGE_API`,
|
the base URL, the model, and the token. It reads `SAUSAGE_API`,
|
||||||
`SAUSAGE_BASE_URL`, `SAUSAGE_MODEL`, and `SAUSAGE_API_TOKEN` first. The
|
`SAUSAGE_BASE_URL`, `SAUSAGE_MODEL`, and `SAUSAGE_API_TOKEN` first. The
|
||||||
values go to `world/actor/agent/data/config.json`. Both commands take another
|
values go to `world/actor/agent/data/config.json`. Both commands take another
|
||||||
folder as an argument, for example `nix run -- run my-world`.
|
folder as an argument, for example `... -- run my-world`.
|
||||||
|
|
||||||
To keep a world on the newest version, run it in a loop:
|
To keep a world on the newest version, run it in a loop:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
nix run .#loop -- my-world
|
nix run git+https://gitea.surma.technology/surma/sausage#loop -- my-world
|
||||||
```
|
```
|
||||||
|
|
||||||
The loop runs `nix run --refresh git+https://gitea.surma.technology/surma/sausage -- run my-world`.
|
The loop runs `nix run --refresh git+https://gitea.surma.technology/surma/sausage -- run my-world`.
|
||||||
@@ -36,6 +35,9 @@ 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
|
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.
|
`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 -- init`, `nix run -- run` and `nix run .#loop`.
|
||||||
|
|
||||||
In the console:
|
In the console:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
|
|||||||
Reference in New Issue
Block a user