An autonomous assistant for remote math tutors who run their teaching workflow in Google Workspace.
User persona: a private tutor/teacher who uses Google Calendar for lesson scheduling, Google Drive for student notes and homework, and Google Meet for online classes.
This project turns repetitive coordination work into agentic workflows so the tutor can focus on teaching, not admin.
Optionally, chat can display the agent's reasoning trace.
The assistant can:
- read lesson context from calendar + notes,
- suggest and upload matching homework,
- clean and normalize Drive structure,
- onboard new students with meeting + folders,
- prepare vacation notifications.
- store important info in its memory.
- Daily Summary
- Homework Matching
- Google Drive Cleanup
- Onboarding New Student
- Vacation Notification
Planned improvements that extend automation from operations into teaching quality and business support:
- Matura exam checking with CKE alignment
Consistently evaluate completed exams against official CKE grading schemes to save significant teacher time. - Personalized worksheet generation (RAG)
Create tailored worksheets from teacher-uploaded materials and historical student context. - Intelligent schedule planning
Suggest lesson slots based on teacher availability, workload, and calendar constraints. - Student progress monitoring
Track learning trends over time and highlight students who need intervention. - Lesson payment tracking
Add lightweight billing visibility for completed lessons and outstanding payments.
Critical engineering decisions:
- Safety-first agent design (human-in-the-loop for critical actions): onboarding and email-sending flows require explicit user consent (
approved_by_user=true) before execution. - Bounded self-repair strategy: tool failures follow a structured auto-retry policy (up to 3 attempts), then stop with clear escalation messaging instead of looping indefinitely.
- Production-aware observability: dual logging with app logs and structured Strands telemetry, including per-session trace files for postmortem debugging.
- Persistent, namespaced agent memory: JSON-backed memory supports separate thread contexts, with runtime CRUD tools (
save_to_memory,read_memory,delete_from_memory). - Deterministic tool-output orchestration: passthrough handling ensures selected workflows return exact tool output 1:1 when strict formatting is required.
- Scalable async workflows: daily summary and homework pipelines use asyncio + concurrency limits (
max_concurrency) to process multiple lessons efficiently. - Strong validation and parsing layer: typed models (Pydantic) and robust date parsing (PL/EN natural language + ISO formats) reduce runtime ambiguity.
- Test depth beyond unit level: includes integration tests for approval workflows and agent behavior, not only isolated function tests.
- Clean developer ergonomics: Docker +
uvworkflows,rufflinting, and explicit CLI commands for chat, memory, and operational modes.
Before running:
- rename
secrets/.env.exampletosecrets/.envand fill in your secrets, - create an app in Google Cloud Platform with Google Drive API and Google Calendar API enabled,
- place OAuth client file at
secrets/credentials.jsonor setGOOGLE_OAUTH_CLIENT_ID+GOOGLE_OAUTH_CLIENT_SECRET, - run auth once to generate
secrets/token.json(the agent can trigger login flow vialogin_google_user).
Required env vars:
AWS_REGION(default used by app:eu-central-1)BEDROCK_AGENT_MODEL_ID(default:amazon.nova-lite-v1:0)GOOGLE_DRIVE_STUDENT_NOTES_FOLDER_IDGOOGLE_HOMEWORK_DATABASE_FOLDER_IDGOOGLE_CREDENTIALS_PATH(optional override)GOOGLE_TOKEN_PATH(optional override)TUTOR_AGENT_MEMORY_PATH(optional override, JSON-backed memory)TUTOR_LOG_DIR(default.logs)
The fastest way to run in an isolated environment.
- Build and run via helper script:
./run-agent.sh
- Start directly in chat mode (default):
./run-agent.sh chat
- Extra chat flags:
./run-agent.sh chat --show-reasoning./run-agent.sh chat --hide-tools
What the script does:
- builds
tutor-assistant-local, - mounts project directory into container,
- injects envs from
secrets/.env, - persists logs in
.logs/and memory inmemory/.agent_memory.json.
Run locally with uv (Python >=3.14).
- Install dependencies:
uv sync
- Run chat:
uv run tutor-assistant chat
- Extra chat flags:
uv run tutor-assistant chat --show-reasoninguv run tutor-assistant chat --hide-tools
Logs are useful for debugging tool calls, model behavior, and runtime issues.
- Default log directory:
.logs/ - Configure log location with:
TUTOR_LOG_DIR - Configure log level with:
TUTOR_LOG_LEVEL(INFOby default)
Typical files:
- app logs:
tutor-assistant-<session>.log - telemetry traces:
strands-telemetry-<session>.log
Session naming:
- chat sessions are named like
chat-<thread-id>-<YYYYMMDD_HHMMSS> - this session name is used in log filenames
Quick examples:
- list log files:
ls .logs - inspect app log:
rg "" .logs/tutor-assistant-*.log - inspect telemetry log:
rg "" .logs/strands-telemetry-*.log
Core AI/runtime:
- AWS Bedrock (
BedrockModel, e.g. Nova Lite) for reasoning and text generation strands-agentsfor agent orchestration, tool-calling, and telemetry hooks- Rich CLI for interactive terminal UX
Google integrations:
- Google Calendar API for lesson discovery
- Google Drive API for notes/homework organization and file operations
- Gmail API for vacation email notifications
- Google OAuth desktop flow for local authorization
Document + data processing:
- PyMuPDF for extracting content from the newest note PDFs
- Pydantic for structured validation/parsing of model outputs
- dateparser for robust natural-date handling in tool inputs
Quality and developer workflow:
uvfor dependency + execution workflowpytestfor unit/integration coveragerufffor linting- Docker for reproducible runtime






