Skip to content

AskHamiz: agentic chatbot with tool access to notes, classes, and calendar #80

Description

@shreekardittakavi

Spec: Doc ask hamiz spec — "AskHamiz is an agentic chatbot that is capable of communicating with every I/O in the website, such as changing tasks, removing, adding, manipulating recurring tasks, manipulating class data, and automating notes."

Current state

agent/base-agent.ts is a ToolLoopAgent on gemini-2.5-flash-lite with tools: {} — no tools at all. It is a plain chat responder with a generic prompt, not an agent over app data.

Scope

  • Define a tool surface over the app's real operations, each backed by the existing service layer rather than reimplemented:
    • Notes: search, read, create, update
    • Classes: read details, update fields
    • Calendar: create / update / delete events, including recurring ones
    • Flashcards and quizzes: generate, list, open
    • Study: start a timer, start a review session
  • Every tool must resolve the acting user server-side from the session and scope its query to that user. The user id must never be a model-supplied parameter — that is a direct path to cross-account data access.
  • Destructive tools (delete an event, overwrite a note) require explicit user confirmation in the UI before executing. The model proposes; the user commits.
  • Stream tool calls to the client so the user sees what the agent is doing, not just a final answer.
  • Rewrite the system prompt for the TaskMaster domain — the current one explicitly says "avoid domain assumptions," which is backwards for this feature.

Blocked on

  • /api/chat has no session guard (see the auth issue) — this must land first. Adding data-mutating tools to an unauthenticated endpoint would expose every user's data.

Acceptance criteria

  • The agent can answer questions about the user's own notes, classes, and calendar
  • The agent can create a calendar event and a note on request
  • Destructive actions require confirmation
  • No tool can read or write another user's data, whatever the model is asked

Metadata

Metadata

Assignees

No one assigned

    Labels

    AILLM, embeddings, and retrieval workAskHamizAskHamiz agentic chatbotBackendAPI, DB, and server-side workenhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions