Install nix
To test installation, run echo $PATH
and ensure {...}/.nix-profile/bin
is the first element; if not, try export PATH=$HOME/.nix-profile/bin:$PATH
Make sure you have the nix-pkgs channel set, ie.
nix-channel --add https://nixos.org/channels/nixpkgs-unstable
nix-channel --update
just shell
to run the nix and poetry shells.just play {gradio, repl, zulip, discord}
. Default mode if you don't provide one will create a link to a gradio UI. (for zulip or discord, see extra configuration below.)just summon <prompt-file-path> {gradio, repl, zulip, discord}
.just ontology <path-to-knowledge-base> {gradio, repl, zulip, discord}
. This will allow you to ask questions over the knowledge base you provide. Protip: make sure the knowledge base does not have nested directories. scripts/copy_files_flat.sh can help with this.The agent_config.json file in this directory is a sample configuration file. Copy it to ~/agent_config.json.
DISCORD: If you want to the agent's index to be constructed from channels on a discord server, add the relevant discord channel IDs to the CHANNEL_IDS
variable in agent_config.json. Make sure you set the INDEX_MODE variable to either "discord" or "directory". In order for the channels to be read, you need to set the DISCORD_TOKEN
environment variable to your discord bot's API key. If you're otherwise running as a discord bot, you also need to set the DISCORD_TOKEN
environment variable to your bot's API key.
ZULIP: If running a zulip agent, you will also need a zulip config file. Go to Zulip and navigate to 'Settings' --> 'Personal Settings' --> 'Bots'. Download the zuliprc file and copy it to ~/zuliprc.
exit
Ctrl + d
poetry env list
and then paste the outputted env into poetry env remove {env-name}
. Then, run poetry install
and poetry shell
again to instantiate a new env.nix
and poetry
allow for packaging for serverless execution with reliable system, package, and other application dependencies like Secrets correctly derived for individual agent
runtime environment.