---
title: "How Yoko Li makes towns, tamagoes, and tools for local AI"
description: "Yoko Li’s local AI work spans playful agent experiments and practical tools for running language-model workflows on personal hardware. AI Town uses conversations among AI agents to produce changing relationships and emergent behavior, while AI Tamago feeds game state and user inputs to an unmodified LLaMA 2 7B model and uses Ollama’s JSON mode to generate pet actions. The Local AI Starter Kit packages document ingestion, vector storage, and language-model responses into a private, local “chat with a knowledge base” pipeline, avoiding setup across at least four API providers. The post also describes unreliable JSON generation, hallucinations, and grammar-guided workarounds, concluding that randomness is a liability for factual outputs but useful for game behavior and creative experimentation."
---

# How Yoko Li makes towns, tamagoes, and tools for local AI

[Fly.io](https://yomu.fyi/company/fly-io) · Jan 8, 2024

**Type:** Explainer

## Summary

Yoko Li’s local AI work spans playful agent experiments and practical tools for running language-model workflows on personal hardware. AI Town uses conversations among AI agents to produce changing relationships and emergent behavior, while AI Tamago feeds game state and user inputs to an unmodified LLaMA 2 7B model and uses Ollama’s JSON mode to generate pet actions. The Local AI Starter Kit packages document ingestion, vector storage, and language-model responses into a private, local “chat with a knowledge base” pipeline, avoiding setup across at least four API providers. The post also describes unreliable JSON generation, hallucinations, and grammar-guided workarounds, concluding that randomness is a liability for factual outputs but useful for game behavior and creative experimentation.

## Context

The work addresses both the difficulty of setting up document-search and retrieval-augmented generation pipelines and the unreliable, nondeterministic outputs of large language models, including hallucinations and inconsistently formatted JSON.

## Approach / What changed

Li’s projects run models locally and use them in different ways: AI Town and AI Tamago turn emergent, stochastic outputs into game behavior, while the Local AI Starter Kit connects document ingestion, embeddings, vector search, and language-model responses. JSON output is improved with Ollama’s JSON mode, code-generation models, or grammar files in llama.cpp.

## Takeaways

- AI Tamago uses an unmodified LLaMA 2 7B model with game state and user inputs, then uses Ollama’s JSON mode to generate the virtual pet’s next behavior.
- The Local AI Starter Kit supports a private document-questioning workflow on local hardware using user-selected models, without requiring billing and API keys for at least four providers.
- llama.cpp grammar files can constrain model output with a context-free grammar, but JSON generation can still fail, including by producing an endless stream of newlines.

**Tags:** [AI Agents](https://yomu.fyi/topic/ai-agents), [LLMs](https://yomu.fyi/topic/llm), [Retrieval-Augmented Generation](https://yomu.fyi/topic/retrieval-augmented-generation)

- Source: [Fly.io](https://fly.io/blog/how-i-fly-yoko-li)
- Source URL: https://fly.io/blog/how-i-fly-yoko-li
- Ingested by Yomu: 2026-09-03T00:00:52.064Z

[Read original post](https://fly.io/blog/how-i-fly-yoko-li)
