← Back to cases
Published: Compiled by YuanASItechnical interviewsmulti-turn conversationshared memorystructured outputopen-multi-agent

Technical interview simulator: interviewer, observer and structured debrief

Official cookbook recipe

Industry
Business services · Technical interviews
Source
Official open-multi-agent cookbook
Stage
Runnable example
This is an official open-multi-agent cookbook example, maintained by YuanASI. It runs a technical interview in the terminal: the interviewer agent reads the resume, project notes, a code sample and the job requirements, and asks one question per round; each round the observer agent reads the Q&A summary in shared memory and writes follow-up notes; a person answers in the terminal, and at the end a third agent outputs a JSON debrief validated against a Zod schema.

Scenario

A typical scenario: a technical interviewer gets a resume, a piece of code the candidate wrote and the job description, and has limited time to find out the candidate's real level. The usual problems: the questions do not match the candidate's material, follow-ups depend entirely on memory in the moment, and afterwards the interviewer has to recall which answers were thin and which areas went uncovered; the debrief ends up as a paragraph of prose that cannot be compared across interviewers.

This example orchestrates three agents by hand, outside runTeam() / runTasks(): the interviewer uses Agent.prompt() to keep a multi-turn conversation, the observer uses Agent.run() each round to re-read the shared-memory summary statelessly, and the two exchange information through a manually written SharedMemory; the person's answers come in through readline at the application layer, and the framework handles only the model calls and structured output.

How it works

RolesTask DAGToolsModelDeployment
interviewerEach round, step 1: Agent.prompt() asks the next question, keeping multi-turn conversation history (maxTurns 2, temperature 0.3)No tools registered (empty ToolRegistry)claude-sonnet-4-6 / anthropicLocal interactive npx tsx script; the candidate answers in the terminal via readline
observerEach round, step 2: after the candidate answers, Agent.run() reads shared memory and writes 3–6 follow-up notes (maxTurns 1, temperature 0.2)No tools registered (empty ToolRegistry)claude-sonnet-4-6 / anthropicSame
reporterRuns once after the loop ends, outputs a JSON debrief according to DebriefSchema (maxTurns 2, temperature 0.1)No tools registered (empty ToolRegistry)claude-sonnet-4-6 / anthropicSame

The models in the table are the example repository's defaults; the actual choice is made per scenario at the design stage.

The script's buildAgent() gives each of the three agents an empty ToolRegistry, so the flow makes model calls only. Before the interview starts, the script writes four files, resume.md, project-notes.md, code.ts and job-description.md, into SharedMemory; each round's Q&A is written as turn-N, and the observer's notes are written as observer/flags and overwritten the next round.

Both the interviewer's and the observer's input come from SharedMemory.getSummary(): it lists every memory entry grouped by agent, and truncates any single entry over 200 characters to its first 197 characters plus an ellipsis. The interviewer's prompt() additionally keeps all earlier Q&A in its own conversation history; the debrief agent sees only the summary.

The debrief agent has an outputSchema (DebriefSchema): questions_asked, weak_spots, strong_spots, and a recommendation on a five-level scale from strong-hire to no-hire. The framework first extracts JSON from the output and validates it with Zod; if the first attempt fails, it retries once with the error message attached (validateStructuredOutput in src/agent/agent.ts).

Result

Runnable artifacts and how to verify them:

Requires an API key. The script header lists ANTHROPIC_API_KEY as the prerequisite; without it the script prints [skip] and exits with code 0. Run it with npx tsx packages/core/examples/cookbook/personalized-interview-simulator.ts. Set INTERVIEW_CANDIDATE_DIR to use your own set of material, with four files of the same names in that directory.

Each round the terminal first prints the question under INTERVIEWER, then shows Candidate > and waits for input; typing exit or quit ends early, otherwise it runs the full 10 rounds. At the end it prints the JSON debrief under DEBRIEF and a Turns completed count, and finally prints Done.

If the interviewer or observer call fails, or the debrief does not produce a structured result that passes validation, the script prints the corresponding failed message and exits with code 1.

Tested on commit 2f1d0ff on 2026-09-23: a driver script wrote 3 preset English answers in turn after each Candidate > prompt and typed exit in round 4. The interviewer opened straight away with follow-ups on the concurrent approval and retries in the fixtures' approveExpense, and later questions picked up the Postgres unique constraint and SELECT ... FOR UPDATE mentioned in the answers; the debrief JSON passed validation with recommendation lean-no-hire, the script printed Turns completed: 3, exit code 0. In this run every Q&A entry exceeded 200 characters, so the answer part was cut from the summary, and the debrief's summary states that no candidate answers were captured. This test run swapped the example's committed anthropic / claude-sonnet-4-6 for DeepSeek's deepseek-flash; the rest of the logic ran unchanged.

The example uses fictional candidate material (the resume, project notes, expense-approval API code and backend job description in fixtures/interview-candidate); the output is model-generated text for demonstrating and verifying the flow.

Sources

SourceLinkVerified on
packages/core/examples/cookbook/personalized-interview-simulator.ts (commit 2f1d0ff)https://github.com/open-multi-agent/open-multi-agent/blob/2f1d0ff/packages/core/examples/cookbook/personalized-interview-simulator.ts
packages/core/examples/fixtures/interview-candidate/resume.md (commit 2f1d0ff)https://github.com/open-multi-agent/open-multi-agent/blob/2f1d0ff/packages/core/examples/fixtures/interview-candidate/resume.md
packages/core/examples/fixtures/interview-candidate/code.ts (commit 2f1d0ff)https://github.com/open-multi-agent/open-multi-agent/blob/2f1d0ff/packages/core/examples/fixtures/interview-candidate/code.ts
packages/core/examples/README.md cookbook entry (commit 2f1d0ff)https://github.com/open-multi-agent/open-multi-agent/blob/2f1d0ff/packages/core/examples/README.md
packages/core/src/memory/shared.ts (getSummary grouping and 200-character truncation, commit 2f1d0ff)https://github.com/open-multi-agent/open-multi-agent/blob/2f1d0ff/packages/core/src/memory/shared.ts
packages/core/src/agent/agent.ts (prompt conversation history and structured output retry, commit 2f1d0ff)https://github.com/open-multi-agent/open-multi-agent/blob/2f1d0ff/packages/core/src/agent/agent.ts
Local test run (commit 2f1d0ff, model swapped to deepseek-flash), observing 3 rounds of Q&A, a lean-no-hire debrief, Turns completed: 3 and exit code 0https://github.com/open-multi-agent/open-multi-agent/blob/2f1d0ff/packages/core/examples/cookbook/personalized-interview-simulator.ts

How this relates to YuanASI

The material on this page is a cookbook example in the official open-multi-agent repository, maintained by YuanASI.

If you have a real interview or assessment process, and want questions that fit the candidate's material and the job requirements, follow-up notes and debrief conclusions kept as structured records, and all of it connected to your own recruiting system, the matching YuanASI service is Custom AI Agent Development

Last updated

Want to know how a workflow like this would land on your side?