:3
alex README.md
1.9 kB · 35 lines
Markdown
at main

An attempt to see what happens when you take an agent and throw it in a container with free access on itself and a slightly adversarial personality.

REDESIGN.md contains the original plans used for the current design, but they're a bit out of date.

File tree:

  • docker-compose.yml: an example docker-compose for the container
  • alex: the main project

alex: Uses bun.

  • apis: implementations of globals available in the execute tool.
  • prompts: all initial text files needed for the agent to set itself up.
  • src: the main source code.
    • context.ts: manages the agent's wake-up status.
    • credits.ts: handles the agent's run-time limits
    • cycle.ts: handles running a cycle
    • execute.ts: dispatcher for the execute tool and slight sandboxing
    • lifecycle.ts: the main sleep-launch-wakeup loop
    • main.ts: main entrypoint for one cycle. Makes sure the agent is not locked, configuration is set, etc.
    • session.ts: handles the API calls
    • state.ts: manages cross-cycle state like cycle counts and wake-up times
    • tools.ts: implementations of all tools
    • utils.ts: utility functions used throughout the project
  • Dockerfile: the dockerfile used to build the container. Uses Nix so that the agent can install programs.
  • entrypoint.sh: loads up the right Nix profile so that commands happen in the right environment.
  • flake.nix: the default installed things we need
  • package.json: dependencies for typescript
  • setup.ts: a script to create an agent and set it up
  • tsconfig.json: typescript configuration

Future work: there's a few TODOs in the code. Something useful in the future would be some processes running in the background for 2-way communication, with APIs or something. Separate from the alex folder, so that alex really only talks about the agent and interacts via files.