Skip to content

Set up for the course

Before week 1, prepare an agent, a code-hosting account and the course materials. Read the primer to practise generating a candidate and checking it. If access fails, use the fallback checklist and ask for help.

Before the first class

  1. Activate your coding-agent seat or credit. The teaching team will notify you before the course begins how the supplied access is provided and activated. Students do not pay for it. Check that you can sign in and ask the agent to explain a small function in your course directory. The tool should support instruction files, hooks, permission modes, MCP, subagents and readable session records.
  2. Prepare a code-hosting account. Check that you can sign in and create a course repository using the teaching team's submission instructions. For contributions, use the account and contribution rules of the assigned public repository; a permitted pseudonym or the course-hosted equivalent path is available.
  3. Get the course materials. Use the course checkout or student package supplied by the teaching team. Locate the schedule and the instructions for your current assignment. Check that Git and the language tools it requires work before asking the agent to change code. For Python exercises, check python3 --version and git --version; use Python 3.12. Read a repository's instructions before running its commands.

Four required safety practices

Practice What it means
1. Run the agent in a dedicated directory or container. Start in a new directory or container that holds only this course's public materials and your current work. File access must stay inside that boundary. A directory alone is not isolation.
2. Keep residency, employer and cloud credentials out of that environment. Use a fresh environment with no credential mounts and no inherited credential variables. Do not delete credentials from your host; start a fresh environment that does not inherit them.
3. Keep keys out of repositories, prompts, screenshots and logs. Inspect what you are about to send, share or commit. If a key appears, stop sharing it, revoke it immediately with the provider and notify the teaching team. Example keys are always sk-EXAMPLE.
4. Disconnect injection demonstrations from external networks and connect only to local mock services. The demonstration runs offline and reaches only services on your own computer. If it needs an external destination or a real credential, stop and ask for help.

Check each practice yourself before you start. Run the commands in the environment where the agent will run. On Windows, run them in WSL or Git Bash.

Practice 1. From the directory where you will start the agent:

pwd
find . -type l -exec ls -l {} +

Expected: pwd prints your dedicated course directory, and no listed link points outside it. In a container, ls ~ also shows no files from your own home.

Practice 2. List the names of credential-like variables, never their values:

awk 'BEGIN{for(n in ENVIRON)if(tolower(n)~/token|key|secret|credential|password/)print n}'

Expected: no output, or only the variable your agent's own sign-in uses.

Practice 3. Before committing, search what is staged:

git diff --cached | grep -n -i -E 'sk-|token|secret'

Expected: no output, or only the placeholder sk-EXAMPLE. For any other line, read it and decide whether it is a real secret before committing. Read a prompt or a screenshot the same way before you send it.

Practice 4. Before running an injection demonstration, replace DEMO_DIR with the demonstration's directory named in that week's activity:

grep -rnE 'https?://|[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' DEMO_DIR

Expected: every reported destination is 127.0.0.1 or localhost. A bare hostname without a scheme is not caught by this check, so also read the demonstration's target list.

These checks apply to agent-generated code and commands as well as work you write yourself. Check a proposed command's scope before granting permission, then verify its result against an acceptance criterion. Keep the work product, verification results and a brief explanation with one AI-use note; share only the excerpts the assignment requires.

Try a small request

In your dedicated directory, write the requirement for a function that returns the larger of two integers. Predict a result for negative and equal inputs. Ask your agent for a candidate, inspect the code, then use the primer checks. A fluent response is a proposal; a check you can explain is evidence.