Swift Guide
Swift is the Forge surface for iOS, macOS, and Apple-platform agent experiences. Read this tab when identity-aware agents need to feel native on a device while still satisfying the same ANVIL contract as the server runtimes.
Language perspective
Swift users should focus on local identity, user consent, UI-bound approval flows, and provider boundaries that fit Apple-platform application structure.
Primary surfaces:
forge-swift/Sources/ForgeCoreforge-swift/Sources/ForgeAgentforge-swift/Sources/ForgeIdentityforge-swift/Sources/ForgeAuthforge-swift/Sources/ForgeMCP- local runtime and UI integration adapters
Follow this path
- Start with Identity and Glyphs.
- Read Agents and Agent events.
- Add Capabilities for user-approved tools.
- Read Web Substrate only where Swift shares app flows with web surfaces.
- Use Security Model before device-local storage decisions.
swift test
python3 tools/release_gate.py --root .
Contract focus
| Contract | Swift reading lens |
|---|---|
| Identity | Make the agent DID and glyph visible where users need trust cues. |
| Capability | Map sensitive actions to explicit approval and local UX states. |
| Events | Keep UI state synchronized with agent lifecycle and tool events. |
| Security | Treat local key material, prompts, and credentials as platform-sensitive data. |
| Providers | Keep provider calls behind the shared Forge contract. |
What to read next
Identity →
DIDs, roots, lineage, and seeded production identities.
Glyphs →
Deterministic identity rendering for user-facing trust surfaces.
Agent events →
Runtime events that drive native UI state.
Security model →
How identity, capabilities, and approval interact.
Current guidance
Use Swift for native Apple experiences. Do not lower the contract for local UX: the same identity, authority, and telemetry requirements still apply.