All projects

Hackathon project · Team Kozmos · lead developer

Lonca: An AI agent that builds mini apps from verified data

An agent and mobile app that turns a user's idea into a safe mini app built on verified heritage data; a KÖK&KOD finalist.

İbrahim TaşkıranNovember 20262 min read

Stack

TypeScriptNode.jsFastifyAnthropic SDKOllamaCapacitorMapLibrethree.jsDockerPlaywright

The competition

The KÖK&KOD Hackathon was organised by Vakıf Katılım and 42 Türkiye; the theme was exploring foundation heritage with technology, and only 42 students could take part. We applied as team Kozmos, reached the final and competed in it at 42 Kocaeli in November 2026.

Team Kozmos at the KÖK&KOD Hackathon
Team Kozmos at the KÖK&KOD Hackathon

The problem

An AI that builds apps about cultural heritage must not make things up: a wrong date or a work that does not exist is unacceptable. On top of that, the code the AI writes had to run on a phone without harming the user.

The idea: master and journeyman

In Lonca the user is the "master" and the AI agent is the "journeyman". The master describes an idea and the journeyman builds a small app from a verified inventory of foundation works in Bursa, Konya and Hatay.

Opening slide of the Lonca presentation
Opening slide of the Lonca presentation

The modules users see are small games or discovery tools: Tomb Detective, where you guess the century from photos of tombs; Treasure Hunt in the Inns, set in Bursa's historic inns; and Bursa Compass, which shows foundation works nearby. Every work, date and photo in them comes from the verified inventory.

Tomb Detective
Tomb Detective
Treasure Hunt in the Inns
Treasure Hunt in the Inns
Bursa Compass
Bursa Compass

How I built the agent

I wrote most of the code. I built the agent on tool calling: it takes facts from tools that query the inventory, not from its own memory, and cites the source of every fact. Its output goes through a verification loop; a claim without a source is sent back. The agent runs on the Anthropic SDK and can switch to OpenAI-compatible providers and to local models through Ollama.

Running the code safely

Every generated mini app passes a TypeScript type check and an approval queue, then runs in a sandbox inside the Android app packaged with Capacitor. Around this flow I built a Studio interface to edit the code, an account system with Google sign-in and email verification, an exploration map with MapLibre and a 3D view with three.js.

Accessibility and deployment

We added screen reader labels, Turkish text to speech, high contrast and a colour-blind friendly palette; I tested accessibility automatically with Playwright and axe-core. I deployed the platform on my own server with Docker, Nginx and Cloudflare Tunnel.

Working through the night
Working through the night

Result

Lonca reached the KÖK&KOD final and is live at kozmos.itaskira.com. The source code is on GitHub.