KlassenPilot is a minimal teacher-level AI copilot prototype for a Gymnasium teacher. It currently supports one class (Klasse 9b) with Chemie + Englisch focus and two workflows:
- Log a lesson from rough notes.
- Generate the next lesson plan from accumulated class memory.
- Python
- Streamlit UI
- OpenAI Agents SDK
- Local markdown files as memory
- No database/auth/grading
app.py
teacher_agent/
|-- __init__.py
|-- agent.py
|-- backend.py
|-- contracts.py
|-- prompts.py
|-- schemas.py
|-- tools.py
`-- wiki_store.py
teacher_wiki/
|-- AGENTS.md
|-- index.md
|-- log.md
|-- teacher_profile.md
|-- subjects/
| |-- chemie.md
| `-- english.md
`-- classes/
`-- class_9b_2026_27/
|-- course_state.md
|-- lesson_graph.md
|-- student_notes.md
|-- misconceptions.md
`-- open_loops.md
app.pycontains only Streamlit UI logic: layout, session state, buttons, messages, and rendering.teacher_agent/contracts.pydefines the fixed UI/backend boundary: request/response types, bootstrap data, and UI-facing memory drafts.teacher_agent/backend.pyis the facade the UI calls for app bootstrap, lesson structuring, lesson planning, and approved memory saves.teacher_agent/schemas.pydefines backend/domain schemas:LessonLogInput,WikiUpdateProposal,WikiUpdateBundle, andLessonPlan.teacher_agent/wiki_store.pyowns all wiki file reads/writes and restricts writes to the approved class-memory files.teacher_agent/tools.pyexposes safe app actions for loading context, preparing proposals, and applying approved updates.teacher_agent/prompts.pycontains the system prompt and task prompt builders.teacher_agent/agent.pycreates and runs the OpenAI Agents SDK agents and validates their outputs into schemas.
- Create and activate a virtual environment.
- Install dependencies:
pip install -r requirements.txt- Set your API key:
export OPENAI_API_KEY="your_key_here"- Run the app:
streamlit run app.py- Enter rough notes in "What happened in today's lesson?".
- Click "Structure lesson notes".
- The agent proposes complete markdown updates for:
lesson_graph.mdcourse_state.mdmisconceptions.mdstudent_notes.mdopen_loops.md
- Review proposed changes in the UI.
- Click "Approve and save memory" to persist updates.
- Click "Generate next lesson plan" to create a plan from current memory.
- The agent does not write directly to memory files.
- Memory writes only happen after explicit user approval.
- Student notes should only use pseudonymous IDs like
S-001,S-002.