This is a software engineer consultant that given a description of an idea will create a plan and then attempt to implement and test it.
- Clone the repo
poetry shell
# activates virtual environmentpoetry install
# install's dependenciescd isolation_env/python
docker build -t python_isolation
# create the docker image for the shell the assistant is allowed to usecd ../..
echo ANTHROPIC_API_KEY=..." > .env
# set the environment variable for the anthropic api key
python chat.py ${project_directory}
This will start the chatbot to work on the project in project_directory
The bot frequently forgets the rules for writing source files. It should emit a markdown block and then the write_file command but sometimes it emits the write_file command first. Usually it will figure out its mistake after a few surprises.
agent/llm.py
- Interacts with anthropic and provides the tool executionagent/detector.py
- Parsers that find the tool invocations in the LLM outputagent/shell.py
- Provides the isolated execution environment to the agent (via docker)consultant.prompt
- The prompt that creates the consultant behavior and describes the tool use