# microsoft/TypeChat

TypeChat is a library that makes it easy to build natural language interfaces using types.

Repository: https://github.com/microsoft/TypeChat
Canonical: https://ross.abutalabs.com/products/typechat
Homepage: https://microsoft.github.io/TypeChat/
Language: TypeScript
License: MIT
License Family: permissive
Topics: ai, llm, natural-language, types
Last push: 2026-08-21T19:55:36+00:00

## Health v2 (maintenance only)
Score: 73/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 98, release rhythm 35, longevity 83
- inputs: {"age_days": 1171, "days_push": 12, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 8680, forks 414 (observed 2026-08-28T04:10:24.214831+00:00)

## What it is
TypeChat is a TypeScript library from Microsoft that replaces prompt engineering with 'schema engineering' for building natural language interfaces. Developers define types representing user intents, and TypeChat constructs LLM prompts, validates and repairs responses against the schema, and summarizes results.

## Use cases
- build a natural language interface for my app
- get structured JSON responses from an LLM
- map user intent to typed actions without prompt engineering
- validate and repair LLM output against a schema
- create a chat-based shopping cart or music app
- classify sentiment from natural language input

## When to choose
- you want type-safe, schema-validated LLM responses in TypeScript
- you're building intent-driven natural language UIs
- you want to avoid fragile hand-crafted prompts

## When to avoid
- you need a production-hardened, actively developed library (npm version is 0.1.4, marked experimental)
- your stack isn't TypeScript/JavaScript, Python, or .NET
- you need free-form generation rather than schema-constrained output

## Facets
- artifact type: library
- maturity: experimental
- function: llm-inference, prompt-engineering, serialization, chatbot, agent-framework
- domain: large-language-models, artificial-intelligence, web-development, developer-tools
- platform: python, dotnet, cross-platform
- tags: schema-engineering, structured-output, type-safe-llm, natural-language-interface, response-validation, natural-language-processing, nodejs, typescript

## Member repositories
- microsoft/TypeChat (main) score 73

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:24.214831+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:25:35.998634+00:00, confidence not recorded.
  - readme: https://github.com/microsoft/TypeChat (fetched 2026-08-28T04:10:24.214831+00:00, sha 8b14710f8cf6)
  - homepage: https://microsoft.github.io/TypeChat/ (fetched 2026-08-29T08:26:09.383007+00:00, sha a1db293196c1)
  - registry_npm: https://registry.npmjs.org/typechat (fetched 2026-08-29T08:26:09.391795+00:00, sha 76141b1c5bd3)
- Data as of 2026-08-30T08:39:29.467469+00:00.
