AgentKit is a Swift SDK for building agentic apps: the model decides, your tools run locally, against any provider. AgentKit Cloud is the managed backend you point it at when you ship, so your provider keys, prompts, and model choices live server-side instead of in your binary.
AgentKit is two things that fit together: the SDK you build with, and the Cloud you ship against.
Provider-agnostic, with a zero-network core. An @Observable AgentSession streams text and tool calls into your UI, the model only decides, and your tools run locally in code you write. Build against Anthropic, OpenAI, Gemini, your own backend, or Apple's on-device model.
A shipped app shouldn't carry provider keys; they're extractable from any binary. Point the SDK at the Cloud and your keys, prompts, tool schemas, and model choices stay server-side, resolved per request from an agent profile. Your app sends a profile, a tier, the active tool names, the conversation, and a short-lived user token; it never ships your prompts, keys, tool schemas, or model.
Your tool domains, guards, undo, and UI never change. Only the provider line does.
Define your app's abilities once as tool domains, then run the agent against Anthropic, OpenAI, Gemini, your own backend, or Apple's on-device model. Switching is one line; the model decides and your tools run locally.
For production, swap the provider to AgentKit Cloud and name an agent profile and tier. No SDK rewrite. The app stops shipping provider keys and starts sending a publishable key plus a short-lived user token.
Validate the key, check the kill-switch, verify the token, resolve the profile, route the tier, apply rate limits, gate quotas, reserve budget, relay the provider stream, and write a usage record. Your keys never leave the server.
Everything the agent loop needs, in your app.
Anthropic, OpenAI, Gemini, your own backend, or Apple's on-device model. Your tool domains, guards, and UI stay the same; switching providers is one line.
// one line picks the providerlet agent = try runtime.makeAgent( provider: .anthropic(apiKey: key), // .openAI(apiKey: key), // .gemini(apiKey: key), // .appleFoundationModels(), // on Cloud the backend picks the model: // .backendRouterCloud(agentId: id, tier: tier, …), role: role)Trimming the intro…
Done. 5s removed.
The backend, fully managed, when you point the SDK at it.
Your app asks for a tier; your dashboard maps each tier to a real model. Move balanced from Sonnet to Opus, or to another provider, and every app picks it up on its next request. No App Store round trip, no model id baked into your binary.
// your code names a tier, not a modelprovider: .backendRouterCloud( endpoint: cloud, agentId: "main", tier: "balanced", …)