AI App Development: Architecture and Pitfalls
· DigifyNow
In AI app development, a language model does one specific job inside an iOS, Android or web app, like reading receipts or answering questions from company documents. The app never calls the model directly. It calls your own backend, which holds the API key, adds company data to the request via RAG, queries the model and checks the answer. The other option is a small model that runs on the device. You sign off on it with a test set of real inputs.
AI app development means building an app so that a language model inside it does one clearly defined job. On the technical side, the app sends its requests to your own backend or to a small model on the device. It never sends them straight to the model provider with an exposed API key. How well it works depends less on the user interface than on the data flow, the cost per call and a test set built from real inputs.
What does AI app development actually mean?
The term covers two different things. One is an app built with AI: an AI app builder turns text prompts into a user interface, or a coding assistant writes code alongside the developer in the IDE. The other is an app with AI working inside it. It summarizes documents, answers questions from company knowledge, reads receipts from a photo or suggests replies to customer inquiries. You can combine the two, but the decisions are different. In the first case, the questions are about code quality and maintainability. In the second, they are about data flow, the ongoing cost per request and how to test a model that doesn't always give the same answer to the same question. This article is mostly about the second case. What AI builders can do and where they stop is covered in our article on building an app with AI and its limits. How much coding assistants actually contribute to the code is covered in our piece on AI software development.

How does the AI get into the app?
The usual architecture has three layers. The app on iOS or Android is just the front end. Behind it sits your own backend, and behind that the provider's language model, which the backend calls through the provider's API. The developer docs from OpenAI (developers.openai.com) and Anthropic (docs.anthropic.com) explain how these requests are authenticated with a secret API key.
That key never belongs in the app. An app package can be unpacked and read, and anyone who finds the key can send requests on your bill. That's why the backend takes on several jobs. It checks who is logged in. It pulls matching passages from your documents (retrieval augmented generation, or RAG) and attaches them to the request. It limits how many requests each user can make. And it logs what goes back and forth. If the model needs to trigger something itself, like creating an appointment, it calls predefined functions through the backend. The backend decides what the model is allowed to do, not the model. How knowledge retrieval and these function calls work together is explained in our article on how AI chatbots work.
Example: How does a request flow through an AI app?
Here's a typical example from a mid-sized company: a field technician takes a photo of a gas receipt, and the app is supposed to put the date, amount, tax rate and vendor into the expense report. This is how it works, step by step:
- The app shrinks the photo on the device and sends it to the backend along with the technician's login token. It does not go to the model provider.
- The backend checks the token and the user's daily limit. If the limit has been reached, it rejects the request before any model costs come up.
- The backend sends the image and the instructions to the model and requires a fixed output format, such as JSON with the fields date, amount, tax rate and vendor.
- The answer gets checked: Is the amount a number? Is the date not in the future? Does the tax rate match the allowed values? If a check fails, the app flags the field for correction instead of guessing.
- The technician confirms or corrects the values. Only then does the backend write the record to accounting or the ERP system.
- Every correction goes into the test set. The next time you switch models or prompts, you can check whether exactly these receipts are still read correctly.
What doesn't work in this example: posting receipts automatically without confirmation. A model can't reliably read crumpled or handwritten receipts, and a wrong amount then only shows up once it reaches accounting.
Cloud API, your own model or on-device AI?
There are four realistic approaches. They differ in where the data is processed, who handles operations and what still works without an internet connection. To compare them, we apply the same criteria to each one.
| Approach | Where the data is processed | What it does well | Where it falls short |
|---|---|---|---|
| A model provider's cloud API through your own backend | At the model provider, routed through your server | Large, current models with no hardware of your own, fast start | Costs per call, no function without a connection, data flow to the provider has to be settled by contract |
| Open model on your own or a rented server | On your server | Data never leaves your infrastructure, no per-call price from a model provider | You handle hardware, updates and outages, smaller models give weaker answers on hard tasks |
| Small model directly on the smartphone | On the user's device | Works offline, inputs aren't transmitted | Depends on device age and storage, only simple tasks like classifying or short summaries |
| AI feature of an off-the-shelf service (e.g., text recognition, translation) | At the service provider | Narrowly defined tasks with no prompt work of your own | Little control over behavior and output format, lock-in to one provider |
In practice, many projects end up with the first approach and keep the model interface in the backend swappable. That way you can switch providers later without pushing the app through the stores again. When running your own model still makes sense is covered in our article on local AI for business.

What tools do Google and Apple offer for AI in apps?
Besides your own backend with a model API, the platform vendors offer their own options. The details below are based on the developer docs from Google (developer.android.com, firebase.google.com) and Apple (developer.apple.com), as of November 2026. Features and supported devices change with every operating system release, so check the current docs before your project starts.
| Option | Where the model runs | Platforms | What it's good for | Where it falls short |
|---|---|---|---|---|
| Firebase AI Logic (Google) | In the cloud, called through a Firebase service instead of with your own key in the app | Android, iOS, web, Flutter | Fast way into Gemini models without your own server, abuse protection through Firebase App Check | Tied to Google's models and a Firebase project, your own knowledge retrieval and business rules still need server logic |
| ML Kit GenAI with Gemini Nano (Google) | On the Android device, provided through the AICore system service | Supported Android devices only | Summarizing, rewriting, proofreading, image descriptions without transmitting inputs | No iOS, not all devices supported, small models for simple tasks |
| Foundation Models framework (Apple) | On the iPhone, iPad or Mac, as part of Apple Intelligence | Only Apple devices with Apple Intelligence and a current OS | Text tasks and structured output in Swift apps, offline | No Android, older devices are left out, server fallback needed |
| Your own backend with a model API (e.g., OpenAI, Anthropic, Google) | In the chosen provider's cloud | All, including web apps | Free choice of model, knowledge retrieval, permissions, limits and logging under your control | You run the server yourself, cost per call, no function without a connection |
For business apps that need to work the same on iOS and Android, an on-device service alone is rarely enough, because Gemini Nano only runs on Android and Apple's framework only runs on Apple devices. Often it's a mix: simple tasks run on the device if it can handle them, and everything else goes through the backend.
What's different between iOS and Android?
For the AI itself, the platform hardly matters as long as the model runs in the backend. The app sends a request and displays the answer, often streamed word by word so nobody is staring at a blank screen. The differences come up in three places. First, store review: Apple and Google review every version, and both require you to disclose what data the app collects and who it goes to. If you send inputs to a model provider, you have to declare that there. Second, on-device AI: which models run locally depends on the OS version and the hardware. A feature that only runs on new devices therefore needs a server fallback. Third, the codebase: native apps mean two codebases, in Swift and Kotlin. With Flutter or React Native, you get one shared codebase for both platforms. How the two frameworks compare for small and mid-sized businesses is covered in Flutter vs React Native. If only employees at their desks use the AI feature, a web app without any store is often enough.
Why do AI apps fail?
- API key in the app: someone reads the app package and abuses the key. The root cause is a missing backend between the app and the model.
- No test set: without a fixed collection of real inputs and expected answers, nobody notices when a prompt change or a new model produces different errors. Language models aren't deterministic, so a single trial run proves nothing.
- Made-up answers: when knowledge retrieval finds nothing relevant, the model fills the gap with plausible but wrong statements. What helps is an instruction to answer only with a cited source, or to say clearly that nothing was found.
- Unlimited costs: without per-user limits and usage monitoring, spending grows with every long request.
- Silent model updates: providers replace or retire older model versions. If you don't call a pinned version and don't have a test set, you only find out about behavior changes through complaints.
- AI without a job: a chat feature that's supposed to do everything rarely gets used. A narrowly defined task like extracting receipt data, on the other hand, can be tested and signed off.
The cost question comes up in almost every conversation. A reliable number depends on the scope, the integrations with existing systems, the data preparation for knowledge retrieval and ongoing operations including model costs. The individual line items are covered in our article on AI costs for subscriptions, tokens and operations.

What does the EU AI Act require of an AI app?
For most business apps, two obligations under the European AI Act are relevant, in the version as amended by its most recent amending regulation. The transparency obligations have applied since August 2, 2026. Among other things, they require that people are told when they are interacting with an AI system, unless that's obvious from the circumstances. Providers are also supposed to mark synthetically generated audio, image, video or text content in a machine-readable way. For systems placed on the market before August 2, 2026, the deadline for this is December 2, 2026. Then there's Article 4 on AI literacy: providers and deployers support building AI literacy among the people who work with the system. They don't have to guarantee any particular level of literacy. The high-risk rules apply to systems under Annex III from December 2, 2027, and to systems under Annex I from August 2, 2028. Which obligations actually apply to your app depends on its purpose and use. Architecture alone can't settle that. If in doubt, you'll need legal advice.
Why does agile development fit AI apps?
Agile development means working in short cycles. Each cycle ends with a working build that the client reviews, and then priorities are set again. With AI features, that's more than a preference, because how well a model handles your real documents and requests only shows up in testing. A spec that fixes everything up front breaks down under that uncertainty. That's why every cycle includes three things: the test set with real inputs, a review of which answers were wrong or unusable, and a decision on whether to change the prompt, the knowledge retrieval or the scope of the task. Methods like Scrum and Kanban are compared in our article on agile development and its limits.
Agile software development: What does the client need to contribute?
Agile software development only works if someone on the client side regularly has time to review interim builds and decide what comes next. In Scrum, this role is called the product owner. Without it, unreviewed builds pile up, and errors in the AI feature only surface shortly before launch. How the backlog, cycles and reviews fit together is covered in our article on the agile software development process.

AI assistant for your business: Do you need an app for it?
An AI assistant in a business answers questions from internal documents, drafts text or prepares tasks. It only needs its own app if employees use it on the go, if it needs access to the camera or location, or if it belongs in an existing app workflow. In the office, a web interface or an integration into a tool you already use is usually enough. Two questions have to be settled first. Which documents is the assistant allowed to read? And can everyone see everything, or do access permissions have to be carried over from the file system? The permissions question in particular is often underestimated. How DigifyNow builds these assistants and trains employees to use them is described on our page about AI assistants for businesses.
App development in the Westerwald
App developers in the Westerwald
DigifyNow is based in Unnau in the Westerwald region of Germany (Grenzweg 9a) and works across Germany, with a focus on the Westerwald, Koblenz and Siegerland. Our team, Jesper Schmidt, Christian Schiebl and Miles Pandel, builds apps for iOS and Android, web apps and custom software for small and mid-sized businesses. An MVP usually takes four to eight weeks, and after that we support the system in production. With Festino, a product by DigifyNow, we brought our own party game app to the App Store and Google Play. So we know the path through both stores from our own work. More on how we work locally is on our page for app developers in the Westerwald.
Choosing an app development agency in the Westerwald: What to look for
Whoever you hire, settle a few things up front: whose name the Apple and Google developer accounts are in, who owns the source code and the backend access, and who holds the contracts with the AI model provider. Without that, every later change depends on your current vendor. More criteria are collected in our article on how to find an app developer. The process from idea to store is described in our piece on how to develop an app. If you're planning app development with AI features, our services page shows how DigifyNow splits up the MVP, store release and operations.
Web app development in the Westerwald
A web app runs in the browser, needs no store review and can be changed without shipping an update. For internal tools with AI features, like a document search or a back office, that's often the faster route. One example is the custom back office with CRM that DigifyNow built for Mundo Marketing. The limits show up with push notifications, offline use and hardware access on iOS. How we build web apps in the region is described on our page on web app development in the Westerwald.

When outside help makes sense
Outside help makes sense when the AI feature works with company data, has to connect to existing systems like a CRM or ERP, or belongs in an app that has to pass store review. A single chat subscription that employees use in the browser, on the other hand, doesn't need any development. For a first conversation, have the following ready: the specific task the AI should take on, a handful of real example requests along with good answers, the data sources involved, and who will use the app on which devices. With that in hand, we can give you a free, no-obligation assessment of your project. In it, we work out which approach fits and what the cost drivers are.
Frequently asked questions
What is AI app development?
AI app development is building an app in which a language model handles a specific task, like reading receipts, summarizing text or answering questions from company documents. Unlike a traditional app, the same input field doesn't always return the same answer. That's why it takes your own backend with the API key and limits, checks on the output and a test set of real inputs. This is different from an app that is merely built with AI tools.
How much does it cost to develop an AI app?
It depends on four drivers: the app's feature scope, the number of integrations with existing systems, the data preparation for knowledge retrieval and operations. In operation, there are model costs per call. Unlike with traditional apps, this adds ongoing costs that grow with usage. A reliable number is only possible once the task and data sources are pinned down.
Can an AI app work offline?
Only if the model runs on the device. On Android, that works with Gemini Nano through ML Kit GenAI, and on Apple devices with Apple Intelligence through the Foundation Models framework (according to the vendors' documentation, as of November 2026). It works for simple tasks like summarizing or rewriting, but only on supported devices. With a cloud API, nothing works without an internet connection. The app can only queue requests and send them later.
Do I need to train my own AI model?
Usually not. For questions about company knowledge, RAG is generally enough: the backend searches for matching passages and passes them to the model. That's easier to keep current than custom training, because new documents only need to go into the search index. Custom training tends to pay off for very specialized formats or technical language.
Is an AI app builder enough instead of custom development?
For a clickable prototype or a simple internal interface, an AI app builder is often enough. It gets hard with role-based login, integration with existing systems, secure storage of API keys and store release. Those parts still have to be developed. Check up front whether the generated code can be exported and maintained.