You add AI to an existing app by placing a small AI service between your app and a model API. Then you wire it into one screen or workflow at a time. Most teams can add AI to existing app features in 3 to 8 weeks without a rebuild. Search, drafting, document extraction and support assistants are the usual first features.
The app keeps its database, logins and screens. The new service handles prompts, model calls, safety checks and logging, so a model change later touches one component instead of the whole codebase.
On this page
- Do you need to rebuild your app to add AI?
- Which AI features pay off first in an existing app?
- The architecture: one AI service beside your app
- How AI features use your app's own data
- Four ways to wire AI into a screen or workflow
- Step by step: adding your first AI feature
- Which model to use and what each request costs
- How to keep AI features secure
- How to test AI features before and after release
- How to handle slow responses and outages
- How to measure whether the AI feature is working
- Common mistakes when adding AI to an app
- Questions to ask a developer before you start
- Adding AI to a website vs a mobile app
- Timeline and budget for common additions
- Worked example: AI service reports in a field service app
- Rules and frameworks to check before launch
Do you need to rebuild your app to add AI?
Almost never. An AI feature is an outside service your backend calls, the same way it calls a payment gateway or an email provider. If you control the backend and the new service can read your API or database, you can add AI without touching the core.
Three situations call for work before the AI work:
- The app runs on an unsupported stack, such as an end-of-life PHP version, and cannot safely call modern APIs. Upgrade first, and the guide on how to update your PHP version covers that path.
- The data the feature needs lives in spreadsheets or email, not in the app. The first phase becomes getting that data into the system.
- A no-code platform blocks custom backend code. Some allow outside API calls through plugins, and some do not.
For older PHP apps, an upgrade from PHP 8.1 to 8.4 or a move to Laravel costs less than a rebuild. It also leaves room for the AI service beside it.
Which AI features pay off first in an existing app?
Start where staff or users already spend time reading, typing or searching. The hour ranges below are for one feature added to a working app, before testing on your own data.
Feature | What it does | Data it needs | Typical hours |
|---|---|---|---|
Smart search | Finds records or articles by meaning, not exact words | Your content, indexed for search | 60 to 150 |
Draft assist | Writes a first draft of a reply, note or description in an existing form | Examples of good past drafts | 40 to 120 |
Document extraction | Reads invoices, forms or PDFs and fills fields | Sample documents and the target fields | 60 to 160 |
Summaries | Condenses long tickets, calls or records into a few lines | The record history | 30 to 80 |
Support assistant | Answers user questions inside the app from your help content | Help articles and policies | 150 to 400 |
Recommendations | Suggests next products, content or actions | Usage or purchase history | 100 to 250 |
Agent actions | Books, updates or orders on the user's behalf with approval | Access to the systems involved | 120 to 300 |
Draft assist and summaries are the safest first features, because a person reads every output before it goes anywhere, and a bad draft costs one click to discard. A support assistant answers users directly, so it needs more testing; the guide to AI chatbot development cost prices that build in detail.
The architecture: one AI service beside your app
Keep the AI logic out of your existing code. A separate service, or a clearly separated module, owns everything model-related:
- Prompt templates, stored in version control like code, so a prompt change can be reviewed and rolled back.
- Retrieval, when answers must come from your documents or records.
- Model calls through one adapter, so switching from OpenAI to Claude or Gemini changes configuration, not features.
- Output validation before anything reaches a screen or a database.
- Caching, rate limits and per-user usage caps.
- A fallback, so the feature degrades to the old behavior when the model is slow or down.
- Logs of every prompt, response, cost and user rating.
For features that write to your database, ask the model for structured data instead of free text. OpenAI's Structured Outputs guide describes a feature that makes the model always return responses matching a JSON schema you supply. That turns "read this invoice" into fields your code can check before saving.
How AI features use your app's own data
Most useful features need your data, such as a customer's order history or your help articles. The model does not hold that data. The AI service fetches the relevant records at request time and passes them in with the prompt.
- For structured data such as orders or tickets, query the database the normal way and pass only the fields the task needs.
- For documents and articles, index them for semantic search and pass the top 3 to 5 passages.
- Filter by permissions before retrieval, so a request can only pull records that user may see.
- Send the minimum. A summary of one ticket needs that ticket, not the customer's payment details.
Sending less data also costs less. Every extra 1,000 input tokens on gpt-6.1-sol adds $2 per 1,000 requests, so trimming a bloated prompt pays back on every call.
Four ways to wire AI into a screen or workflow
Pattern | Example | Main risk | Best first use |
|---|---|---|---|
In-screen assist | A "Draft reply" button in the helpdesk view | Low: a person edits before sending | Yes |
Background job | Overnight summaries of yesterday's tickets | Low to medium: errors sit unseen until someone reads them | Yes |
Chat assistant | A help panel that answers questions from your docs | Medium: users read answers directly | After one simpler feature |
Agent with actions | An assistant that reschedules an appointment | High: it changes real records | Only with approval steps |
The first two patterns let a team learn how the model behaves on real data with almost no user-facing risk. Agents come last because every action needs permission checks, an audit trail and a way to undo.
Step by step: adding your first AI feature
- Pick one task and one metric, such as "cut time to write a service report from 6 minutes to 2."
- Collect 50 real inputs and the outputs a good employee would produce for them.
- Check the data path: where the feature reads from, where results are saved and who may see them.
- Build the AI service with one prompt, one model and structured output.
- Run the 50 inputs and score each result as usable, needs edits or wrong.
- Fix prompts and retrieval until the usable rate meets your bar, such as 45 of 50.
- Add the fallback, logging, usage caps and a thumbs-up or thumbs-down control.
- Release behind a feature flag to 10 percent of users, then 50, then everyone, about a week per stage.
- Review costs, ratings and failures weekly for the first month.
Steps 2 and 5 are where projects succeed or stall. Teams that skip the 50-input test launch on demo examples, and demo examples are always the easy ones.
Which model to use and what each request costs
Assume a drafting request sends 2,500 input tokens and gets 400 output tokens back. Prices are the standard rates on the OpenAI, Anthropic and Google pricing pages as of October 2026.
Model | Input / output per 1M tokens | Cost per 1,000 requests |
|---|---|---|
OpenAI gpt-6-luna or Claude Haiku 5.5 | $0.10 / $0.50 | $0.45 |
Google Gemini 3.8 Flash | $0.75 / $3.75 | $3.38 |
OpenAI gpt-6.1-sol or Claude Sonnet 5.5 | $2.00 / $10.00 | $9.00 |
Anthropic Claude Opus 5.5 | $4.00 / $20.00 | $18.00 |
OpenAI gpt-6-astra | $10.00 / $50.00 | $45.00 |
Start with a mid-tier model to prove the feature works, then test whether a small model holds the same usable rate. Summaries and extraction are the first features to try on a small model, which costs about 95 percent less than the mid tier. Background jobs can use batch processing, which Anthropic and Google price at 50 percent off.
Google lists Gemini 3.8 Flash input doubling to $1.50 per million tokens on January 1, 2027. Because the service uses one model adapter, a price change becomes a test run on your evaluation set, not a code project. The guide comparing ChatGPT, Claude and Gemini for business covers vendor choice in more depth.
How to keep AI features secure
The top risk is prompt injection. The OWASP Top 10 for LLM Applications lists it as LLM01:2025. OWASP defines it as user prompts that alter the model's behavior or output in unintended ways. Indirect injection is the version that catches app teams: instructions hidden inside a file, email or web page the model reads.
OWASP's mitigations translate into five build rules:
- Give the model the narrowest access that does the job. A summarizer needs read access to one record, not the whole database.
- Validate every output with ordinary code before saving or showing it.
- Mark untrusted content, such as uploaded files and user text, separately from your instructions.
- Require a person to approve high-risk actions, such as refunds, deletions or outbound messages.
- Keep API keys and secrets out of prompts, and call the model only from your backend, never from the browser or app.
Data terms matter as much as code. OpenAI's business and API tiers and Claude Team state that customer content is not used for model training by default. Google says Workspace content is not used for training outside your domain without permission. The guide on whether ChatGPT is safe for business data explains the plan differences.
How to test AI features before and after release
AI features fail differently from normal code. The same input can give a different output tomorrow, and a vendor model update can change behavior without any change on your side. So testing runs on a schedule, not once.
- An evaluation set of 50 to 200 real inputs with known good outputs, run before every prompt or model change.
- A pass rule written in advance, such as 90 percent usable and zero unsafe outputs.
- Adversarial cases: inputs that try to override instructions, ask for other users' data or push the feature off topic.
- Load tests at peak traffic, because model latency adds seconds that a normal API call does not.
- Live signals after launch: thumbs-down rate, edit rate on drafts and cost per active user.
Set a rollback trigger before launch. If the thumbs-down rate doubles in a week, the feature flag goes back to the previous prompt while the team investigates.
How to handle slow responses and outages
Model calls take seconds, where a normal database query takes milliseconds. Three design choices keep that delay from hurting the app:
- Stream text to the screen as it is generated, so users see progress within a second.
- Move non-urgent work into background jobs and notify the user when the result is ready.
- Cache repeated requests, such as the summary of a record that has not changed since yesterday.
For outages, the fallback is the old behavior: the empty reply box, the keyword search, the manual form. Users accept a missing AI suggestion for an hour. A screen that stops working costs support tickets and trust.
How to measure whether the AI feature is working
Track the metric from step 1 against a baseline taken before launch, and pair it with a guardrail metric that catches quality problems.
Feature | Primary metric | Guardrail metric |
|---|---|---|
Draft assist | Time to send a reply | Share of drafts heavily edited |
Summaries | Time to understand a record | Thumbs-down rate |
Document extraction | Fields saved without correction | Errors caught at review |
Smart search | Searches that end in a click | Searches with no useful result |
Support assistant | Questions resolved without a ticket | Escalations and complaints |
Agent actions | Tasks completed after approval | Actions reversed |
Cost per active user belongs on the same dashboard. A feature that saves 3 minutes per task but costs more per user than that time is worth needs a smaller model or a usage cap.
Common mistakes when adding AI to an app
- Starting with a chatbot because it demos well, when a draft button would save more time at lower risk.
- Calling the model from the browser or the phone, which exposes the API key to anyone who looks.
- Spreading one vendor's SDK across the codebase, so a price change or model retirement turns into a rewrite.
- Shipping without a fallback, so a model outage breaks a screen that worked before.
- Leaving out usage caps, so one user or one bug runs up the bill overnight.
- Treating the prompt as finished at launch. Prompts need the same review and version control as code.
Each of these costs little to avoid in week one and a lot to fix after users depend on the feature.
Questions to ask a developer before you start
- Which model do you propose, and how will we switch models later?
- Where do prompts live, and who can change them?
- How will you test the feature, and what pass rate do you propose before launch?
- What happens on screen when the model is slow or unavailable?
- How do you stop prompt injection and limit what the model can reach?
- What will the feature cost per month at our expected volume?
- Who owns the code, prompts, evaluation sets and cloud accounts?
A developer who answers all seven in writing has done this work before. Vague answers on testing or ownership are the two warning signs worth acting on.
Adding AI to a website vs a mobile app
Websites get AI through the server, so changes ship the moment you deploy. Common additions are AI search across the site, a help assistant, product description drafting in the admin panel and lead qualification on forms. Content-heavy sites can also answer from their own pages, the same pattern businesses use to train ChatGPT on their own data. Search is the easiest website win: a store with 2,000 products can let shoppers type "waterproof boots for wide feet" and get matches that keyword search misses.
Mobile apps add three constraints. Every model call should still go through your backend, so keys stay off the device. Usage caps matter more, because a mobile user can tap a button 50 times in a minute. And store releases slow down prompt fixes unless the prompts live on the server. App-side budgets, including store fees, are broken down in AI app development cost.
Timeline and budget for common additions
Hours multiplied by rate set the build cost. The table uses two reference rates: $50 an hour for an offshore agency team and $150 an hour for a US agency.
Addition | Hours including testing | At $50 an hour | At $150 an hour | Calendar time |
|---|---|---|---|---|
Summaries or draft assist in one screen | 60 to 160 | $3,000 to $8,000 | $9,000 to $24,000 | 2 to 4 weeks |
Document extraction into existing fields | 100 to 220 | $5,000 to $11,000 | $15,000 to $33,000 | 3 to 6 weeks |
Smart search across your content | 100 to 200 | $5,000 to $10,000 | $15,000 to $30,000 | 3 to 5 weeks |
In-app support assistant | 200 to 450 | $10,000 to $22,500 | $30,000 to $67,500 | 5 to 10 weeks |
Agent actions with approvals | 180 to 400 | $9,000 to $20,000 | $27,000 to $60,000 | 5 to 10 weeks |
Monthly running cost is usually the smaller line. At $9 per 1,000 mid-tier requests, 20,000 requests a month cost $180 in model fees. Upkeep of 6 to 10 hours a month for prompt reviews and evaluations costs more at either rate.
Worked example: AI service reports in a field service app
Say a pest control company in Florida runs its own field service app for 30 technicians. Each visit ends with a typed service report. The company wants technicians to record a 60-second voice note instead, with AI drafting the report for a quick review.
- Volume: 30 technicians, 8 visits a day, 22 working days, or 5,280 reports a month.
- Transcription: OpenAI lists gpt-transcribe at $0.0045 a minute, so 5,280 one-minute notes cost about $24 a month.
- Drafting on gpt-6.1-sol at $9 per 1,000 requests adds about $48 a month.
- Build: about 220 hours for recording, transcription, the drafting service, a review screen and testing, or $11,000 at $50 an hour and $33,000 at $150.
Model fees come to about $72 a month, or about $864 a year. If each report takes 4 fewer minutes, the company gets back about 350 technician hours a month. At an assumed $25 hourly labor cost, that time is worth about $8,800 a month, which is the number that justifies the build.
Rules and frameworks to check before launch
No single US law governs every AI feature, and state rules are changing quickly. The guide to AI laws that apply to US businesses in 2026 covers disclosure, hiring and state-level requirements. For an internal risk process, the NIST AI Risk Management Framework is intended for voluntary use and was released on January 26, 2023. Its Generative AI Profile, NIST-AI-600-1, followed on July 26, 2024.
Two habits cover most small-business risk. Tell users when content is AI-generated, and keep a person accountable for any AI output that affects money, health, employment or legal rights. This is general information, not legal advice.
Pick one task and collect the 50 real inputs this week, because that sample answers most scoping questions before any code is written. Through its AI development service, Techno Mantra adds LLM features to existing apps, websites and CRMs on OpenAI, Claude and Gemini. You own the code and the accounts, and an NDA is available on request. Send the task and a few sample inputs through the contact page or to info@technomantraa.com, and every inquiry gets a reply within one business day.
Frequently asked questions
Yes. Your backend calls the OpenAI API through a small service that holds the prompts, validates outputs and logs usage. The app keeps its own database and screens, and the same service can switch to Claude or Gemini later through configuration.
A focused feature such as summaries or draft replies takes 2 to 4 weeks including testing. Document extraction and smart search take 3 to 6 weeks, and an in-app support assistant or agent actions take 5 to 10 weeks.
Model calls take longer than normal API calls, so AI features should load separately from the rest of the screen and show progress. Background jobs, caching and smaller models keep the delay out of the main user flow.
Yes, for simple features. Many no-code platforms can call outside APIs through plugins or webhooks, which is enough for drafts and summaries. Features that need retrieval, strict output checks or per-user limits usually need a small custom backend service.
No. Almost every business feature runs on a model API from OpenAI, Anthropic or Google, priced per token. Your own data reaches the model through retrieval at request time, so nothing needs to be trained.