Home
Ashavid
Back to Portfolio

Built by AshaVidLegalTech / Immigration ReadinessSprint 1–2, autumn 2026

Karvan (کاروان)

An AI Venture Team That Builds Startup-Visa Cases and Is Forbidden From Optimising for Approval

A system where founders talk only to a Telegram bot, every statement is stored word for word, every fact carries one of seven tags, and “I don’t know” is a valid answer nothing may fill in automatically.

Kabootar (Telegram)Exact answerClaim tagHuman gateCase package
A founder’s words enter through the bot, become a tagged claim, pass a human gate, and only then become part of a case.
Venture
Karvan
Category
Evidence-backed startup-visa case building
Stage
Foundation and intake built; agent team not yet live
Core challenge
Truthfulness enforced by the data model
Our role
System design and engineering
Focus areas
Claim ontology, Telegram liaison, atomic state

Origin

Why we started building this

Agents may research, reason, propose and challenge. Humans own facts about themselves and make consequential decisions. Everything else in the system follows from that sentence.

Startup-visa programs — Denmark, Finland, the Netherlands, Estonia, Italy, Canada’s next pilot — ask founders to present their venture against a published standard. The temptation, for founders and for anyone helping them, is to present the venture the program wants to see rather than the one that exists.

Karvan grew out of mentoring work at VisaRoads, where the same intake was being done by hand: collect documents over Telegram, ask the same questions, lose track of which answer was a fact, which was a hope, and which was a guess somebody made on the founder’s behalf.

The system was designed with one objective function, written to go into every future agent prompt: build the strongest truthful, internally consistent, evidence-backed representation of the founder’s actual venture against the requirements of the selected program. A gap shown honestly is a correct output.

What we built

What we built

A pnpm workspace with a long-running Telegram worker (Kabootar) on Railway, a pure domain package for claim transitions and IDs, and a Supabase schema where every multi-row state change is a Postgres function, every state table is append-only with an audit trigger, and the claim-transition rules are enforced by a database trigger that a parity test checks against the TypeScript implementation.

  • Kabootar, the only voice founders hear

    One bot per startup group. It decides how to ask — grouping, wording, language, timing — while staff decide what to ask. It never paraphrases: answers are stored as the founder’s exact words.

  • Seven claim tags

    proposal, decision, founder_statement, research_candidate, verified_fact, assumption and unknown. A claim becomes a verified fact only with a staff actor and third-party evidence.

  • Transitions that never overwrite

    A transition inserts a new claim row pointing at the old one; a trigger checks the move against the allowed table. A claim can be superseded once and edited never.

  • Immutable, database-allocated IDs

    QUA-001, R-017, Q-042, C-0107 — allocated in triggers so they are never skipped, reused or chosen by a caller, with every foreign key carrying the case id so a row cannot point into another case.

  • Intake from documents

    CVs, decks and spreadsheets are read into proposed profile values with the exact place each was read from; identity fields go to a private staff thread for confirmation, never into the founder group.

  • Hard lines in code

    No visa or legal advice (a fixed escalation reply instead), no passport or bank details posted back to a group, sensitive files never sent to any model, and only Claude via Anthropic’s API may see founder data.

The Problem

Why this needed to exist

  • An AI that helps with an immigration case has every incentive to round up; the system has to make rounding up structurally impossible.

  • Founders will not use a dashboard. They are already in Telegram, so the product has to live there without losing rigour.

  • supabase-js has no transactions, so a founder action that touches several rows has to be a database function or it will eventually half-apply.

  • Identity documents are both sensitive and the best evidence available; the design has to use them without ever echoing them.

  • “I don’t know” is an honest answer that most forms refuse to accept, and the one most tempting for an agent to fill in.

The Thesis

How we framed the opportunity

The thesis was that truthfulness is a property of the data model, not of the prompt. If the schema cannot represent a fact without its provenance, no agent can invent one.

  • Provenance is mandatory

    Every claim carries who created it and under which tag; a research candidate needs a source row, a verified fact needs third-party evidence and a staff actor.

  • Append-only or it did not happen

    No deletes, no in-place edits, an audit trigger on every state table. Corrections supersede; history stays.

  • The liaison asks, the director decides

    Kabootar owns tone and timing; staff — later an agent — own priority. Separating the two is what keeps the bot patient and the process accountable.

  • Docs win over code

    The ontology, the bot spec and the stage-and-gate model are the specification; when code and doc disagree, the doc wins and the code changes.

The Landscape

Where the existing options fell short

How cases were being built

  • Consultants collecting documents over chat and assembling a narrative by hand.
  • Templates that encourage founders to fill gaps with plausible text.
  • No record of which statements were verified and which were assumed.

What was missing

  • An explicit objective that rewards honesty over approval.
  • A claim model with tags, provenance and audited transitions.
  • A founder-facing channel that stores exact words and refuses to paraphrase.
  • Human gates that agents cannot bypass.

Design Principles

The decisions that shaped the product

  1. 01

    Humans own facts about themselves

    A founder’s statement is a founder_statement until a human and third-party evidence promote it; no agent may.

  2. 02

    Atomic, append-only, audited

    Postgres functions for every multi-row action, append-only guards and a parity test between the trigger and the domain package.

  3. 03

    Build only the current sprint

    Sprint 1 shipped no LLM calls and no dashboard on purpose; the foundation had to be right before any agent touched it.

The Build

How it came together

  1. Sprint 1

    Foundation and the bot skeleton

    Enums, tables, transition guard, atomic RPC functions, private evidence bucket, generated types, and Kabootar’s commands, cards and answer capture — replayed end to end by an automated done test.

  2. Sprint 2

    Staff threads, Drive and intake

    Staff threads and private founder chats, Google Drive sync, Telegram export import, and document intake that proposes profile values with pricing estimates.

  3. Next

    The agent team and gates

    Research, finance and audit agents under the eight-stage, six-gate lifecycle, with a staff dashboard — each introduced only once the previous gate is enforced.

Stack

  • TypeScript (strict)
  • grammY
  • Supabase
  • PostgreSQL
  • Zod
  • Vitest
  • Railway
  • Claude (Anthropic API only)

Role

Product & Engineering

Audience

Founders · Mentors & Staff · Startup-Visa Programs

What Shipped

  • A Supabase schema with seven claim tags, a trigger-enforced transition table and database-allocated immutable IDs
  • Append-only state tables with audit triggers and atomic Postgres functions for every founder action
  • A parity test proving the database trigger and the TypeScript domain package agree on every transition
  • Kabootar live on Railway in webhook mode: cases, links, roles, question cards, exact-word capture, “I don’t know”, file hashing and escalation
  • Document intake with tests over real CV, deck and spreadsheet fixtures
  • Not yet built: the research and audit agents and the staff dashboard, deliberately held until the gates exist

What building this taught us

  1. 01

    Put the objective function in writing before the first prompt.

  2. 02

    If honesty depends on a prompt, it will fail; put it in the schema.

  3. 03

    “I don’t know” must be a first-class value.

  4. 04

    Meet users where they are, then hold the rigour on your side of the channel.

  5. 05

    The sprint you refuse to scaffold is the one that keeps the foundation clean.

We build the products we would want to operate ourselves.

Karvan is one of the ventures we design, build, and run in-house at AshaVid.