Inspiration
Teams create weekly reports repeatedly, yet every reporting session starts from zero. Important decisions, preferences, and trends disappear across documents. ReportAgent turns reporting into a learning loop: every report becomes experience that improves the next one.
What it does
ReportAgent accepts dashboard screenshots and notes, uses Qwen Cloud to extract visible metrics, and creates an editable structured report.
Its persistent MemoryAgent:
- Embeds every generated report
- Retrieves relevant and recent historical experience
- Remembers writing style, tone, and focus preferences
- Compares trends across reporting periods
- Automatically forgets memories outside a configurable retention window
- Keeps model context bounded to the five most useful memories
Users can browse report history, ask questions across previous reports, edit generated content, export Markdown or PDF, and listen through Qwen Voice.
How we built it
ReportAgent uses:
- Next.js App Router, React, and TypeScript for the full-stack application
- Qwen3.7-Plus for text and vision reasoning
- text-embedding-v3 and cosine similarity for semantic memory retrieval
- qwen3-tts-flash for report narration
- Cloudflare Workers KV for persistent production memory
- Alibaba Cloud Function Compute deployment specifications
- Vitest for automated testing
The memory retrieval system combines semantic relevance, recency, access frequency, and expiration. Recent and semantic results are merged, deduplicated, and limited to five reports before being added to the Qwen context.
Challenges we ran into
The main challenge was making memory useful without flooding the model context. Sending every historical report reduced relevance and increased prompt size.
We solved this by combining recent memories with semantic Top-K retrieval, deduplicating the results, tracking access frequency, and enforcing a strict context limit.
Another challenge was supporting the same persistence interface across local JSON development and serverless KV production.
Accomplishments that we're proud of
- Cross-session trend comparisons validated across three weekly reports
- Multimodal extraction of dashboard metrics from screenshots
- Persistent user style, tone, and focus preferences
- Configurable retention and automatic memory forgetting
- Memory-grounded chat
- Editable reports with Markdown and PDF export
- Qwen-generated voice playback
- 40 automated tests covering APIs, components, memory, and Qwen integration
- A live Cloudflare deployment with encrypted API secrets
What we learned
Memory quality depends more on selection than volume. Combining recency with semantic similarity produced more consistent comparisons than sending all historical reports.
Explicit preference memory also makes the agent's learning behavior understandable and controllable by the user.
What's next for ReportAgent
- Organization-level memory isolation
- Hybrid vector and database retrieval
- Automatic outcome tracking for recommended actions
- Report templates for different industries
- Team collaboration and approval workflows
- Evaluation of whether the agent's recommendations improve over time
ReportAgent does not just write the next report. It learns how the user works, recalls what matters, and forgets what no longer does.
Built With
- ai
- alibaba
- cloud
- cloudflare
- dashscope
- docker
- kv
- multimodal
- next.js
- node.js
- qwen
- qwen3-tts-flash
- qwen3.7-plus
- rag
- react
- serverless
- text-embedding-v3
- typescript
- vitest
- workers
Log in or sign up for Devpost to join the conversation.