An AI agent for interior design: Claude without RAG or LangChain
A developer built a production Claude agent for an interior design studio without LangChain, RAG frameworks, or vector databases. Haiku 4.5 handles the chat, Sonnet 4.6 generates the design concepts, and the photos come from Pexels. The entire agent fits into a single 712-line main.py file and two prompts. The write-up covers the architectural tradeoffs and the real pitfalls along the way: Haiku's 4096-token caching threshold and parsing the extra text Sonnet wraps around its JSON.
AI-processed from Habr AI; edited by Hamidun News
A breakdown of a Claude-based AI agent for automating interior design has been published on Habr: 712 lines of code instead of RAG frameworks.
What the agent is built from
The two Claude models split the work cleanly by task type. Claude Haiku 4.5 runs the chat interface: it answers client questions quickly, clarifies requests, and keeps the conversation going. Claude Sonnet 4.6 generates the design concepts, turning a client's wishes into a structured description of the interior. Photos to illustrate the concepts come from the Pexels library, which is much cheaper and faster than generating images with DALL-E.
Key parameters of the setup:
- Claude Haiku 4.5 — client conversation: fast and cheap
- Claude Sonnet 4.6 — generating structured design concepts
- Pexels API — photo selection instead of DALL-E
- One main.py file, 712 lines of code, two system prompts
- No orchestrators, vector databases, or frameworks on top of the API
The architecture is deliberate. For a studio with a limited budget and a modest flow of clients, a full RAG stack is overengineering. Haiku is cheaper for conversation; Sonnet only comes in where structured creative generation is needed. There's no point solving a scaling problem that doesn't exist yet.
What pitfalls came up along the way?
The first non-obvious issue is Claude Haiku 4.5's prompt caching threshold. Context caching only kicks in at 4096 tokens. If the system prompt is shorter than that, every request is treated as new and caching doesn't work at all. Under heavy load, that noticeably affects both request cost and response latency.
The second quirk is how Sonnet 4.6 handles structured output. The model sometimes wraps its JSON response in an extra block of text instead of returning clean JSON. When that happens, a standard `json.loads()` call throws an error. The author tried several parsing strategies and settled on a simple wrapper with fallback logic, which proved more reliable than fishing JSON out with regular expressions.
"This isn't an expert's guide — it's more of a diary of forks in the road.
I tried to be honest about why I made each decision," the developer explains.
The logic behind splitting the models deserves a closer look. The author tried handling everything with a single model but quickly concluded that Haiku belongs where speed and cost matter, and Sonnet where structured output quality matters. Trying to save money by running concept generation through Haiku produced noticeably worse results.
Where will this approach start to break?
The developer is upfront about the limits of the solution. A single 712-line file works fine for an MVP and a small studio, but scaling will bring problems:
- As the client base grows, the agent will need to store conversation history — that can't be done without a vector database or external storage
- If the studio wants to accept and analyze client photos, it will need a multimodal pipeline
- Logging the agent to a file won't hold up with multiple concurrent users and real load
- As things grow, prompts become harder to test and version inside a single file
The author's main takeaway: for a task with narrow, well-defined boundaries, going "without RAG" isn't a lazy shortcut but a conscious architectural choice. Frameworks solve real scaling problems, but they also introduce new ones: complexity, dependencies, infrastructure overhead. If a problem hasn't shown up yet, don't create it just to use a tool.
What it means
The write-up shows that the Claude API is enough for a production agent without helper frameworks, as long as the task is specific enough. For developers starting to build agents on Claude, it's an honest account of real pitfalls: Haiku 4.5's cache threshold, JSON parsing with Sonnet 4.6, and a deliberate split of tasks between models of different tiers.
How do you use Claude for a design agent?
The article describes a two-model architecture: Claude Haiku 4.5 answers client questions and clarifies requests, while Claude Sonnet 4.6 generates design concepts.
Do you need RAG for a Claude agent?
Not necessarily. The agent described runs without RAG frameworks or vector databases — the whole system fits into 712 lines of code.
Can Claude be used for interior design?
Yes. In this case, Claude Sonnet 4.6 generates design concepts and Claude Haiku 4.5 handles client interaction.
Do you need RAG for an AI agent on Claude?
Not necessarily. The example application doesn't use RAG — the system runs on two system prompts and 712 lines of code.
- Nov 1, 2026OpenAI Rewrites GPT Behavior Rules: Five Values and a Chain of Command
- Nov 1, 2026Google admits AI Mode cuts search revenue, shares fall 15%
- Oct 31, 2026Author puts his script before an AI jury: the verdict cost 850 thousand tokens
- Oct 31, 2026Anthropic: Fold Subagents Back Into a Single Loop — One Customer's Tasks Ran Twice as Fast
Key Questions Answered
What pitfalls came up along the way?
The first non-obvious issue is Claude Haiku 4.5's prompt caching threshold. Context caching only kicks in at 4096 tokens. If the system prompt is shorter than that, every request is treated as new and caching doesn't work at all. Under heavy load, that noticeably affects both request cost and response latency. The second quirk is how Sonnet 4.6 handles structured output. The model sometimes wraps its JSON response in an extra block of text instead of returning clean JSON. When that happens, a standard `json.loads()` call throws an error. The author tried several parsing str
Where will this approach start to break?
The developer is upfront about the limits of the solution. A single 712-line file works fine for an MVP and a small studio, but scaling will bring problems: As the client base grows, the agent will need to store conversation history — that can't be done without a vector database or external storage If the studio wants to accept and analyze client photos, it will need a multimodal pipeline Logging the agent to a file won't hold up with multiple concurrent users and real load As things grow, prompts become harder to test and version inside a single file The author's main take
How do you use Claude for a design agent?
The article describes a two-model architecture: Claude Haiku 4.5 answers client questions and clarifies requests, while Claude Sonnet 4.6 generates design concepts.
Do you need RAG for a Claude agent?
Not necessarily. The agent described runs without RAG frameworks or vector databases — the whole system fits into 712 lines of code.
Test Frontier LLMs & Autonomous Agents in One Workspace
Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.
The AI world, distilled — once a week
Seven stories that actually mattered, hand-picked. No noise, no reposts, no press releases.
Done! Check your inbox for a confirmation.