Kotlin Guide

Kotlin is the Forge surface for Android and JVM applications. Read this tab when agents need to run inside mobile clients, JVM services, or Kotlin-first application stacks without giving up ANVIL parity.

Language perspective

Kotlin users should focus on typed runtime behavior, Android/JVM integration, mobile approval flows, and service boundaries that keep provider and tool authority explicit.

Primary surfaces:

  • forge-kt/forge-core
  • forge-kt/forge-agent
  • forge-kt/forge-identity
  • forge-kt/forge-auth
  • forge-kt/forge-mcp
  • Android and JVM integration adapters

Follow this path

  1. Start with Agents and Runtime State.
  2. Read Identity, Capabilities, and Tools.
  3. Read Provider Contract before wiring model access.
  4. Use Edge and Container and Cloud for server-side Kotlin targets.
  5. Use Security Model before Android credential storage decisions.
./gradlew test
python3 tools/release_gate.py --root .

Contract focus

Contract Kotlin reading lens
Runtime state Keep lifecycle explicit across Android, JVM service, and background execution flows.
Identity Preserve DID and lineage semantics across platform storage boundaries.
Capability Scope mobile and service tools with ACTs before execution.
Providers Keep provider resolution outside app business logic.
Deployment Separate Android-local concerns from JVM service deployment concerns.

Runtime State

The state model Kotlin apps and services should reflect.

Tools

Tiered tool execution and approval expectations.

Provider Contract

How Kotlin code talks to models without vendor lock-in.

Security model

Identity, capability, provider, and approval boundaries.

Current guidance

Use Kotlin for Android and JVM integrations. Keep mobile convenience separate from runtime claims: parity still comes from the release gate.