Inspiration

A lot of people still rely on a $10 feature phone with no data plan: traders in Lagos markets, and anyone whose smartphone is useless when the network or power goes down. They can still send an SMS and dial a USSD code. Most "AI agent" demos assume a browser or an app, so these people are left out.

Ghost Line Kit asks a simple question: what if the AI agent lived behind SMS and USSD, with no app and no internet on the user's side? The Kiroween theme fits: we bring AI to phones that look dead.

What it does

Ghost Line Kit is an open-source skeleton (@ghostline/kit) for building agents that answer over SMS and USSD. It handles the parts that are easy to get wrong on a feature phone:

Splitting a reply into SMS segments without breaking a word, a number or an amount, and choosing GSM-7 or UCS-2 encoding. Rendering numbered USSD menus that fit a small screen. A session state machine that resumes or ends cleanly, STOP and DELETE handling, rate limiting by phone number, and logs that never contain a full phone number or a message body. A tool registry and an LlmProvider interface (Amazon Bedrock implementation), plus a store interface with in-memory and DynamoDB versions. Two apps are built only on the kit's public API, each in its own folder:

Oja Ghost (apps/oja-ghost): a market assistant for Lagos traders. Check a commodity price at a market, report a price (outliers are rejected before the average), keep a debt book ("Bola owes N4,500", "Bola paid N2,000"), and get SMS reminders sent to the trader. English and Nigerian Pidgin. All seed data is labelled as demo data. Blackout Line (apps/blackout-line): a disaster-mode line. Text a US ZIP code for active National Weather Service alerts, summarised so the action instruction and the source are never dropped; ask for the nearest shelter; send "I'm OK" or "I need help" to a family list whose members must opt in first; and a clearly marked simulate-storm mode. The live demo runs on clearly labelled fictional alert fixtures; the app takes the National Weather Service fetch as an injected function and a production fetcher is not wired yet. The Phantom Handset (phantom-handset) lets anyone try all of this in a browser with no SIM: a retro feature phone with a keypad and LCD, plus a split view that shows the agent's reasoning and tool calls beside the phone.

How we built it

We used Kiro's spec-driven workflow for every feature: requirements, then design, then tasks, then task execution. There are six specs in .kiro/specs/ (82 requirements): kit-core, phantom-handset, oja-ghost, blackout-line, handset-polish (the demo's first-impression work) and at-webhooks (Africa's Talking sandbox SMS and USSD routes). Steering files in .kiro/steering/ fixed the product rules, the stack, the feature-phone limits, the emergency-copy rules and the security rules before any code was written. Kiro wrote the kit, the handset and both apps; the property-based tests (fast-check) are part of the specs, not an afterthought. See docs/submission/kiro-writeup.md for the details.

Claude Code handled the repository setup, CI, AWS deployment scripts, verification of each Kiro batch, and the documentation. Every action is recorded in docs/claude-code-log.md.

Stack: TypeScript (strict), pnpm workspaces, Vitest and fast-check, Vite and React for the handset, Amazon Bedrock behind an LlmProvider, DynamoDB for state, and AWS Lambda, S3 and CloudFront for the live demo.

Challenges we ran into

Feature-phone limits are strict. A 160-character GSM-7 SMS drops to 70 characters if one character is outside the GSM-7 set, and a USSD screen is about 140 characters. We moved the naira sign out of replies (plain N1,500) so replies stay GSM-7, and restricted the handset's compose input to characters that can be sent cheaply. Safety copy cannot be clever. Alert summaries must keep the action instruction and the source even when the budget is tiny, so that rule is a required property test rather than a hope. Third parties. Family check-ins message people who never signed up, so the design requires an opt-in reply (YES) before anything is sent, with caps and rate limits. Honest limits of testing. The property tests so far found one real counterexample (see the write-up); most of their value is the properties they prove hold.

Accomplishments that we're proud of

A reusable kit with property-based tests across its format, session, store, intent, rate-limit and processor modules. The full suite is 880 tests across 84 files (32 of them property-based), run in CI. Two apps in separate folders that import only @ghostline/kit; the second spec reuses the same pattern as the first. A browser handset that works with no setup, with a trace panel for the agent's reasoning, and a live deployment on AWS. A privacy-first design: masked phone numbers in logs, no message bodies logged, STOP and DELETE honoured, reminders sent only to the trader who set them. Lighthouse accessibility score of 100 on desktop and mobile (run by the author in Chrome on the live site on 2026-12-01; performance 88 to 89).

What we learned

What's next for x

Live NWS wiring for Blackout Line and a real open shelter dataset (the shelter list is fictional and labelled so). A run on a real phone. The Africa's Talking sandbox routes for SMS and USSD are built, tested offline and deployed, but the sandbox reaches only Africa's Talking's simulator, not a physical feature phone. Review of the Pidgin copy by a native speaker. Operations automation (data refresh, failed-message triage, a daily summary with an approval step before any broadcast). We planned this as a Kiro Crew app and cut it to protect quality.

Built With

Share this project:

Updates

Submission history