xemantic-ai-tool-schema - AI Developer Tools Tool

Overview

xemantic-ai-tool-schema is an open-source Kotlin multiplatform library that generates JSON Schema from Kotlin classes annotated with kotlinx.serialization’s @Serializable. It was built to streamline “tool use” (function-calling) workflows for agentic AI projects: instead of hand-writing JSON Schemas that LLMs (OpenAI/Anthropic style tool-calling) will return, developers annotate Kotlin data classes and call jsonSchemaOf<T>() to produce a JSON Schema that maps directly back to the original Kotlin type. This reduces manual mapping errors and speeds development of complex, strongly-typed tool payloads for agents. The library targets multiple Kotlin platforms (JVM, JS, native targets) and includes conveniences such as pretty-printed JsonSchema.toString(), support for sealed hierarchies, additional built-in formats and constraints (min/max length, patterns, formats), and JVM-specific handling for java.math.BigDecimal serialization. It is published under Apache-2.0 and distributed via Maven Central coordinates for platform-specific artifacts, and example usage and tests are provided in the repository to demonstrate common agenting integrations. According to the project README and release notes, the library was created to support Xemantic’s agentic projects (e.g., anthropic-sdk-kotlin and claudine) and is intended as a focused JSON Schema generator rather than a full JSON Schema deserializer or general-purpose JSON Schema library. ([github.com](https://github.com/xemantic/xemantic-ai-tool-schema))

GitHub Statistics

  • Stars: 46
  • Forks: 2
  • Contributors: 3
  • License: Apache-2.0
  • Primary Language: Kotlin
  • Last Updated: 2025-10-20T11:10:26Z
  • Latest Release: v1.2.0

The repository is small but actively maintained: releases are published (latest release series v1.1.* in 2025) and the library is published to Maven Central for multiple targets. The releases page and package indexes show recent versioned artifacts (e.g., 1.1.2 published April 13, 2025) and later JVM artifacts appear on Maven indexes. Community size is modest — the project has a few contributors and a low number of open issues and pull requests — indicating focused maintenance rather than a large community ecosystem. The project is Apache-2.0 licensed, which is permissive for downstream use. ([github.com](https://github.com/xemantic/xemantic-ai-tool-schema/releases))

Installation

Install via docker:

git clone https://github.com/xemantic/xemantic-ai-tool-schema.git
cd xemantic-ai-tool-schema
./gradlew build
Gradle (Kotlin DSL): implementation("com.xemantic.ai:xemantic-ai-tool-schema:1.1.2")
Maven (pom.xml): <dependency><groupId>com.xemantic.ai</groupId><artifactId>xemantic-ai-tool-schema-jvm</artifactId><version>1.1.2</version></dependency>
Note: artifact coordinates and versions available on Maven Central; adjust version to latest release.

Key Features

  • Generates JSON Schema from Kotlin @Serializable classes via jsonSchemaOf<T>().
  • Kotlin multiplatform support: JVM, JS and native platform artifacts published.
  • Pretty-printed schema output via JsonSchema.toString() for debugging and tests.
  • Supports sealed class hierarchies and inlining refs for complex types.
  • JVM BigDecimal handling: serializes decimals to strings and adds schema pattern.
  • Common constraints mapped: min/max length, pattern, format (email, date-time).

Community

Small, focused community with modest adoption: repository shows ~46 stars, 2 forks, and three main contributors; a handful of issues and pull requests indicate active but lightweight maintenance. The project publishes releases and artifacts to Maven Central (multi-target artifacts), is Apache-2.0 licensed, and is primarily maintained by Xemantic to support their agentic AI projects. For Kotlin multiplatform and agenting use-cases the repo provides tests and examples to get started. ([github.com](https://github.com/xemantic/xemantic-ai-tool-schema/releases))

Last Refreshed: 2026-01-09

Key Information

  • Category: Developer Tools
  • Type: AI Developer Tools Tool