Status update (October 2026): OpenAI shut down the Assistants API on August 26, 2026. Its managed features (file search, code interpreter, persistent conversations) now live in the Responses API. The trade-offs below still apply: read "Assistants API" as OpenAI's managed agent stack, and the custom-architecture side of the comparison is unchanged.
When a developer or technical founder decides to build an AI agent, there's a genuine architectural decision waiting early on: use the OpenAI Assistants API and its built-in capabilities, or build a custom agent architecture on the raw Chat Completions API with your own orchestration.
Both approaches produce real, production AI agents. The difference is in what you control, what you depend on, and what it takes to keep alive after launch. We've built both, and the recommendation depends on the situation more than either option's fans would tell you.
A 20-person insurance brokerage recently came to us with a use case: their team was spending 90 minutes a day pulling policy documents and answering repetitive client questions via email. They needed an AI assistant that could read PDFs, remember past conversations with each client, and draft replies. That's a case where the Assistants API got them to a working proof of concept in two days. Another client — a fintech startup processing 50,000 customer support tickets a month — needed multi-step routing logic, real-time cost monitoring, and the ability to swap in cheaper models for simple classification tasks. That required custom architecture from day one.
This comparison covers what the Assistants API handles for you, what a custom agent architecture gives you instead, the honest trade-offs side by side, the platform's limitations and API changes worth knowing, what each path looks like in practice, and our recommendation for prototypes versus production systems.
What the OpenAI Assistants API Gives You
The Assistants API is OpenAI's framework for building AI agents with persistent memory, tool use, and file handling. It manages several things that would otherwise require custom engineering:
Threads. Persistent conversation history stored by OpenAI. You don't manage conversation context yourself — you add messages to a thread and the API maintains the history. For a typical customer service scenario, this means a user can pick up a conversation three days later and the agent remembers what was discussed. The downside is that OpenAI stores that history, which matters for some clients.
File Search. Upload files (PDFs, documents, spreadsheets) and the Assistant can search them to answer questions. OpenAI handles chunking, embedding, and vector search for you. The built-in chunking works acceptably for clean, well-structured documents — think product manuals or HR policies. It struggles with dense legal contracts, scanned PDFs with poor OCR, or documents where the relevant passage depends on context from a different section.
Code Interpreter. A sandboxed Python environment the Assistant can use to execute code, process data, and generate files. Useful for analytical applications — a small accounting firm could use it to let clients upload a CSV of transactions and ask "show me all expenses over $500 this quarter." The sandbox resets between sessions, so it is not suitable for stateful computation.
Function Calling. Define tools (functions) the Assistant can call, and OpenAI's orchestration handles the tool-calling loop — recognising when to call a tool, parsing arguments, and continuing after the tool result. You define the function schema, OpenAI handles the decision of when to invoke it. This works well for straightforward single-tool workflows.
Built-in Runs management. The API manages the execution loop (runs) for you — polling for completion, handling tool calls, managing state transitions. You submit a run and poll for its status. It abstracts away the mechanics of agent execution, which is useful early on but means you have limited visibility into what's happening inside.
When the Assistants API makes sense:
- Rapid prototyping. You can have a working agent with memory and file search in hours rather than days.
- Small teams or solo developers. Less infrastructure to manage means less surface area to mess up.
- Applications where OpenAI's tool implementations are sufficient. If you need file search over a moderate document set and some built-in code execution, the Assistants API gets you there without custom development.
- Projects where OpenAI lock-in is acceptable. You're comfortable building on OpenAI's proprietary API with its associated pricing and terms.
- Internal tools with bounded scope. A 12-person law firm using an Assistant to help staff search their template library and precedents — that's a real fit, especially if they are already on OpenAI's enterprise tier for data controls.
Benefits of a Custom AI Agent Architecture
A custom agent uses the Chat Completions API directly, with your own orchestration layer managing conversation state, tool calls, and memory. Usually built with LangChain, LlamaIndex, or custom code.
The benefits come down to what you control.
Model Choice
You can use any model — OpenAI, Anthropic Claude, Google Gemini, open-source models via Ollama or Together AI. You're not locked to OpenAI. In practice this matters when you want GPT-4o for complex reasoning steps but a much cheaper model (like GPT-4o-mini or Claude Haiku) for document classification or intent routing. We commonly build pipelines that spend 80% of their compute on cheap models and reserve expensive calls for the steps that actually need them.
Memory Architecture
You decide how conversation history is stored, compressed, and retrieved. Redis, PostgreSQL, vector databases, or in-memory — based on your requirements, not someone else's defaults. For a healthcare platform serving patients across sessions, you might store structured summaries rather than raw transcripts, run nightly compression jobs, and retrieve only the most relevant prior context per query. None of that is possible through the Assistants API's thread management.
Retrieval Strategy
Full control over chunking, embedding models, vector databases, hybrid search, re-ranking, and query decomposition. You can optimise for retrieval quality instead of accepting whatever OpenAI ships. A client in the legal sector found that OpenAI's built-in file search missed about 18% of relevant clauses on their test set; a custom retrieval pipeline using recursive chunking, a cross-encoder re-ranker, and hybrid BM25 + vector search got that miss rate below 4%.
Orchestration Logic
Complex agent behaviours — multi-agent coordination, conditional routing, parallel tool calls, custom retry logic — need custom orchestration that the Assistants API can't accommodate. An e-commerce returns agent might run an intent classifier, a sentiment scorer, and a policy lookup in parallel before deciding which response path to take. Building that in Assistants API runs would mean a slow sequential chain; in custom code it's a straightforward async fan-out.
Cost Control
Custom architectures let you optimise token usage, use cheaper models for specific steps, and implement caching strategies that reduce cost at scale. The difference shows up on the bill. One SaaS product we optimised had an initial cost of $0.14 per user conversation using the Assistants API. After migrating to a custom architecture with prompt caching, model routing, and context compression, the same conversations cost $0.031 — a 78% reduction that made the unit economics viable without changing the product experience.
Data Residency
With a custom architecture, you can self-host models or choose providers with specific data residency guarantees. Conversation data can stay within your infrastructure. This is not optional for many clients in finance, healthcare, or any company operating under UK GDPR or similar frameworks.
When Custom Architecture Makes Sense
- Production customer-facing agents. Cost optimisation, caching, and performance tuning that the Assistants API doesn't support.
- Multi-model or multi-provider requirements. Different models for different tasks.
- Complex agent orchestration. Multi-agent systems, complex conditional logic, or behaviours that go beyond the Assistants API's run management.
- High retrieval quality requirements. The quality of document retrieval is a primary product differentiator and you need control over every part of the pipeline.
- Data sovereignty. Conversation data can't leave a specific jurisdiction or infrastructure.
- Regulated environments. Financial services, healthcare, legal — where you need full auditability and control over data processing.
The Honest Trade-Offs
| Factor | Assistants API | Custom Architecture |
|---|---|---|
| Time to first working prototype | Hours | Days to weeks |
| Control over retrieval quality | Low | High |
| Model flexibility | OpenAI only | Any model |
| Cost at scale | Higher (OpenAI pricing) | Lower (optimisable) |
| Maintenance overhead | Low | Higher |
| Data residency control | Limited | Full |
| Complex orchestration | Limited | Full |
| Debugging transparency | Limited | Full |
| Vendor lock-in | High | Low |
| Retrieval miss rate (typical) | 10–20% | 2–6% (with tuning) |
| Monthly cost at 100k conversations | $1,400–2,800 est. | $400–900 est. (optimised) |
These figures are estimates based on typical usage patterns we've observed — they will vary by application, model tier, and conversation length.
Assistants API vs Custom Agent Use Cases
The right choice depends far more on the use case than on the technology. These are the situations we see most often, and which side of the line each usually lands on.
Internal Document Q&A for a Small Team
The insurance brokerage described above needed staff to pull policy documents, remember each client's history and draft replies. Document sets were moderate, volume was low and speed to value mattered most. A managed API with built-in file search and persistent conversations delivered a working proof of concept in two days, which is exactly the situation where managed tooling earns its keep.
Ad Hoc Data Analysis for Clients
A small accounting firm letting clients upload a CSV and ask questions such as which expenses exceeded a threshold this quarter is a good fit for managed code execution. The sandbox handles the Python, and nothing needs to persist between sessions. The outcome is a useful analytical tool without the team building or securing its own execution environment.
High-Volume Customer Support
The fintech processing 50,000 tickets a month needed multi-step routing, real-time cost monitoring and cheaper models for simple classification. At that scale, per-conversation cost and latency are product requirements, not details. A custom architecture with model routing, caching and full observability was the only way to make the economics and response times work.
Retrieval Over Complex Legal or Technical Documents
When missing a relevant clause is a real failure, built-in chunking and search hit a ceiling. The legal-sector client mentioned earlier needed recursive chunking, re-ranking and hybrid keyword and vector search to bring the miss rate down. Teams in this position should plan for custom retrieval from the start, because prompt workarounds rarely close the gap.
Agents That Run Several Checks at Once
An e-commerce returns agent that runs intent classification, sentiment scoring and a policy lookup in parallel before deciding how to respond needs orchestration a managed run loop doesn't offer. Custom code makes the fan-out straightforward and keeps latency low, and it lets each step use the model best suited to it.
Validating a New Product Idea
When the question is whether users want the agent at all, a managed API is usually the faster way to find out. The key is to keep vendor calls in one module so that, if the idea works, moving to a custom architecture is a planned project rather than a rewrite.
The Assistants API Limitations Worth Knowing
Rate limits and latency. Assistants API runs are asynchronous — you submit a run and poll for completion. That adds latency compared to a direct Chat Completions call. Under load, run queue times can be unpredictable, and we've felt this in client projects. For a customer-facing application expecting sub-2-second response times, the polling overhead alone can push you over that threshold before you've even factored in the model call.
File search quality ceiling. Built-in file search works well for simple document Q&A. For production RAG where retrieval quality is the whole game — large document sets, complex queries, domain-specific content — custom retrieval consistently outperforms. The gap is especially pronounced with technical documentation, legal text, and documents where a query requires pulling context from multiple non-adjacent sections.
Pricing at scale. Assistants API includes costs for storage and processing that compound at high volume. Custom architectures can be meaningfully cheaper when volume is high and someone has done the cost optimisation work. OpenAI charges for file storage per day, assistant runs per call, and vector store usage on top of token costs. That overhead is fine for low-volume tools; it becomes a meaningful line item at production scale.
Debugging difficulty. When an Assistant behaves unexpectedly, diagnosing the cause means working through OpenAI's tooling rather than your own logs. Custom architectures give you full visibility into every step, which matters more than it sounds until you're trying to chase a weird bug at 11pm. In production systems we instrument every tool call, every retrieval result, and every model decision so we can trace any user complaint back to the exact sequence of events that caused it.
Dependency risk. The Assistants API has changed significantly since launch. Building a production system on a proprietary, evolving API creates dependency risk that custom architectures avoid. The Assistants API introduced breaking changes to its runs model in 2024, requiring teams to update their polling logic. Custom architectures using Chat Completions directly are more stable because that API has far more backward-compatibility pressure on it.
A Note on OpenAI's API Direction
The dependency risk above is not hypothetical. In 2025 OpenAI introduced the Responses API as its newer foundation for agent-style applications and, in August 2025, announced the Assistants API's deprecation. The API was shut down on August 26, 2026, and calls to its assistants, threads, and runs endpoints no longer work. Concepts like built-in file search and tool use carried over to the Responses API, but the object model does not map one to one, so any remaining Assistants-based integration needs real migration work.
What this means for your decision:
- Starting today? Check the current status in the OpenAI API documentation before writing any code, and build on whichever API OpenAI currently recommends for new projects.
- Already on the Assistants API? Treat migration as a scheduled project, not a weekend task. Isolate the API calls behind one module first, then move conversation state and file stores across.
- Weighing custom architecture? A thin abstraction layer over the model provider makes changes like this far cheaper, whichever vendor you use.
The broader lesson holds regardless of vendor: managed agent frameworks evolve faster than raw model APIs, and your product logic shouldn't be welded to their abstractions.
What to Expect in Practice
Assistants API path: A typical prototype takes one to three days for a developer familiar with the API. You will spend time on the system prompt, file upload format, and function schemas. You will hit the file search quality ceiling around the point your stakeholders start asking "why did it miss this obvious document?" Expect to spend time writing prompt workarounds for retrieval failures rather than improving the retrieval itself.
Custom architecture path: Budget two to four weeks for a solid first production version, including the orchestration layer, retrieval pipeline, and observability setup. The early investment pays back quickly — you can tune every component, swap models without rewriting the agent, and add capabilities (caching, logging, cost monitoring) incrementally.
Common Mistakes When Choosing Between Managed and Custom Agents
Not Planning the Migration
Starting with the Assistants API and not planning the migration is the most expensive mistake we see. Teams build product features on top of Assistants API abstractions, and when they eventually need to migrate — usually driven by cost or retrieval quality issues — the migration is expensive because the product logic is coupled to the API's concepts (threads, runs, assistants). If you build on the Assistants API for a prototype, keep the product layer thin and the Assistants API calls contained to a single module.
Underestimating Retrieval Quality
Many teams assume "it searched the documents, so it worked." Retrieval quality degrades gradually — you won't notice until someone asks a question the agent should answer and it gives a confident wrong answer. Build evaluation from day one: a test set of question/answer pairs against your documents, run it every time you change chunking or prompts. Our guide to LLM observability in production covers how to keep that visibility once real users arrive.
Going Live Without Spending Limits
This one is specific to custom architectures. An orchestration bug that causes an infinite tool-call loop will generate a large OpenAI bill before you notice. Set hard limits on tokens per run and spending per day before you go live.
Building Custom Before the Use Case Is Proven
The opposite error is spending weeks on orchestration, retrieval pipelines and observability for an agent nobody has validated with real users. If the core question is still whether people want the product, a managed API answers it faster and cheaper. Custom architecture pays off once the requirements are known, not before.
Ignoring the Platform Roadmap
Managed agent frameworks change faster than raw model APIs, as the Assistants API's retirement showed. Teams that never checked deprecation notices found themselves migrating under a deadline. Track the provider's announcements and treat any managed abstraction as something you may need to leave.
Best Practices for Building on Managed or Custom Agent Stacks
- Decide the architecture explicitly and write down why. Record the expected volume, retrieval requirements, data residency constraints and budget at the start of the project, and choose managed or custom against those criteria rather than defaulting to whatever is fastest this week.
- Isolate vendor calls behind one module. Whether you use a managed API or a single model provider, keep its SDK calls in one service layer so product features never depend directly on its objects. That turns a forced migration into weeks of work rather than months.
- Build a retrieval evaluation set before launch. Collect at least 50 representative questions with known answers and sources, run them on every change to chunking, embeddings or prompts, and set a pass threshold before shipping.
- Route models by task. Use cheaper models for classification and intent routing and reserve stronger models for steps that need them. Review the split regularly as model prices and capabilities change.
- Instrument every step. Log tool calls, retrieval results and model decisions so any user complaint can be traced to the exact sequence that produced it. That trace is also the evidence you need when deciding whether a migration is worth it.
- Set hard spending and token limits. Cap tokens per run and spend per day, and alert on unusual patterns before they become a bill. Test the limits deliberately in staging so you know they actually stop a runaway loop.
- Settle data handling before the build. Confirm where conversation data and files will be stored, for how long and in which jurisdiction, and check that against client and regulatory requirements before writing code.
- Check the provider's current recommendations. Before starting, confirm which API the provider recommends for new projects, and re-check during long builds. A deprecation notice discovered at kickoff is a design input; discovered at launch, it is a fire drill.
Our Recommendation
Use the Assistants API for: Prototypes, MVPs, internal tools with moderate requirements, and applications where getting to "working" quickly outweighs the need for optimisation and control.
Use custom architecture for: Production customer-facing agents, any application with meaningful scale, systems requiring high retrieval quality, regulated environments, and multi-agent orchestration.
The hybrid approach: Many teams prototype with the Assistants API, validate the use case, then migrate to custom when production requirements become clearer. This is a reasonable path — just plan the migration before you're under pressure to execute it. We've inherited "we'll migrate later" projects where "later" arrived in the form of a billing surprise. One SaaS team came to us with a $12,000/month Assistants API bill and a product that was starting to show retrieval failures at scale. The migration took six weeks and cut their monthly spend to $2,800 while improving answer accuracy. The delay cost them three months of avoidable spend.
Related guides
- Building multi-agent systems: when one agent isn't enough
- LangChain vs LlamaIndex: which framework to use
- How to build an AI agent without code
- Our AI agent development services
What We Build With
We build custom agent architectures for production deployments. We use the Assistants API for rapid prototyping and proof-of-concept work. The decision is made explicitly at the start of every project, with the trade-offs written down — not handed off as a "choice we'll figure out later."
Talk to us about your agent — we'll tell you which approach fits your specific requirements and why, including the cases where the Assistants API is genuinely the right call.
Frequently Asked Questions
Can I start with the Assistants API and switch to a custom agent later?
Not anymore. The Assistants API was shut down in August 2026, so a new build should start on the Responses API, OpenAI's managed replacement, or on a custom architecture. The same advice applies to the Responses API: plan the migration before you build, not after. Keep your managed-API calls inside a single module or service layer so your product features don't couple directly to OpenAI's abstractions (threads, runs, assistants). Teams that do this can migrate in two to three weeks; teams that build product logic directly on top of those abstractions often need two to three months.
How much does the Assistants API cost compared to building a custom agent?
The Assistants API adds storage and processing fees on top of token costs — roughly $0.10 per GB of file storage per day and vector store query fees on top of model costs. For a low-volume internal tool, that overhead is negligible. At 50,000+ conversations per month, the difference between an optimised custom architecture and the Assistants API is typically 50–80% lower cost for the custom path. The custom architecture requires upfront build investment, so the break-even point depends on your volume and development costs.
Is the Assistants API good enough for a customer-facing SaaS product?
It depends on your scale and retrieval requirements. For early-stage products with under 5,000 monthly active users and straightforward document Q&A, many teams ship on the Assistants API without problems. Once you hit meaningful volume or start needing accurate retrieval over large, complex document sets, the limitations become product problems. Most customer-facing SaaS products we've worked with eventually need a custom architecture — the question is whether you build it from the start or migrate later.
What framework should I use for a custom agent — LangChain, LlamaIndex, or something else?
It depends on the primary job the agent needs to do. LlamaIndex is stronger for document-heavy retrieval applications — its indexing and retrieval abstractions are more mature. LangChain offers a broader set of integrations and is better for complex orchestration workflows with multiple tools and agents. For simpler use cases, we often write a thin custom orchestration layer directly on the Chat Completions API rather than adopting a framework, because frameworks add abstraction layers that complicate debugging without adding much value at small scale.
How do I evaluate whether my AI agent's retrieval is good enough?
Build a test set of at least 50 representative question/answer pairs against your documents before you deploy anything. Run the agent against that set and measure retrieval accuracy: did it find the right source? Did it answer correctly? Set a threshold — for most business applications, you want over 90% retrieval accuracy before shipping to users. Run this evaluation every time you change chunking strategy, embedding model, or prompts. Without this, you're guessing.
Does the Assistants API work for regulated industries like finance or healthcare?
It depends on the specific regulation and what data you are processing. OpenAI offers a Business Associate Agreement (BAA) for healthcare customers under its enterprise tier, which enables HIPAA-compatible use for some applications. For financial services under FCA regulation in the UK, or for applications requiring data residency within specific jurisdictions, the Assistants API's data handling — where OpenAI processes and stores your conversation data — often does not meet the requirements. Regulated environments almost always end up needing custom architectures with self-hosted or EU/UK-resident cloud deployments.
How long does it take to build a production-ready custom AI agent?
For a focused use case — a customer support agent with retrieval over a defined document set and three to five tool integrations — expect four to eight weeks for a team of two developers. That includes the orchestration layer, retrieval pipeline, evaluation setup, and basic observability. Simpler use cases (single-turn Q&A, no complex tool use) can be production-ready in two to three weeks. Multi-agent systems with complex routing logic take longer — typically three to four months for the first production version.
Conclusion
The choice between OpenAI's managed agent tooling and a custom agent isn't about which is "better". It's about what you need to control. Managed APIs get you from idea to working prototype in days by handling conversation state, file search, code execution and the tool-calling loop. Custom architectures take longer up front but give you control over retrieval quality, model choice, cost, observability and where your data lives.
For prototypes, internal tools and low-volume use cases, the managed route is often the right call. For customer-facing products at scale, regulated environments and complex multi-step workflows, custom architecture usually wins over the life of the product. The expensive mistakes come from coupling product logic tightly to a vendor's abstractions, skipping retrieval evaluation, and going live without spending limits.
The platform itself is also moving. OpenAI's retirement of the Assistants API in August 2026 means any build still on it must move to the Responses API, which is a strong argument for keeping vendor-specific calls isolated whichever route you take.
If you want a second opinion on the right architecture for your use case, talk to our AI agent development team before you commit to either path.
