# Use case 05: Build an OpenAI text assistant

Set up your workspace, use the starter prompt, and verify the result for this Codex exercise.

Independent HybridGenAI learning guide. Reviewed October 25, 2026. These are suggested exercises, not official OpenAI courses or credentials. Setup examples have not been executed in every environment.

## Goal and prerequisites

Server runtime; official SDK; project API access for a live smoke check.

## Environment setup

Keep credentials server-side. Define a small input limit, output contract, and mocked API response.

Open only the intended project folder in Codex. Read applicable AGENTS.md and README instructions. Inspect git status before edits. Use sample data and keep secrets out of the repository.

## Starter prompt

Build a minimal assistant using the current official quickstart. Handle missing credentials, timeout, and provider failure.

First confirm the environment and relevant commands. Preserve unrelated changes. Report the files changed, checks actually run, and unresolved limitations.

## Build in small steps

Ask for a short implementation plan. Resolve missing prerequisites, implement one bounded slice, and inspect its diff before expanding. Use the existing package manager and lockfile rather than copying commands from an unrelated stack.

## Acceptance checks

Run mock tests first; with authorization, make one bounded live request and inspect usage.

## Troubleshooting

For authentication errors, verify the application project key; Codex login is separate.

## Finish and hand off

Review the complete diff, record the verification evidence, and document remaining work. Publishing, production migrations, and paid API calls are separate actions requiring an appropriate scope and budget.

## Official references

- https://learn.chatgpt.com/docs/codex/cli
- https://learn.chatgpt.com/docs/agent-configuration/agents-md
- https://developers.openai.com/api/docs/quickstart
