Emma MemoryAgent

Inspiration

Homework help from a generic chatbot has an obvious problem: it can give the answer away. Emma is built to do the opposite: guide a child with hints and reasoning questions instead of handing over the final answer, while remembering from one session to the next what the child has already practiced and how they best learn.

The deeper idea: Emma does not just remember the chat. It remembers the child’s learning state. Not a transcript, but a structured record of the topic, the specific skill, the support style this child needs, and how far along they are.

What it does

Emma MemoryAgent is our Track 1 MemoryAgent entry: a child-safe homework and revision companion powered by Qwen Cloud.

  • A child asks a homework question. Emma follows a hints, not answers policy: she guides with reasoning questions instead of giving the final answer.
  • The interaction is stored as structured memory: topic, skill practiced, support style, and mastery status.
  • When the child comes back later and asks to revise, Emma retrieves that memory without being told the topic again, then continues from where the child left off.
  • Every message passes through a deterministic Agent Firewall first: personal information is redacted, unsafe requests are blocked, and only safe learning requests reach the model.

The key behavior is that memory changes the next tutoring interaction. Emma does not only persist data; she uses remembered learning state to adapt future help.

Why Qwen Cloud

For this hackathon build, Emma uses Qwen Cloud as the inference layer. The backend runs on Alibaba Cloud Function Compute and calls Qwen Cloud through a dedicated model client, so the model remains swappable behind the same memory and safety layers.

This API-first path gave us the fastest way to build a real, judgeable, Alibaba-Cloud-deployed system within the submission window. The same Emma + Agent Firewall architecture can later support self-hosted Qwen deployments for schools that need stronger data locality or offline operation, but the submitted project is built and demonstrated on Qwen Cloud.

Architecture

Emma has four main layers:

  1. Frontend — the child-facing homework and revision interface.
  2. Agent Firewall — deterministic policy checks before any model call.
  3. Memory Store — structured per-child, per-topic learning state.
  4. Qwen Cloud inference — tutoring replies generated after safety and memory context are applied.

The Agent Firewall sits between the child and the model: policy first, model second. The Memory Store keeps structured state such as topic, skill, support style, and mastery status. Each turn sends only the most relevant memory into the model context instead of dumping the full conversation history.

Challenges we ran into

The hardest part was proving real memory adaptation, not just persistence. A memory panel that says “fractions” is not enough. We needed Emma to retrieve the stored learning state and actively change the next tutoring response.

That meant building real retrieval and adaptation logic: the support style and skill are read back from storage and used to reshape the system prompt on the next turn, verified live against the real Qwen Cloud API.

Deploying to Alibaba Cloud Function Compute also required debugging. The custom runtime base image ships with Python 3.7, which was incompatible with our dependencies, so we bundled a portable Python 3.10 interpreter directly into the deployment. The full deployment trail is documented in deploy/alibaba/README.md.

What we learned

We learned that convincing long-term memory is about behavior change, not storage alone. For a MemoryAgent, the important proof is not “the system remembers something,” but “the system teaches differently because of what it remembers.”

We also learned that child-safe tutoring needs memory and safety together. Memory makes Emma useful across sessions; Agent Firewall makes it appropriate for children by enforcing privacy, safety, and “hints, not answers” behavior before the model is called.

What’s next

Next, we want to expand Emma’s support styles beyond “hints, not answers” into more granular pedagogical policies, such as visual explanations, extra practice, confidence checks, and parent or teacher review summaries.

We also want to wire the self-hosted Qwen path into the same firewall and memory core for institutions that require on-premise or offline deployment.

Built With

Share this project:

Updates