Agentic Course Assistant Deep Dive¶
Project:
projects/agentic-course-assistant-showcase
Why This Deep Dive¶
Use this project when students are ready to move from ordinary scripts to agentic systems, but still need a reproducible local path before hosted model calls enter the workflow.
The course assistant is intentionally small:
- Classify a student question.
- Route it to a specialist intent.
- Call a deterministic course-catalog tool.
- Write a trace and response artifact.
- Validate the artifact contract.
- Compare the same design shape with optional OpenAI Agents SDK and Google ADK examples.
The default path is offline and deterministic. It is the path students should run first, and it is the path that belongs in default CI.
flowchart LR
Student["Student question"] --> Triage["Triage + intent classification"]
Triage --> Tool["Course catalog tool"]
Tool --> Specialist["Specialist response"]
Specialist --> Guardrail["Scope + secret guardrails"]
Guardrail --> Artifacts["Trace, resources, response, eval artifacts"]
Artifacts --> Verify["make verify"]
Verify --> Live["Optional OpenAI / Google ADK extension"]
Quickstart¶
Ask a custom question:
Run the focused quality gate:
What To Inspect¶
| Artifact | What It Teaches |
|---|---|
artifacts/course_assistant_response.md |
The routed answer students can read first. |
artifacts/agent_trace.json |
The route, specialist, guardrail notes, and resource evidence. |
artifacts/resource_matches.csv |
The deterministic tool output. |
artifacts/concepts/agentic_concepts.csv |
The concept map across offline, OpenAI Agents SDK, and Google ADK lenses. |
artifacts/concepts/openai_vs_adk_concepts.json |
Machine-readable framework comparison. |
artifacts/evals/agent_judge_rubric.json |
A starter rubric for agent-as-judge or trace-grading discussions. |
artifacts/evals/concept_coverage.json |
Coverage proof for the requested agent-framework concepts. |
artifacts/manifest.json |
The artifact contract validated by make verify. |
Lab Sequence¶
- Run the offline smoke path.
- Open
artifacts/course_assistant_response.mdand identify the selected intent. - Open
artifacts/agent_trace.jsonand map each trace step to the response. - Open
artifacts/resource_matches.csvand confirm the answer is grounded in public course resources. - Open
artifacts/evals/agent_judge_rubric.jsonand decide which rubric checks are deterministic versus judgment-based. - Read the concept atlas to connect the local workflow to OpenAI Agents SDK and Google ADK terms.
For the full classroom walkthrough, see the project lab guide in the source project:
Offline Harness First¶
The deterministic harness is the teaching anchor:
- It does not require API keys.
- It writes stable artifacts that can be inspected by another student.
- It makes routing and guardrails visible instead of hiding them inside a model call.
- It supports normal laptop execution with
uvand local Python. - It keeps default CI public-safe because optional SDK modules are not imported by default tests.
This is the recommended order for students:
- Make the local trace understandable.
- Make the artifact contract pass.
- Add or edit one specialist route.
- Add one deterministic test.
- Only then install optional live SDK extras.
flowchart TD
A["Understand local trace"] --> B["Pass artifact contract"]
B --> C["Extend one route"]
C --> D["Add one regression test"]
D --> E["Run make check + make verify"]
E --> F{"Need live SDK behavior?"}
F -- "No" --> G["Keep default CI offline"]
F -- "Yes" --> H["Install optional SDK extra"]
H --> I["Compare live behavior against offline trace"]
Optional Live SDK Path¶
Live SDK usage is an extension, not a requirement.
OpenAI Agents SDK setup:
Then configure OPENAI_API_KEY outside source control and call the optional reference function from a local scratch command or notebook:
uv run python - <<'PY'
import asyncio
from agentic_course_assistant.openai_agents_example import run_openai_agents_course_assistant
question = "How should I debug a suspicious validation score?"
print(asyncio.run(run_openai_agents_course_assistant(question)))
PY
Google ADK setup:
After configuring the Gemini or Vertex credentials expected by ADK, run the ADK-discoverable wrapper:
Use make sync-live only when a student intentionally wants both optional SDK extras in the same environment.
Public-Safe Guardrails¶
Keep the live path classroom-safe:
- Do not paste API keys into prompts, notebooks, logs, screenshots, or artifacts.
- Do not make live SDK imports part of default tests.
- Do not require hosted credentials for default CI.
- Use public course resources as the grounding source.
- Treat traces and artifacts as evidence students can discuss without private data.
How To Interpret Outputs¶
- A good answer is not enough; the trace should prove how the answer was selected.
- Tool output should be deterministic before an LLM is asked to synthesize.
- Guardrails should state what they protect and what they do not protect.
- Hosted SDK examples should preserve the same route, tool, and trace mental model.
- Evals should start with local artifact checks before moving to agent-as-judge scoring.
Next Step¶
Continue with the Agent Frameworks track, then compare this project with projects/autoresearch for a broader agent-guided research loop.