Tin

Reference

For looking things up. Every example on these pages is compiled and run by the real compiler when the site is built.

  1. 1The languageEverything Tin has, on one page. Every example here is compiled and run when the docs are built.
  2. 2Agents and toolsWhat the compiler generates from a tool fn and an agent, and exactly what the agent loop does at run time.
  3. 3Model providersEvery model an agent can use: Anthropic, OpenAI and any OpenAI-compatible server, Gemini, Mistral, local Ollama and llama.cpp, and more, plus fallback and routing.
  4. 4The Anthropic APIimport "std/anthropic": count tokens, list models, upload files, send Message Batches, and the handlers behind Claude's memory and text editor tools, in Tin.
  5. 5Talking agentsVoice agents: speech-to-speech sessions with tools, barge-in and restarts. Implemented for OpenAI Realtime, Gemini Live and Nova Sonic and tested against a mock; no real provider has produced a spoken reply yet.
  6. 6Standard libraryEvery function and type available without an import, generated from the library source.
  7. 7GlossaryTin’s own words, each in one sentence, with where to read more.
  8. 8Package docsAPI documentation generated by tin doc from a package's source and its /// comments. Below: the example package examples/packages/geometry.
  9. 9TelemetryOpenTelemetry built in: every agent question, model call and tool call is a span by the GenAI conventions, with metrics and trace context, exported over OTLP from every host.
  10. 10Robotsrobot declarations, Pose and Angle, the built-in kinematic world and MuJoCo, the control loop and policy forms, the safety gate, arm.drive for agents, and run tapes.
  11. 11ServersThe server declaration: routes, Request and Response, request taint and its sinks, grants, agent endpoints over HTTP, SSE, WebSocket and MCP, limits and the handler contract.
  12. 12Deployingtin deploy: a Tin program on Cloudflare, Vercel, Cloud Run, Azure or Lambda, with the target checked like a capability and keys kept out of the build.
  13. 13tin.adtin deploy with no target: a URL like brisk-otter-k3m9.tin.ad in one command, each deployment in its own isolate, an EIP-8004 file per agent.
  14. 14The tin commandRunning, checking, fixing and inspecting programs from the terminal.
  15. 15How it worksFrom source text to a WebAssembly module: the compiler pipeline, the memory layout and the runtime.

Also: Tin next to Python and TypeScript · Benchmarks, with method · Examples