انتقل إلى المحتوى

Moriarty — سلسلة تحليلات متعددة الوكلاء

جويلية 2025 – أكتوبر 2025 · Maystro Delivery

غلاف يحمل عبارة “Introducing Moriarty, The Detective Agent”
الدور
Agentic AI Intern
الجهة
Maystro Delivery

تصميم بنية سلسلة تحليلات معيارية متعددة الوكلاء على GCP Cloud Run ونشرها، تعالج بيانات Google Analytics المجدولة لتحويلها إلى تقارير سلوكية وتوصيات UI/UX، مع CI/CD عبر Cloud Build.

Maystro's product manager and UX designer wanted to know what to improve in the product, based on what users actually do. Moriarty, "the detective agent", was our answer: a multi-agent system that reads the product's Google Analytics data on a schedule and turns it into a report on user behaviour, with UI/UX recommendations.

We were three interns. The pipeline is a chain of agents behind a data orchestrator: one collects Google Analytics 4 events, others process them, analyse behaviour, find patterns across clusters of sessions and draft insights, and a last agent writes the report. The agents call OpenAI and Gemini through our own LLM client rather than an agent framework.

What I built

I set up the codebase: the shared agent base, the agent state and the LLM client, which I later hardened with timeouts and retries with backoff. I built the report generator, which writes each report as HTML and JSON, with a PDF export, and I worked on the behaviour analysis and on naming each session cluster. I also built the dashboard in Next.js: the key metrics, the latest report and its download.

At the end of the internship, Maystro asked me to take Moriarty to production. I containerised the backend and the dashboard, set up their CI/CD on Cloud Build, moved the database to Cloud SQL, and deployed the pipeline on Cloud Run. The CTO and the product team were pleased with the result.

مخطط بنية Moriarty: مُشغِّل يدوي وجدولة زمنية يطلقان منسّق بيانات وسلسلة من ستة وكلاء، يقرؤون أحداث Google Analytics 4 ويكتبون في قاعدة بيانات PostgreSQL ويستدعون مزوّدي نماذج لغوية.
الشكل 1 بنية Moriarty.
الشكل 2 عرض توضيحي لـ Moriarty (36 ثانية).