AWS S3 Backup Strategy: Best Practices for 2026

TL;DR
A safe S3 backup strategy in 2026 layers versioning with lifecycle limits, AWS Backup (continuous + snapshots), an immutable copy in a separate account and Region, and restore tests you actually run.
Quick answer: A solid AWS S3 backup strategy in 2026 has four layers. Turn on S3 Versioning with lifecycle limits. Run AWS Backup with continuous plus snapshot rules. Copy recovery points into a logically air-gapped vault in a separate account and Region. Then test restores on a schedule, because an untested backup is a guess.
That's the whole strategy in one paragraph. The rest of this guide covers the decisions behind each layer, what each one costs, and the gaps AWS doesn't advertise loudly.
Key takeaways
- S3's 11 nines of durability protects you from AWS losing your data. It does nothing when you (or an attacker with your keys) delete it.
- Replication is not a backup. It copies mistakes as fast as it copies good data.
- AWS Backup's continuous mode gives point-in-time restore for up to 35 days. Snapshots cover anything longer, up to 99 years.
- The low-cost warm tier (launched November 2025) cuts long-term S3 backup storage by up to 30%.
- Since August 2026 you can read backup data through S3 Access Points without running a full restore. That changes how cheaply you can test.
Why "11 nines" isn't an S3 backup strategy
Here's the conversation we keep having with founders. "We're on S3. It's 99.999999999% durable. Why would we need backups?"
Then picture this. A developer runs a cleanup script against the wrong bucket on a Friday evening. Or an IAM access key leaks in a public repo, and someone encrypts or deletes every object they can reach. S3 performs those deletes with the same 11-nines reliability it uses to store your files. Durability worked perfectly. Your data is still gone.
Durability is a promise about hardware. A backup is a promise about your ability to undo things. Those are different contracts, and the AWS shared responsibility model puts the second one on you.
So the real question for an AWS S3 backup strategy is: what are you recovering from?
Start with the threat model, not the tools
Most S3 backup setups we audit were built tool-first. Someone enabled versioning, someone else added replication, and nobody wrote down what failure each piece was supposed to handle. Flip it. List the failures, then pick the control.
Failure you need to survive | What actually protects you | What does NOT |
|---|---|---|
Accidental overwrite or delete of a few objects | S3 Versioning | Replication (it replicates the overwrite) |
Bad deploy corrupts thousands of objects over hours | AWS Backup continuous (point-in-time restore) | Versioning alone (painful to roll back at scale) |
Leaked credentials, ransomware, malicious insider | Immutable copy in a separate account (air-gapped vault, Object Lock compliance mode) | Anything in the same account the attacker controls |
Full Region outage | Cross-Region copy or Cross-Region Replication | Same-Region backups |
Compliance audit asking for 7-year retention | AWS Backup snapshots with Vault Lock | Lifecycle rules that quietly expire data |
Then set two numbers for each data set:
- RPO (Recovery Point Objective): how much data you can afford to lose. 15 minutes? A day?
- RTO (Recovery Time Objective): how long you can be down while restoring.
Don't set one RPO for the whole company. Your user-uploaded files and your build-artifact bucket deserve very different treatment, and pricing them the same is how backup bills get out of hand.
The 11 AWS S3 backup best practices for 2026
1. Tier your buckets before you back up anything
Tag every bucket with a data tier. We use three:
- Tier 1: data the business can't run without (customer uploads, invoices, medical or financial records). Continuous backup, air-gapped copy, tight RPO.
- Tier 2: important but rebuildable with effort (analytics exports, processed media). Daily snapshots, cross-Region copy.
- Tier 3: reproducible from source (build artifacts, caches, logs you already ship elsewhere). Versioning with short retention, or no backup at all.
Skipping backup for Tier 3 is a legitimate decision. Write it down so it reads as a choice, not an oversight.
2. Turn on versioning, then put a ceiling on it
AWS Backup for S3 requires S3 Versioning. So does Object Lock. That makes versioning non-negotiable.
But versioning without lifecycle rules is a slow cost leak. Every overwrite keeps the old copy forever. On a bucket that rewrites the same JSON file every minute, you'll pay for roughly 43,000 versions of it per month.
Two lifecycle rules fix most of this:
The ExpiredObjectDeleteMarker line matters more than it looks. AWS Backup bills each delete marker as if it were a 128 KiB object, so orphaned markers on a high-churn bucket add up.
Pick the NoncurrentDays value with care. Once a version expires, AWS Backup can't restore it either. Your noncurrent retention should be at least as long as your shortest RPO window.
(For the exact console and CLI steps, see our AWS S3 backup setup guide.)
3. Use AWS Backup with continuous and snapshot rules together
AWS Backup has two modes for S3, and the right answer for Tier 1 data is both:
- Continuous backup tracks changes through EventBridge and lets you restore to any point in the last 35 days. This is your "undo the bad deploy from Tuesday at 14:20" button.
- Snapshot (periodic) backup runs on a schedule (hourly, daily, weekly, monthly) and can be retained for up to 99 years.
When both rules sit in the same backup vault, AWS Backup builds snapshots from the continuous recovery point. You get long retention without scanning the whole bucket again or paying for duplicate storage. AWS's own guidance recommends this combined setup.
Two setup traps we see often:
- EventBridge isn't enabled on the bucket. Continuous backup silently depends on it. Check with
aws s3api get-bucket-notification-configurationand look for"EventBridgeConfiguration": {}. - The same bucket sits in two backup plans with continuous rules. AWS supports one continuous backup per bucket. Keep continuous and periodic recovery points in the same vault.
4. Keep one copy outside the blast radius
This is the practice that separates a real AWS S3 backup strategy from a checkbox.
If your backups live in the same AWS account as production, anyone with admin on that account can delete them. Ransomware crews know this. They go after the backups first.
The fix in 2026 is the AWS Backup logically air-gapped vault:
- Recovery points are locked by default and encrypted with AWS-owned keys, or with your own KMS key since November 2025.
- Since November 2025 you can send primary backups directly into the air-gapped vault, so you don't pay for a second copy in a standard vault first.
- With multi-party approval (June 2025), a team of approvers across your AWS Organization can grant recovery access even if the source account is fully compromised or locked out.
- AWS added six more Regions for these vaults in July 2026, so availability is much less of a blocker than it was at launch.
Our default layout: production account, a dedicated backup account in a second Region, and the air-gapped vault in that backup account. Nobody's day-to-day IAM role touches the backup account.
5. Make backups immutable on purpose
You have two immutability tools, and they protect different things.
S3 Object Lock works on the bucket itself. In compliance mode, no user, including the root account, can delete or shorten retention on a locked object version until the retention date passes. In governance mode, users with s3:BypassGovernanceRetention can override it. Governance mode is fine for testing. For ransomware protection, use compliance mode, and be sure about the retention period, because you can't undo it.
AWS Backup Vault Lock works on recovery points in the backup vault. In compliance mode it stops anyone from deleting backups early or changing the retention policy once the cooling-off period ends.
For Tier 1 data, we'd use Vault Lock (or the air-gapped vault) on the backups and save Object Lock for buckets with a regulatory write-once requirement. Object Lock on a busy production bucket can lock you into paying for data you'd love to delete.
6. Don't confuse replication with backup
S3 Cross-Region Replication (CRR) is excellent at one job: keeping a live copy in another Region for failover. With S3 Replication Time Control, AWS replicates 99.99% of objects within 15 minutes.
But look at what it does with bad changes:
- Ransomware overwrites 2 million objects with encrypted versions. CRR copies the encrypted versions.
- An app bug writes empty files. CRR copies the empty files.
- Delete marker replication is optional. Permanent deletes of specific versions are never replicated, which helps a little, but an attacker with access to both buckets doesn't care.
CRR also has no built-in point-in-time restore. Rebuilding a bucket "as of last Tuesday" from replicas means stitching together S3 Inventory and Batch Operations by hand.
Use CRR when your RTO is minutes and you need a hot standby. Pair it with AWS Backup for the "go back in time" requirement. One is availability, the other is recoverability, and you usually need both.
7. Assign backups by tag, so new buckets aren't forgotten
The bucket that loses data is rarely the one you planned for. It's the one a developer created six months ago for "a quick feature."
Assign resources to AWS Backup plans by tag (for example backup-tier = tier1), not by listing bucket ARNs. Then enforce the tag:
- Add it to your Terraform or CloudFormation bucket module so every new bucket gets one.
- Use AWS Backup Audit Manager or an AWS Config rule to flag buckets that have no backup tier tag.
- For multi-account setups, push backup policies through AWS Organizations so new accounts inherit them.
8. Cut storage costs with the warm tier and smarter retention
AWS Backup storage for S3 runs about $0.05 per GB-month in US East (N. Virginia), against $0.023 for S3 Standard itself. Backups can easily cost more than the bucket they protect. A few levers:
- Turn on the low-cost warm tier. Launched November 2025, it moves backed-up objects that have been in the vault at least 60 days to a tier about 30% cheaper (roughly $0.035 per GB-month in AWS's example), with the same restore speed. There's a one-time fee of about $0.01 per 1,000 objects to transition.
- Watch small objects. Objects under 128 KB are billed as 128 KB, even in the warm tier. A bucket of millions of tiny thumbnails is a bad warm-tier candidate, and sometimes a bad AWS Backup candidate overall.
- Exclude ACLs and object tags if you don't need them restored. AWS Backup lets you disable both in advanced backup settings.
- Delete expired recovery points and partial backups. They keep billing until they're gone.
AWS published a worked example worth stealing for your own business case: 500 TB and 1 billion objects in US East, 80% of objects tiered. Monthly backup storage dropped from $25,600 to $19,456. The $8,000 transition fee pays for itself in under two months.
9. Get encryption and key access right
Encryption is where restores fail at 2 a.m.
- SSE-S3 and SSE-KMS objects back up fine. With SSE-KMS, the AWS Backup role needs
kms:Decrypton the source key, and you'll see those calls in CloudTrail. - SSE-C (customer-provided keys) is not supported by AWS Backup. If any of your buckets use it, you need a different backup path for those objects.
- If you use a customer-managed KMS key for an air-gapped vault, protect that key's policy as carefully as the vault itself. Losing the key means losing the backup.
One more trap: if CloudTrail data events or S3 server access logs are enabled for a backed-up bucket, deliver them to a different bucket. Logging into the bucket being logged creates an endless write loop, and AWS Backup will dutifully back up every log line.
10. Know what AWS Backup does NOT back up
This list surprises almost every team we review:
- Bucket configuration: bucket policies, CORS, lifecycle rules, access points and bucket settings are not included. Restore gives you objects, not the bucket as it was.
- S3 Glacier Flexible Retrieval and Glacier Deep Archive objects are not supported.
- Directory buckets (S3 Express One Zone) and S3 on Outposts are not supported. General purpose buckets only.
- Restored objects don't keep their original version ID, creation date, storage class, or ETag.
The answer for bucket configuration is infrastructure as code. If your buckets live in Terraform or CloudFormation, the config is "backed up" in Git. If they were clicked together in the console, fix that before you need a restore.
11. Test restores like you mean it
Every backup strategy looks great until the first restore. Teams find out during the incident that the IAM role can't decrypt the KMS key, or that the restore of 40 million objects needs a service limit increase, or that the "daily" backup job failed silently three weeks ago.
What changed in 2026 is how cheap testing has become:
- Backup access points (August 2026). AWS Backup can now create read-only S3 Access Points on a recovery point. You can run
GetObject,HeadObjectandListObjectsV2against backup data directly, with no restore job. That's perfect for spot-checking files, validating data, or forensics after an incident. The recovery point can't be deleted while an access point is active. - AWS Backup restore testing runs scheduled restores into an isolated environment and records whether they worked.
- Amazon GuardDuty Malware Protection for AWS Backup (November 2025) scans recovery points for malware before you restore, so you don't restore the infection along with the data.
A simple cadence we recommend: automated restore tests monthly for Tier 1, quarterly for Tier 2, and one full game-day restore of a Tier 1 bucket every year with a stopwatch running. Compare the result against the RTO you wrote down in step one.
Sample S3 backup strategies by company stage
Not everyone needs the full stack on day one. Here's how we'd scale it.
Early-stage startup | Growing SaaS | Regulated / enterprise | |
|---|---|---|---|
Versioning + lifecycle | Yes | Yes | Yes |
AWS Backup | Daily snapshots, 30-day retention | Continuous + daily snapshots | Continuous + daily/monthly snapshots, multi-year retention |
Separate backup account | Optional | Yes | Yes, with multi-party approval |
Air-gapped vault / Vault Lock | Nice to have | Yes for Tier 1 | Required |
Cross-Region | Backup copy only | Backup copy + CRR for Tier 1 | CRR with RTC + backup copy |
Restore testing | Quarterly manual check | Monthly automated | Monthly automated + annual game day + audit reports |
If you're still picking your stack, our SaaS tech stack guide for 2026 covers where S3 fits next to your database and hosting choices.
Common S3 backup mistakes we keep finding
- Backups in the same account as production. The single most common gap, and the one ransomware exploits.
- Lifecycle rules shorter than the RPO. Old versions expire before anyone notices the corruption.
- No alert on failed backup jobs. Wire AWS Backup job events to EventBridge and send failures to Slack or PagerDuty.
- Assuming Glacier objects are covered. They aren't.
- Never timing a restore. Your RTO is a guess until you've measured it.
These are the same kind of quiet failures we wrote about in the real cost of bad software: cheap to prevent, very expensive to discover late.
Need a second pair of eyes on your S3 backups?
At Craxinno we design and ship cloud infrastructure for startups and growing businesses, including AWS Backup plans, multi-account setups and restore runbooks. If you'd like us to review your current setup against the checklist above, talk to our team and we'll tell you where the gaps are.
Frequently Asked Questions
What is the best backup strategy for AWS S3?+
Combine S3 Versioning with lifecycle rules, AWS Backup using continuous and snapshot backups, an immutable copy in a separate AWS account and Region (a logically air-gapped vault or Vault Lock), and scheduled restore tests. Each layer handles a different failure.
Is S3 versioning enough as a backup?+
No. Versioning protects against accidental overwrites and deletes inside one bucket. It doesn't protect against an attacker or admin who can delete versions, a Region outage, or corruption across millions of objects. Treat versioning as the first layer, not the whole plan.
Is S3 Cross-Region Replication a backup?+
Not by itself. Replication copies changes, including bad ones like encrypted or deleted data, to the destination bucket. It's built for availability and failover. Use AWS Backup alongside it for point-in-time recovery.
How much does AWS Backup for S3 cost?+
In US East (N. Virginia), AWS Backup storage for S3 is about $0.05 per GB-month, with the low-cost warm tier at roughly $0.035 per GB-month for data older than 60 days. Restores, cross-Region copies and request charges are billed separately.
How do I protect S3 backups from ransomware?+
Keep backups in a separate AWS account, make them immutable with a logically air-gapped vault or AWS Backup Vault Lock in compliance mode, restrict who can change backup policies, and scan recovery points with GuardDuty Malware Protection before you restore.
How long can AWS Backup keep S3 backups?+
Continuous backups support point-in-time restore for up to 35 days. Snapshot backups can be retained for up to 99 years, which covers most compliance retention rules.
Have something to build?
Design and engineering under one roof — we scope it, build it, and stay for the long tail.
Start a projectKeep ReadingMore case studies like this
Engineering retros, product launches, and brand systems from our studio — updated monthly.
All case studiesTechnology Used
Tags & Keywords
Continue with Blogs.
View all blogs
AI AgentsAI Agent Pricing: What Should You Actually Pay in 2026?
AI Agent Pricing: What Should You Actually Pay in 2026? AI agent pricing in 2026 runs from about $0.10 per interaction for off-the-shelf support bots to $200,000+ for enterprise custom builds. Most businesses should expect to pay $0.99 to $2.00 per resolved conversation on a SaaS agent, or a one-time build fee plus $500 to $3,000 a month in model and infrastructure costs for a custom agent. That range is useless on its own, so this guide breaks it apart. You'll see what the big vendors actually charge, how custom-build quotes are put together, the token math most quotes leave out, and the point where building your own agent becomes cheaper than renting one. We build AI agents for clients at Craxinno, and the most common question we get isn't "can you build this?" It's "why did the last agency quote me $90,000 for this?" Let's answer that properly. AI Agent Pricing at a Glance (2026) Option Typical 2026 price Best for No-code agent platforms $29 to $200 per month to start Internal automations, small teams testing ideas Off-the-shelf support agents $0.10 per session to $2.00 per conversation or resolution Customer support on an existing helpdesk Enterprise agent platforms $125+ per user per month, or $30,000 to $300,000+ per year Large orgs already on Salesforce, Zendesk and similar Custom-built agent (agency quotes) $20,000 to $200,000+ one-time Agents tied to your own data, tools and workflows Running costs for a custom agent Model tokens plus roughly $500 to $3,000+ per month in infrastructure Anyone who owns the agent The no-code figure comes from Toolradar's survey of 319 agent tools, where the median cheapest paid plan was $29 a month. The custom-build range matches what agencies such as Cleveroad publish. Vendor prices below are list prices as reported in late 2026, so check the vendor's page before you sign. The 5 AI Agent Pricing Models You'll Run Into Vendors stopped agreeing on how to charge for agents somewhere around 2024. Salesforce alone now sells Agentforce three different ways at the same time. Here's how the models break down. 1. Per conversation You pay every time the agent talks to someone, whether it solves the problem or not. Salesforce launched Agentforce at $2 per conversation in October 2024. Ada reportedly lands between $1.00 and $3.50 per interaction. Simple to understand, but you pay for the failures too. 2. Per resolution (outcome-based) You pay only when the agent closes the ticket without a human. Intercom's Fin charges $0.99 per outcome. Zendesk charges $1.50 per automated resolution on committed volume and $2.00 pay-as-you-go. Gorgias sits around $0.60 to $1.27 depending on plan. This sounds like the fairest deal, and often it is. The catch: the vendor defines "resolved." If a customer gives up and leaves, some systems count that as a win. Read the definition in the contract, not the landing page. 3. Credits or per action Salesforce's Flex Credits (May 2025) bill $0.10 per action, sold in packs of 100,000 credits for $500. Microsoft Copilot Studio sells 25,000 credits for $200 a month. Lindy starts at $29.99 per user per month with 3,000 credits. Credits are flexible, but forecasting them is hard until you've watched real usage for a month or two. 4. Per seat The old SaaS model, bolted onto agents. Agentforce per-user licenses start at $125 per user per month. Microsoft 365 Copilot is $30 per user per month. Fine for copilots that help employees. Strange for an agent that's supposed to replace the work of seats. 5. Platform fee plus usage Common at the enterprise end. Decagon reportedly charges around $50,000 a year as a platform fee, then adds per-conversation or per-resolution fees on top. Sierra quotes custom enterprise pricing only. What Off-the-Shelf AI Agents Cost in 2026 If you want a support agent and already use one of these helpdesks, here's the real comparison. Vendor Pricing model Reported price Intercom Fin Per outcome $0.99 per outcome (helpdesk seats from $29/month) Zendesk AI Per resolution $1.50 committed, $2.00 pay-as-you-go Salesforce Agentforce Conversation, credits or seat $2/conversation, $0.10/action, or $125/user/month Freshdesk Freddy AI Per session $0.10 per session ($100 per 1,000) Gorgias Per resolution About $0.60 to $1.27 Ada Custom About $30,000+ yearly minimum (reported) Decagon Platform fee plus usage About $50,000/year plus usage (reported) Don't stop at the per-resolution number. Agentforce implementations reportedly run $50,000 to $150,000, with ongoing consulting at $10,000 to $25,000 a month. A cheap unit price on a platform that needs a six-figure rollout isn't cheap. How Much Does It Cost to Build a Custom AI Agent? Published agency ranges look like this, using Cleveroad's 2026 breakdown: Reactive agent (answers questions, no memory): $20,000 to $35,000+ Contextual agent (remembers the conversation, uses your data): $40,000 to $70,000+ Autonomous agent (plans steps, calls tools, takes actions): $80,000 to $120,000+ Domain-specific enterprise agent (compliance, deep integrations): $100,000 to $200,000+ Those numbers are real quotes from real agencies. But they mostly reflect agency rates, not the difficulty of the work. Every custom quote comes down to one formula: Build cost = hours × hourly rate A US or UK agency billing $120 to $200 an hour gets to $80,000 fast. The same scope at a $25 an hour studio (our standard rate at Craxinno) costs a fraction of that. So the first question to ask about any quote is simple: how many hours is this, and what's the breakdown? Where do the hours actually go? In the agents we've shipped, the LLM call itself is the easy part. The time disappears into four places: Integrations. Connecting the agent to your CRM, helpdesk, database or payment gateway. Every API has its own auth, rate limits and weird edge cases. Knowledge setup. Cleaning your docs, chunking them and building retrieval (RAG) so the agent answers from your data instead of guessing. We wrote a full walkthrough in our guide to building a RAG chatbot with the OpenAI API . Guardrails and fallbacks. What happens when the agent isn't sure? When a tool call fails? When a user tries to make it say something it shouldn't? Testing against real conversations. This is the step that's skipped in cheap builds and the reason many agents look great in a demo and fall apart in week two. If a quote doesn't show hours against these items, you can't compare it with anything. If you're weighing offshore options, our post on how to hire AI developers in India covers what to check before you sign. The Token Math Most AI Agent Quotes Leave Out Here's the cost that keeps running after the build invoice is paid. Every time your agent thinks, it spends tokens. Cost per task = (input tokens × input price) + (output tokens × output price) Take a simple inbox-triage agent that reads 20,000 tokens and writes 2,000 per task. On a mid-tier model priced at $2 per million input tokens and $10 per million output tokens (OpenAI list pricing as of October 2026, per Dupple's breakdown): Input: 20,000 × $2 ÷ 1,000,000 = $0.04 Output: 2,000 × $10 ÷ 1,000,000 = $0.02 Total: $0.06 per task Now look at what model choice does to the same workload, per 1,000 tasks: Agent type Budget model Mid-tier model Flagship model Inbox triage (20k in, 2k out) $3 $60 $300 Research, 5 lookups (60k in, 6k out) $9 $180 $900 Coding/ops with cached context $11.70 $222 $1,170 That's a 100x spread for the same job. And this is where most of the waste we see comes from: teams pick the flagship model for everything because it won the demo, then get a shock at month-end. Route the easy 80% of requests to a cheap model and save the expensive one for the hard cases. It's usually the single biggest saving available. Two more things on tokens. Prices move. Dupple reports Google's Gemini Argon doubling on December 1, 2026, and Gemini 3.8 Flash doubling on January 1, 2027, so lock your budget to a model you can swap out. And if a job can wait, OpenAI's Batch processing halves standard prices. Hidden Monthly Costs of Running an AI Agent The model bill is rarely the biggest line once you're in production. Budget for these too: Vector storage and memory: roughly $500 to $2,500+ a month depending on traffic and data size Logging pipeline: $300 to $800 a month Monitoring integrations: $300 to $1,000 a month, plus $100 to $500 for error tracking Prompt tuning and testing: $1,000 to $5,000 a month if you keep improving the agent (and you should) Search grounding: on Gemini, 5,000 requests a month are free, then $14 per 1,000 Hosting: your servers or serverless functions. If you're on AWS, plan this before launch, not after Those ranges come from Cleveroad's and Dupple's 2026 breakdowns. A small agent with modest traffic will land at the low end of each. You won't need every line on day one, but you'll need most of them by month three. Buy vs. Build: When Does a Custom AI Agent Pay for Itself? This is the question that actually decides your budget, so let's do the math with real list prices. Say your support agent resolves 5,000 tickets a month. On Intercom Fin at $0.99 per outcome: about $4,950 a month, or roughly $59,400 a year. On Zendesk at $1.50 per resolution: about $7,500 a month, or $90,000 a year. On a custom agent: 5,000 tasks on a mid-tier model at a triage-sized prompt costs about $300 a month in tokens. Add $1,000 to $2,000 for infrastructure and monitoring, and you're at roughly $1,300 to $2,300 a month before the build cost. At that volume, the gap is roughly $2,600 to $6,200 a month. A custom build in the $15,000 to $30,000 range can pay for itself inside a year. At 300 tickets a month, it won't. Fin would cost you about $300 a month, and no custom build beats that. So our honest rule of thumb: Under about 1,000 resolutions a month: buy. Use the agent built into your helpdesk. Thousands of resolutions a month, or the agent needs to take actions in your own systems: build, or at least get a quote. The agent is the product you sell: build. You can't rent your core feature from a vendor who sets the price. So, What Should You Actually Pay for an AI Agent in 2026? Here's where we'd land for most small and mid-sized businesses: Testing an idea: $0 to $200 a month on a no-code platform. Spend a month proving people will use it. Customer support on a standard helpdesk: $0.99 to $2.00 per resolution. Negotiate committed-volume pricing once you know your numbers. A custom agent tied to your systems: a build fee based on clear hours at a fair rate, then a monthly running cost you can predict from token math plus infrastructure. Paying $90,000 for a first agent with no hour breakdown and no running-cost estimate is the thing to avoid. Not because the agency is dishonest, but because you can't tell whether the price matches the work. Red Flags in an AI Agent Quote No hour breakdown, just a single number. No estimate of monthly token and hosting costs. Locked to one model provider with no way to switch. No test plan using your real past conversations. No answer to "what happens when the agent is wrong?" A per-resolution contract that doesn't define "resolution." If a quote has two or more of these, ask for a revised one before you compare prices. For a wider view of how development pricing works, see our breakdown of what a dedicated development team costs in 2026 and our best tech stack picks for SaaS startups . Get a Clear AI Agent Quote from Craxinno Craxinno is an AI-first design and development studio. We've been building software since 2017, and we price AI agent work the way this article recommends: hours you can see, at $25 an hour, with a running-cost estimate before you commit. If you want a second opinion on a quote you've already received, send it over. We'll tell you if it's fair. Talk to us about your AI agent project → Sources Fin: AI Agent Pricing Comparison 2026 SaaStr: Salesforce now has 3 pricing models for Agentforce Dupple: How Much Does It Cost to Build an AI Agent in 2026? Cleveroad: AI Agent Development Cost in 2026
RAGHow to Build a RAG Chatbot with the OpenAI API (Tutorial)
How to Build a RAG Chatbot with the OpenAI API (Tutorial) A RAG chatbot answers questions from your documents instead of from whatever the model memorised during training. You split your content into chunks, turn each chunk into an embedding, store them, retrieve the closest chunks for every question, and pass them to the model as context. With the OpenAI API you can do this in two ways: the managed file_search tool, or a do-it-yourself pipeline with embeddings. This tutorial builds both in Python, then shows what changes when you take it to production. What is a RAG chatbot (and why not just fine-tune)? RAG (retrieval-augmented generation) is a pattern where the app looks up relevant passages from your own data at question time and gives them to the language model as context, so the answer is grounded in those passages rather than in the model's training data. Picture a support bot asked, "Do you offer refunds after 30 days?" A plain LLM will guess. It sounds confident, and it may be wrong. A RAG bot first pulls the refund section of your policy PDF, then answers from that text and can point to the source. Fine-tuning changes how a model writes. It is a poor way to teach it facts that change every month. If your pricing page, product docs or HR policy gets edited, RAG picks up the change the moment you re-index the file. A fine-tuned model needs another training run. For a chatbot that has to be correct about your business , retrieval is almost always the first thing to build. How a RAG chatbot works: the 5-step pipeline Ingest your sources (PDFs, Markdown, help-centre pages, database rows). Chunk them into passages of a few hundred tokens with some overlap. Embed each chunk into a vector with an OpenAI embedding model and store it. Retrieve the top-k chunks closest to the user's question. Generate an answer with the model, using only the retrieved chunks, and cite them. Everything else (re-ranking, hybrid search, query rewriting, evaluation) is a refinement of one of these five steps. Two ways to build it with the OpenAI API Option A: Managed file_search Option B: DIY embeddings Setup time Minutes A few hours Chunking & embedding Handled by OpenAI You control it Where vectors live OpenAI vector store Your database (pgvector, Qdrant, Pinecone, etc.) Metadata filters, custom ranking Limited Full control Best for Prototypes, internal tools, small to medium document sets Multi-tenant SaaS, strict data residency, large or fast-changing data Our view after shipping both: start with Option A to prove the bot is useful, then move to Option B only when you hit a concrete limit (tenant isolation, filtering, cost at scale, or data that cannot leave your infrastructure). Prerequisites Python 3.10 or newer An OpenAI API key stored as the OPENAI_API_KEY environment variable A folder of documents to test with (a product manual or FAQ export works well) 1 pip install openai numpy tiktoken In the code below, the chat model is read from an OPENAI_MODEL environment variable. Set it to a current model from OpenAI's models page, since model names change more often than this tutorial will. Option A: Build a RAG chatbot with the Responses API and file_search This is the fastest route. OpenAI's file search tool parses your files, chunks them, embeds them and runs the search for you. You get a working bot in roughly 40 lines. Step 1: Upload files and create a vector store 1 2 3 4 5 6 7 8 9 10 11 12 13 from pathlib import Path from openai import OpenAI client = OpenAI ( ) vector_store = client . vector_stores . create ( name = "company_knowledge_base" ) for path in Path ( "docs" ) . glob ( "*.pdf" ) : with open ( path , "rb" ) as f : uploaded = client . files . create ( file = f , purpose = "assistants" ) result = client . vector_stores . files . create_and_poll ( vector_store_id = vector_store . id , file_id = uploaded . id , ) print ( path . name , result . status ) # expect "completed" print ( "Vector store ID:" , vector_store . id ) What goes wrong: scanned PDFs with no text layer index as almost nothing. If a file "completes" but the bot never finds anything in it, run OCR on it first. Step 2: Ask questions with the file_search tool 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 import os MODEL = os . environ [ "OPENAI_MODEL" ] VECTOR_STORE_ID = "vs_..." # from step 1 SYSTEM = ( "You are the support assistant for our company. " "Answer only from the provided files. " "If the files do not contain the answer, say you don't know " "and suggest contacting support. Keep answers short." ) def ask ( question , previous_id = None ) : response = client . responses . create ( model = MODEL , instructions = SYSTEM , input = question , tools = [ { "type" : "file_search" , "vector_store_ids" : [ VECTOR_STORE_ID ] , "max_num_results" : 5 , } ] , include = [ "file_search_call.results" ] , previous_response_id = previous_id , ) return response r1 = ask ( "What is the refund window?" ) print ( r1 . output_text ) include=["file_search_call.results"] returns the matched chunks, so you can log them and show sources in your UI. max_num_results trades quality for cost: fewer chunks means fewer input tokens and faster replies, but a higher chance of missing the right passage. Five is a sensible starting point. Step 3: Keep the conversation going 1 2 r2 = ask ( "And does that apply to annual plans?" , previous_id = r1 . id ) print ( r2 . output_text ) Passing previous_response_id lets the API carry the chat history, so the follow-up "that" resolves to the refund window. No manual message list needed. That is a complete RAG chatbot. Wrap ask() in a FastAPI endpoint, put a chat widget on top, and you have an MVP. Option B: Build RAG from scratch with OpenAI embeddings Build it yourself when you need control: per-customer filtering, your own database, custom chunking for tables or code, or a hard rule that documents never leave your servers except as embedding requests. Step 1: Chunk your documents Chunking decides retrieval quality more than any other setting. Too large and each chunk mixes topics; too small and it loses the context needed to answer. 1 2 3 4 5 6 7 8 9 10 import tiktoken enc = tiktoken . get_encoding ( "cl100k_base" ) def chunk_text ( text , source , size = 400 , overlap = 60 ) : tokens = enc . encode ( text ) chunks = [ ] step = size - overlap for start in range ( 0 , len ( tokens ) , step ) : piece = enc . decode ( tokens [ start : start + size ] ) chunks . append ( { "text" : piece , "source" : source } ) return chunks Start around 300 to 500 tokens with 10 to 15% overlap. Better still, split on headings first (one H2 section per chunk), and only fall back to token windows for long sections. Structured splits keep a question and its answer in the same chunk. Step 2: Create embeddings 1 2 3 4 5 6 7 8 9 10 11 12 13 import numpy as np EMBED_MODEL = "text-embedding-3-small" def embed ( texts ) : resp = client . embeddings . create ( model = EMBED_MODEL , input = texts ) return np . array ( [ d . embedding for d in resp . data ] , dtype = np . float32 ) chunks = [ ] for path in Path ( "docs" ) . glob ( "*.md" ) : chunks += chunk_text ( path . read_text ( ) , source = path . name ) vectors = [ ] for i in range ( 0 , len ( chunks ) , 100 ) : # batch requests vectors . append ( embed ( [ c [ "text" ] for c in chunks [ i : i + 100 ] ] ) ) matrix = np . vstack ( vectors ) matrix /= np . linalg . norm ( matrix , axis = 1 , keepdims = True ) text-embedding-3-small returns 1,536-dimension vectors, accepts up to 8,192 input tokens, and is listed at $0.02 per million tokens ($0.01 with the Batch API) at the time of writing. Embedding a few thousand pages of docs usually costs cents, not dollars. Check OpenAI's pricing page before you quote a client. If retrieval quality on your data is weak, try text-embedding-3-large (3,072 dimensions) before rewriting anything else. Step 3: Retrieve the top-k chunks 1 2 3 4 5 6 def retrieve ( question , k = 5 ) : q = embed ( [ question ] ) [ 0 ] q /= np . linalg . norm ( q ) scores = matrix @ q # cosine similarity top = np . argsort ( - scores ) [ : k ] return [ ( chunks [ i ] , float ( scores [ i ] ) ) for i in top ] NumPy is fine for a few thousand chunks. Past that, move the vectors into a vector database: pgvector if you already run Postgres, or Qdrant, Weaviate or Pinecone if you want a dedicated service. The retrieval function stays the same shape; only the storage changes. Step 4: Generate a grounded answer with citations 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 def answer ( question , history = None ) : hits = retrieve ( question ) context = "\n\n" . join ( f "[{n}] ({c['source']})\n{c['text']}" for n , ( c , _ ) in enumerate ( hits , 1 ) ) prompt = ( "Answer the question using ONLY the context below. " "Cite sources like [1]. If the answer is not in the context, " "reply: \"I don't have that information.\"\n\n" f "Context:\n{context}\n\nQuestion: {question}" ) response = client . responses . create ( model = MODEL , input = ( history or [ ] ) + [ { "role" : "user" , "content" : prompt } ] , ) return response . output_text , hits text , sources = answer ( "How do I reset my password?" ) print ( text ) The "I don't have that information" line is the single most useful instruction in the prompt. Without it, the model fills gaps with plausible guesses, which is exactly the failure RAG is meant to stop. Step 5: Add memory for follow-up questions Follow-ups like "what about on mobile?" retrieve badly because the question alone has no subject. Fix it by rewriting the question before retrieval: 1 2 3 4 5 6 7 def standalone ( question , history ) : r = client . responses . create ( model = MODEL , input = history + [ { "role" : "user" , "content" : f "Rewrite this as a standalone question: {question}" } ] , ) return r . output_text Retrieve with the rewritten question, answer with the original one. This small step fixes a large share of "the bot forgot what we were talking about" complaints. Taking your RAG chatbot to production The demo works on day one. The work is in the next four weeks. These are the points we check on every RAG build at Craxinno: Build an evaluation set first. Write 30 to 50 real questions with known correct answers and the source they should come from. Re-run them after every change to chunk size, model or prompt. Without this you are tuning by vibes. Use hybrid search for names and codes. Embeddings are weak on exact strings like SKU numbers, error codes and people's names. Combine vector search with keyword (BM25) search and merge the results. Re-rank before you generate. Retrieve 20 candidates, re-rank them, and pass the best 5. Answers get sharper and you send fewer tokens. Filter by tenant and permission. In a multi-customer product, every chunk needs metadata (customer ID, role, document date) and every query must filter on it. One leaked chunk from another customer is a serious incident. Re-index on change. Hook ingestion to your CMS or storage events so edited documents are re-embedded automatically. Stale answers erode trust faster than "I don't know". Log retrieved chunks with every answer. When a user reports a wrong answer, you need to see whether retrieval or generation failed. They need different fixes. Stream responses. Use stream=True so text appears as it is generated. Perceived speed matters more than total latency in a chat UI. Common RAG mistakes (and quick fixes) Symptom Likely cause Fix Bot says "I don't know" when the answer exists Chunks too small or question phrased differently from the docs Larger chunks, heading-based splits, query rewriting Answers mix two unrelated topics Chunks too large Split by section, reduce chunk size Wrong product or SKU in the answer Pure vector search on exact identifiers Add keyword search (hybrid) Confident but invented answers Prompt allows answering outside context Explicit "only from context" rule and a fallback reply Costs climbing Too many chunks per query, long histories Lower top-k, re-rank, trim history How much does a RAG chatbot cost to run? Two meters run. Embeddings are cheap and mostly one-off: you pay once to index and again only for changed documents. The bigger, recurring cost is the chat model, because every question sends the retrieved chunks as input tokens. Five chunks of 400 tokens add about 2,000 input tokens per question before history. Cut top_k , trim history and pick a smaller model for simple FAQ traffic, and costs stay predictable. With managed file_search , also budget for vector storage and tool calls, which OpenAI prices separately on its built-in tools pricing page. Need a production-ready RAG chatbot? A tutorial gets you a working prototype. A chatbot your customers trust needs evaluation, permissions, monitoring and a UI people actually use. Craxinno designs and ships AI products end to end, from RAG pipelines and agentic workflows in Python (FastAPI, Django) to the web and mobile apps that sit on top. If you want a RAG chatbot built on your data, talk to our team .
SaaS DevelopmentBest Tech Stack for a SaaS Startup in 2026 (Our Picks)
Best Tech Stack for a SaaS Startup in 2026 (Our Picks) Short answer: the best tech stack for a SaaS startup in 2026 is TypeScript end to end. Next.js and React on the frontend, PostgreSQL for data, a managed auth provider, Stripe for billing, and Vercel or AWS for hosting. Add Python (FastAPI) only when your product does real AI or data work. Pick boring, popular tools, because your team and your AI coding assistant already know them. That's the whole recommendation. The rest of this guide explains why, where each piece breaks, and what we'd swap for different kinds of SaaS products. We've been building web apps , payment integrations and AI products at Craxinno since 2017, so the opinions below come from projects we've shipped, not from a vendor pitch. The Best SaaS Tech Stack for 2026 at a Glance Layer Our default pick Good alternative Switch when Language TypeScript Python (for AI/data services) You run models, RAG or heavy data pipelines Frontend Next.js + React SvelteKit, Remix Your team already ships fast in something else UI Tailwind CSS + shadcn/ui Material UI, Mantine You need a heavy enterprise data-grid look Backend / API Next.js route handlers or NestJS FastAPI, Hono A mobile app or third parties need a public API Database PostgreSQL (Supabase, Neon or AWS RDS) MySQL Almost never ORM Drizzle Prisma Your team prefers a schema-file workflow Auth Supabase Auth or Better Auth Clerk, Auth0 You need enterprise SSO out of the box Payments Stripe Paddle, Polar, Razorpay You want a Merchant of Record, or you bill in INR Hosting Vercel AWS, Railway, Coolify on a VPS Bills climb, or compliance needs a private cloud Email / analytics / errors Resend, PostHog, Sentry Postmark, Mixpanel, Better Stack Personal preference Why a "Boring" Tech Stack Wins in 2026 Two years ago the argument for popular tools was hiring. That still holds. But in 2026 there's a bigger reason: most of your code will be written or reviewed with an AI assistant, whether that's Cursor, Claude Code or GitHub Copilot. AI tools are very good at Next.js, PostgreSQL and Stripe. There are millions of public examples to learn from. They are noticeably worse at a niche framework that shipped a breaking change last quarter. So a mainstream stack now buys you speed twice: from humans and from machines. We see this on client projects every week. A founder arrives with an MVP built on an exotic combination (a new edge database, a beta auth library, a custom state manager). Each piece looked clever on its own. Together, nobody can debug them, and the AI assistant keeps suggesting code for the wrong version. The rule we follow: spend your novelty budget on the product, not the plumbing. Frontend: Next.js, React, TypeScript and Tailwind Next.js is the default SaaS frontend in 2026 for practical reasons. It handles your marketing site, blog, docs and logged-in dashboard in one codebase. Server rendering keeps your public pages fast and indexable, which matters if you plan to get customers from Google instead of only paid ads. Pair it with: TypeScript everywhere. Shared types between frontend and backend remove a whole class of bugs. Tailwind CSS for styling, and shadcn/ui for components you own and can edit, instead of a locked library. TanStack Query for data fetching on client-heavy screens. When would we skip Next.js? If your SaaS is a pure internal dashboard with no public pages and no SEO needs, a plain React + Vite single-page app is simpler to host and reason about. And if your team is already fast in Vue or Svelte, stay there. Switching frameworks to follow a blog post is a bad trade. Backend: Keep It in One Codebase as Long as You Can For most early SaaS products, the backend can live inside Next.js as route handlers and server actions. One repo, one deploy, one language. That's the fastest setup for a team of one to five developers. Split out a separate API when one of these becomes true: You're shipping a mobile app or browser extension that needs the same endpoints. Customers or partners need a documented public API. Long-running jobs (imports, reports, video or AI processing) start timing out serverless functions. At that point, NestJS or Hono keep you in TypeScript. If the heavy lifting is AI or data, use Python with FastAPI . It's where the AI libraries live, and FastAPI gives you typed, documented endpoints with very little code. We often run a TypeScript product app next to a small FastAPI service that only handles model calls, embeddings and data pipelines. It's a clean split that keeps each side in the language it's best at. Database: PostgreSQL, and Stop Worrying About It Use PostgreSQL. It handles relational data, JSON columns, full-text search, and vector embeddings through the pgvector extension . That last one matters: in 2026 most SaaS products add some AI search or retrieval feature, and Postgres lets you do it without a second database. Managed options that work well: Supabase if you want database, auth, storage and realtime in one place . Neon if you want serverless Postgres with database branching for preview environments. AWS RDS or Aurora if you're already on AWS or a client's security team requires it. Add Redis for caching, rate limits and sessions once you actually need it. Not on day one. What about MongoDB? It's fine for some products. But SaaS data is almost always relational: users belong to organizations, organizations have subscriptions, subscriptions have invoices. Forcing that into documents usually ends in painful joins written by hand. Pick MongoDB only if your core data really is schemaless. For the ORM, Drizzle is our current default because it stays close to SQL and is light on serverless. Prisma is still a solid choice with a gentler learning curve. Authentication: Don't Build It Yourself Login looks like a weekend task. Then come password resets, email verification, Google sign-in, magic links, two-factor auth, team invites, roles, and session security. Every hour on that is an hour not spent on the thing customers pay for. Supabase Auth is the easy pick if you're on Supabase already. Better Auth is an open-source TypeScript library that runs in your own app and database, with organizations and roles built in. Good for B2B SaaS. Clerk or Auth0 give you polished hosted UI and enterprise SSO, at a per-user price that grows with you. Check their pricing pages against your expected user count before you commit. Whichever you choose, design for multi-tenancy from the start: every row that belongs to a customer carries an organization ID, and every query filters by it. Retrofitting this later is one of the most expensive rewrites we see. Payments and Billing: Stripe, or a Merchant of Record Stripe is still the default for SaaS billing . Subscriptions, usage-based pricing, trials, coupons, invoices and the customer portal are all there. In the US its standard card fee is 2.9% + 30¢ per transaction . The real decision is whether you need a Merchant of Record like Paddle, Polar or Lemon Squeezy. They charge a higher fee, but they become the legal seller and handle global sales tax and VAT for you. For a solo founder selling to customers in dozens of countries, that's often worth it. For founders in India billing Indian customers, Razorpay handles UPI, cards and recurring payments in INR . Plenty of our clients run Razorpay for domestic customers and Stripe for international ones. It's more setup, but it covers both markets properly. One rule regardless of provider: treat webhooks as the source of truth for subscription status. Never trust the redirect after checkout alone. The AI Layer: What a 2026 SaaS Actually Needs Almost every SaaS brief we received this year had an AI feature in it . Smart search, a chat assistant over the customer's own data, document extraction, content generation. Here's the minimal setup that works: LLM APIs from Anthropic, OpenAI or Google, called through a thin wrapper so you can switch models without touching product code. pgvector in your existing Postgres for embeddings and retrieval (RAG) . You probably don't need a dedicated vector database until you're storing many millions of vectors. A job queue for anything slower than a few seconds. Trigger.dev or Inngest are simple for TypeScript teams. RabbitMQ or Celery fit Python-heavy pipelines. GPU hosting such as RunPod only if you run open-source or fine-tuned models yourself, for example image generation. Start with hosted APIs. Self-hosting models makes sense later, once you know your volume and the API bill is a real line item . Hosting and DevOps: Vercel First, AWS When It Pays Off Deploy to Vercel at the start. Git push, preview URLs for every branch, zero server management. For a pre-revenue startup that's the right trade. Move parts of the system to AWS (or GCP or Azure) when: Your hosting bill grows faster than your revenue. Enterprise customers ask for data residency, a VPC or specific compliance controls. You run background workers, queues or GPU jobs that don't fit serverless. A middle path that's grown popular: Coolify or Railway on top of a cheap VPS, which gives you a Vercel-like workflow at server prices. What to skip early: Kubernetes and microservices. A modular monolith with clear folders for billing, auth and each product area will carry you far further than most founders expect. You can split services when a real scaling problem shows up, and you'll know exactly where the seams are by then. The Supporting Tools Every SaaS Needs Before Launch Email: Resend or Postmark for transactional email, with React Email for templates. Product analytics: PostHog. It covers events, funnels, session replay and feature flags in one tool. Error tracking: Sentry. You want to hear about a failed checkout before the customer emails you. File storage: any S3-compatible bucket, such as AWS S3 or Cloudflare R2. CI: GitHub Actions running type checks, tests and migrations on every pull request. Most of these have free tiers. Before launch, your monthly stack bill can be close to zero beyond a domain name. Best Tech Stack by SaaS Type Type of SaaS Recommended stack B2B dashboard / workflow tool Next.js, NestJS or route handlers, PostgreSQL, Better Auth with organizations, Stripe, Vercel AI-first SaaS Next.js frontend, FastAPI service, PostgreSQL + pgvector, job queue, LLM APIs, AWS or Railway for workers Mobile-first SaaS React Native (Expo) + Next.js web , shared TypeScript API, Supabase, RevenueCat or Stripe Marketplace Next.js, PostgreSQL, Stripe Connect, Redis, background jobs for payouts and notifications Data / analytics SaaS Next.js, Python ETL pipelines, PostgreSQL plus a warehouse or Parquet files for heavy queries India-focused SaaS Next.js, PostgreSQL, Razorpay subscriptions, AWS Mumbai region for data locality Six Tech Stack Mistakes We See SaaS Founders Make The Frankenstein stack. Auth from one vendor, database from another, a third tool syncing users between them. Pick tools that work together. Microservices at ten users. You'll spend months on infrastructure that a single app handles easily. Building auth and billing from scratch. Use the services above and ship the product. Skipping multi-tenancy. Adding organization IDs to every table after launch is slow and risky. Choosing by hype. A framework trending this month is not a reason to bet your company on it. No monitoring until something breaks. Sentry and PostHog take an afternoon to set up. Do it before launch. Need Help Picking or Building Your SaaS Stack? The best tech stack for a SaaS startup is the one your team can ship and maintain without a fight. If you're planning a SaaS product and want a second opinion on architecture, or a team to build the MVP , Craxinno designs and ships full-stack web apps, AI features and payment integrations for startups worldwide. Browse more engineering guides on the Craxinno blog .



