Tools, Not Talk
Takumi, the AI assistant in kansei, is not a chatbot with a search box. It is an agent with 28+ tools wired to real data: invoice search, task creation, stats aggregation, gear booking, social post scheduling. Every tool enforces a current-company filter — the model physically cannot reach into another tenant's data, no matter how hard it tries.
Principle #1: Preview → Commit
Write operations never happen on the first attempt. A tool first returns a preview — "I'm about to book the Sony FX3 from Friday to Sunday for Marek" — and only when the user clicks confirm does it get called again with confirmed: true to actually write. Between preview and confirm the commit is locked to a specific target, so nothing can silently swap underneath. That loop is the trust boundary of the whole system: the agent proposes, the human approves.
Principle #2: Don't Trust the Model's Claim That It Called a Tool
We hit the classic hallucination early: the model replied "I've created the task!" — and had called no tool at all. So we track actual tool calls, and when a response claims a creation without a matching call, the user gets a warning. Duplicate prevention works similarly: create_task looks up similar titles in the project before writing and returns an error with candidates instead of a silent duplicate.
Principle #3: Tolerate the Model's Typos
The most practical lesson: LLMs invent enum aliases. You want groupBy: "worker"; the model sends "user", "person", "staff", or "weekly". Strict validation returned an error, the model couldn't repair it, and the user saw nothing. The fix: a normalization layer before validation that remaps aliases and defaults empty values sensibly. The internal rule since then: when the model keeps fumbling an enum, fix the schema, not the prompt.
Principle #4: Money Follows Roles
Takumi respects the same permissions as the rest of the app. A team member without financial access cannot extract invoice numbers even with a cleverly phrased question — financial-field stripping runs inside the tools, not in the UI afterwards. And cost rates (what the studio pays) are hidden even from managers; those are admin-only.
What Didn't Work the First Time
One file with tool definitions grew to 7,300 lines, and every AI-touching page imported all of it. Splitting it into a lazy per-tool registry was one of the era's biggest performance wins. The second dead end: trying one combined prompt for both creative and accounting outputs — splitting into two prompts with different temperatures fixed the inconsistent JSON in a single evening.
Where It's Heading
We now expose the same tool registry over the Model Context Protocol, so Claude Desktop or any other MCP client can call Takumi's tools — with the same tokens, the same permissions, and the same audit trail. The agent is just an interface; the trust lives in the infrastructure beneath it.