The repository
A start folder and the finish.
Open the kitinterview in conversations-room-starter
Build with Conversations · Recipe
Rehearse the interview before it counts.
Where to run it. Open a new, empty folder in your coding assistant, with your key in FOREVERLEARNING_API_KEY, the API host in FOREVERLEARNING_BASE_URL and your assignment in FOREVERLEARNING_ASSIGNMENT_ID, in the environment it runs commands in. Then paste the prompt.
Goal: an interview practice app. The user practices a job interview, gets a debrief tied to their own answers, and practices again, the same or harder.
Read first: https://developers.foreverlearning.ai/docs/conversation-practice/ (the Conversations API integration guide), and the OpenAPI contract and the TypeScript example linked there. Use only what they describe.
Start from: an empty folder.
Build, in TypeScript on Node 24 or later:
1. A small server that holds the key and is the only part that calls the Conversations API. Give each new browser a pseudonymous user id, kept in a cookie, and send it as X-User-Id.
2. For a new user, read the catalog, find the ready-made room titled "Interview Practice", and prepare a session with the first persona the room recommends and the challenge set to realistic. Request its opening once for that session.
3. The interview page, from each saved conversation_turn event: each entry of the turn's cast (its display_name and text) under that name, the Coach's note (the turn's coach.text) in its own panel (show nothing when coach is null or empty), and the safety status (its level and response action) and the receipt (the request id, the turns billed and the charge) with each reply. Give each turn an id made from its ordinal (for example turn-3). Beside each character's line, show a face for that character from the saved turn's characters (match each to its line by speaker_id, and use its expression_group): a face drawn in code for each of the five expression_group moods, and a neutral face when it is empty. Keep all the face artwork in one clearly named file, with one entry per mood and a comment that says how to put in your own images instead of the drawn ones.
4. A Finish button. The server closes the session with POST /v1/sessions/<session id>/end and an operation id it saves first and reuses on a retry, and accepts the closeout only when its session_ended and done events arrive. Then it reads the debrief, and the page shows it in plain words: what happened, what it means, the key moments, and the next practice, each line linked to the turns it came from. If the debrief is unavailable, say why in your own words. If it compares this interview with an earlier one, show what was new this time.
5. After the debrief, two buttons: Practice again (the same challenge) and Practice again, harder (the challenge set to resistant). Each prepares a new session in the same room and requests its opening. The page shows the round.
6. Treat a turn as complete only when its done event arrives with the same request id and session id as its metadata event. Append its receipt as one JSON line to receipts.jsonl: request id, session id, user id, operation, safety level, units, the amount in micro-dollars and the settlement.
7. A package.json whose `npm start` serves the page at http://localhost:$PORT (default 3000), and a README that says how to run it.
Rules:
- Keep the API key on the server, in the FOREVERLEARNING_API_KEY environment variable. Read the API host from FOREVERLEARNING_BASE_URL, and send FOREVERLEARNING_ASSIGNMENT_ID as X-Assignment-Id. Never send the key to the browser, print it or write it into a file.
- Give every POST its own new Idempotency-Key, a UUID. If a turn's outcome is uncertain, look it up with GET /v1/requests/<request id>; never send it again under a new key while its outcome is uncertain.
- If a turn fails (an error event arrives before done), it was not charged and it is final: show a short message in your own words and let the user send a message again. Never show raw error text or JSON.
- Show the interviewer's words exactly as returned. Describe how the interviewer responded, in the debrief and in the faces, as simulated responses in this practice, never as a reading of the user. Give each face its mood in words as its accessible label only, never as a caption on the page: the user reads the face.
- Use a pseudonymous user id, never a name or an email. Make a new random id for each new browser.
- Every opening, answer and closeout is a billable text turn, at 3¢ per text turn. Test with one interview (the opening, two answers, Finish) and one Practice again, as one user, keeping the same cookie. No more.
- Ending is optional: opening the learner's next session closes the open one with one billable closeout (3 cents), the same as calling end yourself. Call end when you want the debrief right away. Do not call end just to start another practice.
- Stop only the processes you started; never stop processes by name.
Done when:
- you ran `npm start`, the interviewer opened with a face beside their line, you answered twice, pressed Finish, and the debrief showed with links to your answers
- Practice again opened a new interview, round 2
- receipts.jsonl has one line for each confirmed turnPaste into your coding assistant.
How to check it. Open http://localhost:3000, answer the interviewer two or three times, press Finish, then Practice again. You should see:
The full check is in CHECK.md. To compare your result, the finished checkpoint is the interview folder of conversations-room-starter.
The replies and the debrief below are quoted word for word from one of our test runs of this kit, an app built from its prompt. Every reply is written fresh, so yours will use different words.
Run npm start and open http://localhost:3000.
The interviewer opens, under their name. Answer two or three questions. With each reply: the Coach's note in its own panel, the safety status and the receipt (1 text turn · $0.03 and the request id). Showing a shortened request id is fine if the full id is on the reply too, for example on hover.
Riley: Hey. Let’s get straight to the project story. Give me the version you’d use in the interview: what was going wrong, what did you do, and what changed?
Coach
What happened: Riley opened with the three parts the interview story needs: the problem, your action, and the result.
Why it matters: A clear sequence will keep the example specific without letting it sprawl.
Next move: You could start with the project problem and include one concrete sign that it was going off track.
You: Thanks for having me. I've spent four years leading a small support team, and I'm looking to move into operations.
Riley: That gives me the direction, but not the story yet. Pick one project that had a clear problem, and walk me through your role, the action you took, and the result. Keep the sequence intact.
Coach
What happened: You opened with relevant experience and named the role you want, while Riley asked for a specific project example.
Why it matters: The background establishes your direction, but the interview answer still needs one concrete problem and a result.
Next move: You could choose one project and state the problem, your action, and the measurable outcome in that order.
Beside each character's line, a face drawn in code that follows their mood on that turn: one of five moods, or the neutral face when no expression is reported. The faces are the characters' simulated responses, never a reading of you.
Your own artwork. All the face artwork is in one place: in the finished checkpoint, the block marked YOUR OWN ARTWORK GOES HERE in public/faces.js. Put your images in public/faces/ and write each one's address there, one per mood (and if you like, per expression or per character). Any mood you leave empty keeps the drawn face.
Finish closes the interview: the closing turn, with its receipt. Then your debrief, in plain words: what happened, what it means, the key moments and your next practice. Each line links to the answer it came from. How the interviewer responded is how they were written to respond in this practice, never a reading of you.
What happened
At turn 1, the first recorded moment marked Clarity and specificity as a possible next experiment.
At turn 2, the last recorded practice moment included Collaborative next step; Clarity and specificity was recorded as a possible next experiment.
What it means
Clarity and specificity was recorded as a missed opportunity or possible next experiment, not as a judgment about intent.
A collaborative next step was recorded as part of the close.
Key moments
Clarity and specificity: The recorded evidence points to Clarity and specificity as a useful experiment.
Collaborative next step: The recorded evidence shows Collaborative next step in this session.
Next practice
In another practice, deliberately try Clarity and specificity.
In another practice, notice what changes when you use Collaborative next step again.
In your app, each of these lines links to the answers it came from.
If the interview was too short for a debrief, a plain sentence says so.
Practice again starts round 2 with the same challenge. Practice again, harder sets the challenge to resistant: the interviewer holds their position and makes you earn any movement. Once there is an earlier interview to compare with, the next debrief shows what was new this time.
receipts.jsonl gains one line for each confirmed turn: each opening, each answer and each closeout. One full interview of three answers is five billable text turns, 15¢.
A start folder and the finish.
Open the kitinterview in conversations-room-starter
One click to start.
DownloadEvery call, by hand.
Read the integration guidePractice before it counts.
Read the integration guide