microsoft/typechat

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

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 8 minutes ago
Added to GitGenius on September 7th, 2026
Created on June 20th, 2023
Open Issues & Pull Requests: 66 (+0)
GitHub issues: Enabled
Number of forks: 413
Total Stargazers: 8,682 (+0)
Total Subscribers: 56 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 2.1 days
Mean response time: 65.5 days
90th percentile: 251.0 days
Tracked items: 14

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 6
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 776 days
Stale 30+ days: 5
Stale 90+ days: 4

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • Website (2)
  • In Discussion (1)
  • Suggestion (1)

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

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

Building natural language interfaces traditionally required complex decision trees and prompt engineering to constrain model outputs and ensure valid responses. TypeChat replaces prompt engineering with schema engineering by letting developers define types representing the intents their application supports. These types can be simple interfaces for sentiment categorization or complex structures for shopping carts and music applications. Developers extend functionality by adding types to discriminated unions, and can create hierarchical schemas using meta-schemas to select sub-schemas based on user input. The library then handles constructing prompts to the LLM, validating responses against the schema, repairing non-conforming output through further model interaction, and summarizing results to confirm alignment with user intent.

TypeChat suits developers building conversational applications who want to move away from fragile prompt engineering toward declarative type definitions. The approach works across TypeScript, Python, and C#/.NET, with example projects available to explore. The library is particularly valuable when you need structured, validated outputs from language models without the maintenance burden of hand-crafted prompts.

The project maintains active engagement with contributions and pull requests, indicating ongoing development and community involvement. Documentation is actively maintained with examples and getting started guides readily available. The codebase spans multiple language implementations, suggesting sustained effort to support developers across different technology stacks.