Same Agents, Bigger Model: RailtracksSwift on Private Cloud Compute

Reading time: 6 minutes

Apple's server model, behind the same agent code

In our last two posts, we put RailtracksSwift agents behind Siri, first as searches and then as Siri tools on 27.3. Every one of those agents ran on the Apple Intelligence model on the device. That model is private, free and works offline. It also has a small context window, and a real agent fills it fast.

In iOS 27 and macOS 27, Apple opened a second option to third-party apps: Private Cloud Compute (PCC), the Apple server system that runs the larger Apple Intelligence model. RailtracksSwift now supports it as a provider.

What PCC gives an app

Apple describes the feature in Adding server-side intelligence with Private Cloud Compute. For an agent app, these are the parts that matter:

  • More room. The server model has a 32K-token context window, about four times what the on-device model gives on a current Mac.
  • Reasoning. The model can think before it answers, at a light, moderate or deep level.
  • Privacy by design. Data sent to PCC is accessible only to the user, not to Apple. Apple’s security write-up explains how.
  • No keys, and no bill for now. There is no API key to store, and at the time of writing no per-token cost for the developer. Instead, each user has a daily limit, counted against their iCloud account and higher with iCloud+. Apple’s fine print says the limits “may vary by feature, request complexity, system demand, system policies, and other factors”, and that expanded access “will be available for a fee in the future”, so expect this part to change.

Swapping over

Apple says moving a LanguageModelSession to PCC is a one-line change. In RailtracksSwift, it is the same line: the agent’s provider.

				
					// Before: Apple Intelligence on device
let agent = RTSAgent(
    llmProvider: .appleAI,
    tools: [PlacesSearchTool()],
    systemMessage: "You are a local guide. Plan the days from the places you find."
)

// After: Apple's server model on Private Cloud Compute
let agent = RTSAgent(
    llmProvider: .privateCloudCompute(),
    tools: [PlacesSearchTool()],
    systemMessage: "You are a local guide. Plan the days from the places you find."
)
				
			

That is the whole change. The tools, the structured output, the guardrails, the flow and the trace stay the same. The app needs no #available check and no FoundationModels import: the library builds Apple’s model itself.

To set the reasoning level, pass it in the options:

				
					let agent = RTSAgent(
    llmProvider: .privateCloudCompute(options: .init(reasoningLevel: .moderate)),
    tools: [PlacesSearchTool()],
    systemMessage: "You are a local guide. Plan the days from the places you find."
)
				
			

Because the provider is chosen per agent, one flow can mix them. A heavy planning agent can run on PCC, while a short phrasebook agent stays on the device. In the trace, both report the provider AppleAI, told apart by model: apple-on-device or apple-private-cloud-compute. PCC runs record no cost.

When a user reaches the daily limit, the run throws RTSError.quotaLimitReached, with the reset date when Apple gives one, so the app can handle it without importing FoundationModels:

				
					do {
    let result = try await flow.run(agent: agent, prompt: prompt, gateway: gateway)
} catch let RTSError.quotaLimitReached(_, resetDate, _) {
    // Tell the user when they can try again, or let them pick another engine.
}
				
			

What you need

PCC is not open to every app yet. Before an agent uses .privateCloudCompute, check these:

  • OS 27. iOS 27 or macOS 27, on a device with Apple Intelligence turned on.
  • A network connection. Keep the on-device path for offline use.
  • The App Store Small Business Program. Your developer account must be enrolled, and your apps must have fewer than 2 million first-time downloads. TestFlight and ad hoc installs don’t count. Past that threshold, Apple gives an app 6 months to move off.
  • The PCC entitlement. The app must be signed with com.apple.developer.private-cloud-compute. It is a managed entitlement: Apple assigns it to your account, and you request it from the Private Cloud Compute developer page, which also lists the full eligibility rules.

 

The entitlement deserves a warning, with a caveat: PCC is new, and this is what we found while building RailtracksSwift against the 27 SDKs, so Apple may change it. At the time of writing, PCC reports itself as available without the entitlement, and an app signed without it crashes with a fatal error on its first request. No code can catch that, in the library or in your app. Until that changes, set the entitlement up first, and keep .privateCloudCompute out of builds that don’t have it.

A real app, on PCC

Fabricio, who built Travel Assistant on RailtracksSwift, moved its trip briefing to PCC and wrote it up in When the On-Device Model Runs Out of Room: Private Cloud Compute in a Swift Agent App.

The briefing runs several agents. One of them, the Local Guide, searches MapKit for places and plans the days of the trip. For an 18-day trip to Vancouver, its context passed the on-device limit by a single token: 8,193 of 8,192. With the engine switched to Private Cloud Compute, the same trip finished, every agent included.

The post is worth reading for what comes after the one-line change. Fabricio ships the entitlement in a second Xcode target behind a compile flag, so the regular build can never reach the fatal error. The app checks availability before each run and falls back to the device when PCC is not there. And a daily-limit error is never retried and never sent silently to a cloud provider: the user sees the reset time and chooses.

Try it yourself

.privateCloudCompute arrived in RailtracksSwift 0.6.0. If your agents already run on .appleAI, the move is one line, plus an entitlement from Apple. If they run on OpenAI, Anthropic or Gemini, it is the same line, and the API key goes away.

Source Code and References

November 23, 2026

In our last post, we introduced Meeting Memory, our reference agentic app for Apple platforms. The iPhone captures whiteboards, and the…

November 19, 2026

The next battle in enterprise AI isn’t just about who builds the smartest models. It’s about who owns the intelligence that…

November 18, 2026

Inside the Demo: Railtracks, Railengine and Conductr on Apple Platforms Agents belong inside the app. This is what that looks like….