Kotlin/kotlinx-schema

Kotlin Multiplatform library that generates JSON Schemas from your methods and classes both at compile-time via Kotlin Symbol Processing(KSP) and at runtime via reflection or kotlinx.serialization.

48
/ 100
Emerging

Supports LLM function calling schemas (OpenAI/Anthropic format) with automatic strict mode and parameter validation, alongside comprehensive type handling including sealed class hierarchies with discriminators and `$ref`/`$defs` deduplication. Multi-framework annotation detection recognizes `@Description`, Jackson, LangChain4j, and custom annotations without code changes, enabling schema generation for third-party libraries. Offers three generation modes—compile-time KSP (zero runtime overhead, multiplatform), runtime reflection (JVM-only), and serialization-based (kotlinx.serialization)—with a type-safe Kotlin DSL for programmatic schema construction.

105 stars.

No Package No Dependents
Maintenance 13 / 25
Adoption 9 / 25
Maturity 15 / 25
Community 11 / 25

How are scores calculated?

Stars

105

Forks

8

Language

Kotlin

License

Apache-2.0

Last pushed

Mar 18, 2026

Commits (30d)

0

Get this data via API

curl "https://pt-edge.onrender.com/api/v1/quality/ai-coding/Kotlin/kotlinx-schema"

Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.