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-coreforge-kt/forge-agentforge-kt/forge-identityforge-kt/forge-authforge-kt/forge-mcp- Android and JVM integration adapters
Follow this path
- Start with Agents and Runtime State.
- Read Identity, Capabilities, and Tools.
- Read Provider Contract before wiring model access.
- Use Edge and Container and Cloud for server-side Kotlin targets.
- 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. |
What to read next
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.