Skip to content
kmetiaPublic

About

ai: the provider and authentication library for kmet. Provider catalogs, model configuration, wire adapters for Anthropic, OpenAI, Google, Bedrock and Mistral, OAuth and API-key resolution, usage accounting, and image-model generation.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

267 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ai

The provider and authentication library for kmet: provider catalogs, model configurations, wire adapters, OAuth/API-key resolution, usage accounting and the image-model catalog. It is a standalone library on host and net; the agent never feeds back into it.

kmet.ai.llm/send-message is the public entry point. It resolves a model and its auth, picks the provider adapter, streams the response and reports usage; the application supplies the caller's policy (agent directory, cache retention and message conversion) instead of the library resolving any of them itself.

Layout

Namespace What it owns
kmet.ai.llm provider dispatch and the send-message entry point
kmet.ai.api.* one adapter per wire protocol (Anthropic, OpenAI, Google, Bedrock, Mistral)
kmet.ai.models provider registry, catalog loading and model resolution
kmet.ai.model-config global and project models.edn composition
kmet.ai.auth, kmet.ai.oauth credential resolution, PKCE, device code and refresh
kmet.ai.image-models the image-model registry and generation
kmet.ai.model-data/*.edn the committed provider catalog
kmet.ai.image-model-data/*.edn the committed image catalog

The catalogs are classpath resources, so a packaged binary reads them from the artifact. bb generate-models regenerates them from the live sources and bb check-model-data validates the committed files offline.

Install

{:deps {kmet/host {:git/url "https://github.com/kmetia/host.git"
                   :git/sha "<full-commit-sha>"}
        kmet/net {:git/url "https://github.com/kmetia/net.git"
                  :git/sha "<full-commit-sha>"}
        kmet/ai {:git/url "https://github.com/kmetia/ai.git"
                 :git/sha "<full-commit-sha>"}}}

The :test alias uses the sibling ../host and ../net checkouts.

Tests

bb test
jolt test

The JVM suite uses clojure -M:test. App-specific integration tests (message conversion, the OAuth login screens and the end-to-end loop) live with the application in kmet-agent.

License

Copyright © 2026 — present Marko Kocic marko@euptera.com

Licensed under the Eclipse Public License 2.0 (EPL-2.0).

About

ai: the provider and authentication library for kmet. Provider catalogs, model configuration, wire adapters for Anthropic, OpenAI, Google, Bedrock and Mistral, OAuth and API-key resolution, usage accounting, and image-model generation.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages