A small Go HTTP service that answers questions about a sample repository by asking a model to call code-search and file-reading tools.
The included model is deterministic. It keeps the exercise reproducible and removes the need for API keys, while preserving the control flow of a tool-using agent.
The candidate is required to use an agentic coding assistant (Amp, Claude Code, Codex, Cursor, etc.) during the interview.
Clone the repository and verify that its tests pass:
git clone https://github.com/sourcegraph/interview-agent-starter.git
cd interview-agent-starter
go test ./...Start the service:
go run . --root ./sample-repo --port 48081In another terminal, ask a question:
curl -sS http://localhost:48081/answer \
-H 'Content-Type: application/json' \
-d '{"question":"Where is ErrUnauthorized defined?"}' | jqYou should receive an answer with a citation and a trace containing one search call.
You can also try a question that the starter does not yet support:
curl -sS http://localhost:48081/answer \
-H 'Content-Type: application/json' \
-d '{"question":"How does authentication read the bearer token?"}' | jqDo not fix that limitation before the interview. We will extend the system together.
Request:
{"question":"Where is ErrUnauthorized defined?"}Successful response:
{
"answer": "ErrUnauthorized is defined in auth/errors.go. [auth/errors.go:5]",
"steps": [
{
"call": {"name": "search", "query": "var ErrUnauthorized"},
"output": "auth/errors.go:5:var ErrUnauthorized = errors.New(\"unauthorized\")\n"
}
],
"usage": {"input_tokens": 200, "output_tokens": 36, "cost_usd": 0.0002}
}agent.gocontains the current agent execution flow.model.godefines the model boundary and deterministic demo model.tools.goimplements code search and file reading.testdata/evals.jsoncontains example questions for later evaluation work.sample-repois the repository the agent researches.