Before define_app(), you'd write individual intents in Python, compile them to separate Swift files, and manually wire them into an Xcode project. Friction at every step.
Now you declare the whole app structure in one file:
from axint import define_app, define_intent, param
search_notes = define_intent(
name="SearchNotes",
title="Search Notes",
description="Search your note library",
params={
"query": param.string("Search term"),
"limit": param.int("Max results", default=10),
},
)
create_note = define_intent(
name="CreateNote",
title="Create Note",
description="Save a new note",
params={
"title": param.string("Note title"),
"body": param.string("Note content"),
},
)
notes_app = define_app(
name="NotesApp",
bundle_id="com.example.notes",
intents=[search_notes, create_note],
description="A note-taking app with Siri support",
)axint compile app.py --format full-app --out Generated/You get a complete directory:
Generated/
App.swift # @main entry point
Intents.swift # Intent definitions
AppDelegate.swift # Intent handler routing
Info.plist # Metadata
App.entitlements # CapabilitiesCopy into Xcode. The app is runnable. It responds to Siri, Shortcuts, and Spotlight immediately.
Handler routing
The generated AppDelegate routes intent invocations to handler stubs:
extension NotesAppDelegate {
@MainActor
func performAsSearchNotes(
query: String,
limit: Int
) async throws -> IntentResult<[NoteResult]> {
let results = try await noteService.search(query, limit: limit)
return .result(value: results.map(NoteResult.init))
}
}Axint generates the stub with correct parameter types. You fill in the implementation.
The agent angle
This is where it gets interesting for AI workflows. An agent can:
1. Read a high-level description ("build me a notes app with search and create") 2. Write a define_app() Python file 3. Run axint compile 4. Drop the output into Xcode
No Swift knowledge required at any step. The agent works in Python, Axint handles the translation, and the output is production-quality Swift. We wrote more about this feedback loop in the Claude Code integration post.
define_app() is in the Python SDK starting at v0.2.1. It covers intent routing and basic app structure. Custom AppDelegate logic and multi-scene apps are coming in v0.3.