$ cat ~/map/pi2kotlin.md
pi2kotlin
Kotlin Multiplatform rewrite of the pi-ai, pi-agent, and pi-coding-agent SDK layers, shipping Android AARs and JVM JARs.
tools✓ Oct 23
Facts
- repository
- github.com/Sadami3066/pi2kotlin ↗
- GitHub Stars
- ★ 4
- Forks
- 0
- license
- MIT
- npm / mo
- —
- last push
- Nov 29, 2026
## TL;DR
A Kotlin Multiplatform rewrite of pi's pi-ai, pi-agent, and pi-coding-agent SDK layers for Android and JVM apps — 0.1.1 alpha, distributed as a GitHub Releases zip or built from source, not yet on Maven Central.
## Key points
- $Three modules mirror upstream with the dependency direction pi-coding-agent → pi-agent → pi-ai: unified LLM API, agent runtime, and the sessions/settings/tools/compaction SDK layer.
- $pi-ai covers 10 chat APIs, image generation and classifier APIs, 42 built-in providers, the model catalog, auth with API keys and 9 OAuth flows, streaming events, retries, and usage/cost.
- $pi-agent ports the event lifecycle, serial and parallel tool execution, hooks, steering and follow-up queues, and proxy transport.
- $The pi-coding-agent module carries pi-compatible JSONL sessions, settings, model resolution, built-in tools, system prompt and resources, compaction, and the AgentSession / createAgentSession facade.
- $Status is 0.1.1 alpha: the library builds, ships Android AARs and JVM JARs, and is covered by 1,000+ JVM tests plus Android host tests; the API shape may still change before 1.0.
- $Requirements: JDK 17 or newer on the JVM; Android minSdk 26 and compileSdk 36; Gradle 9.8.2 and Kotlin 2.4.21 to build from source.
- $Artifacts are not on Maven Central yet: download pi2kotlin-0.1.1-m2.zip from GitHub Releases and point a dependency repository at the unzipped directory, or build from source.
- $A Chinese-language README (README.zh-CN.md) mirrors the documentation.
## FAQ
Q Can I add pi2kotlin from Maven Central?
Not yet. The README states artifacts are not on Maven Central; use the prebuilt zip from GitHub Releases or build from source.
Q Which pi layers does it cover?
The pi-ai, pi-agent, and pi-coding-agent SDK layers — the README's module table maps each one to its upstream package, with pi-coding-agent mapped to the core/SDK layer.
## References
## Related entries
$ aft
Sensorimotor-cortex layer that ships thin adapters for Pi and OpenCode, replacing raw read/write/edit/bash with semantic operations.
$ Pi Chat
Minimal local browser chat for pi: streaming replies, persistent sessions, and in-pi launching via /pi-chat-start.
$ pi-arena
Fair, replayable tournaments for pi coding agents: same task, isolated workspaces, objective scoring, and a browser replay console.
Last updated: Nov 29, 2026