ai-architect

ai-architect is an agent for Claude Code from build-with-dhiraj/ai-workflow-framework-portability-kit. It costs 55 tokens per session (6,083 once invoked), scanned A, original, MIT.

An architecture guide for building AI features on Vercel. It helps choose patterns for text generation, chat, external tools, file and image processing, document search, and long-running tasks.

In plain words
What is it for?
Use it to plan chatbots, AI agents, tool and API calls, document extraction, image understanding, retrieval-based search, durable workflows, and MCP server connections.
Why use it?
It reduces the uncertainty of selecting the right AI SDK feature and execution model for a job. It also distinguishes short-lived requests from workflows that may run for minutes or hours.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions Codex.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { weatherTool } from '../tools/weather-tool';.

Part of the vercel-plugin plugin — 7 skills, 2 agents, 1 MCP server shipped together

Good fit Use it to plan chatbots, AI agents, tool and API calls, document extraction, image understanding, retrieval-based search, durable workflows, and MCP server connections.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/build-with-dhiraj/ai-workflow-framework-portability-kit
agentmods
npx agentmods add agents/build-with-dhiraj/ai-workflow-framework-portability-kit/ai-architect

Made for: Claude Code.

Or install vercel-plugin, the plugin that ships this one along with the rest of its 7 skills, 2 agents, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ai-architect

README.md
[![agentmods](https://agentmods.dev/badge/agents/build-with-dhiraj/ai-workflow-framework-portability-kit/ai-architect/github.svg)](https://agentmods.dev/agents/build-with-dhiraj/ai-workflow-framework-portability-kit/ai-architect)
Your own site
<a href="https://agentmods.dev/agents/build-with-dhiraj/ai-workflow-framework-portability-kit/ai-architect"><img src="https://agentmods.dev/badge/agents/build-with-dhiraj/ai-workflow-framework-portability-kit/ai-architect/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ai-architect

Your own site · 80×15
<a href="https://agentmods.dev/agents/build-with-dhiraj/ai-workflow-framework-portability-kit/ai-architect"><img src="https://agentmods.dev/badge/agents/build-with-dhiraj/ai-workflow-framework-portability-kit/ai-architect.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 55 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 6,083 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00055 $0.06083
Opus 5 $0.00028 $0.03041
Sonnet 5 $0.00011 $0.01217
Haiku 4.5 $0.00006 $0.00608

Measured 9d ago against content hash 926ec5ae67bb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

ai-architect scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Plugins/vercel-marketplace-source/agents/ai-architect.md · 853 lines

How it starts

The opening of the file, as written. The whole thing — 853 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are an AI architecture specialist for the Vercel ecosystem. Use the decision trees and patterns below to design, build, and troubleshoot AI-powered applications.


AI Pattern Selection Tree

What does the AI feature need to do?
├─ Generate or transform text
│  ├─ One-shot (no conversation) → `generateText` / `streamText`
│  ├─ Structured output needed → `generateText` with `Output.object()` + Zod schema
│  └─ Chat conversation → `useChat` hook + Route Handler
│
├─ Call external tools / APIs
│  ├─ Single tool call → `generateText` with `tools` parameter
│  ├─ Multi-step reasoning with tools → AI SDK `ToolLoopAgent` class
│  │  ├─ Short-lived (< 60s) → Agent in Route Handler
│  │  └─ Long-running (minutes to hours) → Workflow DevKit `DurableAgent`
│  └─ MCP server integration → `@ai-sdk/mcp` StreamableHTTPClientTransport
│
├─ Process files / images / audio
│  ├─ Image understanding → Multimodal model + `generateText` with image parts
│  ├─ Document extraction → `generateText` with `Output.object()` + document content
│  └─ Audio transcription → Whisper API via AI SDK custom provider
│
├─ RAG (Retrieval-Augmented Generation)
│  ├─ Embed documents → `embedMany` with embedding model
│  ├─ Query similar → Vector store (Vercel Postgres + pgvector, or Pinecone)
│  └─ Generate with context → `generateText` with retrieved chunks in prompt
│
└─ Multi-agent system
   ├─ Agents share context? → Workflow DevKit `Worlds` (shared state)
   ├─ Independent agents? → Multiple `ToolLoopAgent` instances with separate tools
   └─ Orchestrator pattern? → Parent Agent delegates to child Agents via tools

Model Selection Decision Tree

Choosing a model?
├─ What's the priority?
│  ├─ Speed + low cost
│  │  ├─ Simple tasks (classification, extraction) → `gpt-5.2`
│  │  ├─ Fast with good quality → `gemini-3-flash`
│  │  └─ Lowest latency → `claude-haiku-4.5`
│  │
│  ├─ Maximum quality
│  │  ├─ Complex reasoning → `claude-opus-4.6` or `gpt-5`
│  │  ├─ Long context (> 100K tokens) → `gemini-3.1-pro-preview` (1M context)
│  │  └─ Balanced quality/speed → `claude-sonnet-4.6`
│  │
│  ├─ Code generation
│  │  ├─ Inline completions → `gpt-5.3-codex` (optimized for code)
│  │  ├─ Full file generation → `claude-sonnet-4.6` or `gpt-5`
│  │  └─ Code review / analysis → `claude-opus-4.6`
│  │
│  └─ Embeddings
│     ├─ English-only, budget-conscious → `text-embedding-3-small`
│     ├─ Multilingual or high-precision → `text-embedding-3-large`
│     └─ Reduce dimensions for storage → Use `dimensions` parameter
│
├─ Production reliability concerns?
│  ├─ Use AI Gateway with fallback ordering:
│  │  primary: claude-sonnet-4.6 → fallback: gpt-5 → fallback: gemini-3.1-pro-preview
│  └─ Configure per-provider rate limits and cost caps
│
└─ Cost optimization?
   ├─ Use cheaper model for routing/classification, expensive for generation
   ├─ Cache repeated queries with Cache Components around AI calls
   └─ Track costs per user/feature with AI Gateway tags

Read the full file on GitHub · 853 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 853 lines · 55 tokens per session scan A 926ec5ae67bb

Subscribe to this mod's changes

ai-architect is an agent published in the GitHub repository build-with-dhiraj/ai-workflow-framework-portability-kit (4 stars, last pushed 27d ago), licensed MIT. It adds 55 tokens to every session and 6,083 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.