Fundamentals
This class is about using AI coding agents and it expects a certain level of prerequisite knowledge. I understand that not all students may have been exposed to some of the things that I list here. Useful resources are provided below and help will be provided in the first week or so of the class but the expectation is that you work through them and put in the effort needed to understand these basics.
- Know how to navigate around in your terminal. We will be using linux commands primarily, so windows users should install WSL2. You can find useful videos that walk you through the basics here and here.
- A code editor like VS Code to open a whole folder in, write code, inspect files etc. You can install it from here if you don’t have it already (it’s funny I just noticed it’s now called the “AI code editor” used to just be “code editor”).
- Have a working installation and basic familiarity with the version control system
git. Runninggit --versionshould return something. Ensure you’ve setgit config --global user.nameanduser.email. There are almost infinite sources online where you can learn what Git is about but here are a few:- The git official docs: https://git-scm.com/learn
- If you like gamified things: https://ohmygit.org/ or https://github.com/skills/introduction-to-git
- If you messed something up and hope the git gods have a solution: https://ohshitgit.com/ (or a version with fewer swear words: https://dangitgit.com/en)
- Github account (make one here if you don’t have it - use a username you’ll be happy about having public) and documentation here. A couple of things here - GitHup has stopped accepting account passwords for git operations. If pushing to a repo prompts you for a password, you are not fully setup. Two ways you can choose from: SSH keys (generate a key, add it to your account and then use the
git@github.com:type URLs) or theghCLI (install the CLI and then rungh auth login). I’d recommend the second approach with the CLI - it’s a little easier and is worth having for your agents to interact with GitHub anyways.
If any of this is scary or doesn’t make any sense to you, please come talk to me and come attend the “bootcamp” office hours that I’ll announce in class.
Getting started
- Install
pi. See here. Open a new terminal window and check thatpi --versionprints a version - Install the Parley extension for
pi:pi install npm:mit-parley-pi-extension - Load your Parley key. You should have received an email asking you to login to Parley - go check: https://platform.parley.mit.edu/. Once you have copied your parley key for this course add this line to your
~/.zshrc(macOS) or~/.bashrc(linux):export PARLEY_API_KEY="sk-parley-v1-YOUR_KEY". Then open a new terminal. - Test
piwith your parley keys -pi --model MIT-parley/bedrock/claude-sonnet-5- that should open pi and you should be able to type in a message and you should get a reply. You can use/modelto switch models around. Ifpi --list-modelsdoes not show MIT-parley models then the extension did not install properly.
[Optional for now]
- Install
nonofrom here.nonois a sandbox that limitspito your project folder and keeps your API keys out of reach of your agents. We’ll talk more about this in class in detail in a week or so. Setting something up like this is important if you want to experiment with more “AFK” approaches. - Test
nonowithpi. Download the class profile, then runpithrough it from inside a project folder:
mkdir -p ~/.config/nono/profiles
curl -fsSL https://16s893-ai-for-engineering-research.github.io/class-repo/mit-parley.json -o ~/.config/nono/profiles/mit-parley.json
nono run --profile mit-parley --allow-cwd -- pi --model MIT-parley/bedrock/claude-sonnet-5
You should get a reply just as in step 4.
3. Add a shortcut. Put this line in ~/.zshrc or ~/.bashrc and open a new terminal:
alias pi-nono='nono run --profile mit-parley --allow-cwd -- pi'
From then on, pi-nono starts the sandboxed session and plain pi still works as before.
Other tools we will need through the semester
I’ll keep adding to this list as we go through the semester:
- If you are not familiar with markdown (files that end with
.md) it is a very simple markup language that is used all over the programing world (in fact I’m writing this page in Obsidian which is a md editor that is then getting built into a website). GitHub has what looks to be a fun learning exercise here that you can try out. - The pi coding harness - see here.
backlog.md- I recommend
uvfor package management. Install from here nonoprovides some good sandboxing tools. Install it from here.