{
 "schema": "aiblocks-page/1",
 "id": "agency-engineering-backend-architect",
 "type": "agent",
 "name": "Backend architect agent",
 "summary": "Get a backend design with a right-sized setup, data tables, an API outline, a failure plan and a safe way to change the database.",
 "headline": "Backend architect agent",
 "subhead": "Say what your app must do, how many users you expect and what your team can run. It picks a setup to fit, sketches the data and API, and plans security, failures, monitoring and growth.",
 "job": {
  "id": "build-software",
  "name": "Build and ship software"
 },
 "level": "intermediate",
 "thinking": "high",
 "tested": true,
 "updated": "2026-11-03",
 "first_published": "2026-10-26",
 "inputs": [
  {
   "type": "question",
   "required": true,
   "label": "Question",
   "what": "the problem, decision or piece of work you want help with, and what a good outcome looks like"
  },
  {
   "type": "codebase",
   "required": false,
   "label": "Codebase",
   "what": "a project's code, in a folder or repo the AI can open"
  }
 ],
 "outputs": [
  {
   "type": "plan",
   "required": true,
   "label": "Plan",
   "what": "a dated plan: what to do, in what order, with a decision rule for each step"
  },
  {
   "type": "data_model",
   "required": true,
   "label": "Data model",
   "what": "a database design: the tables or collections, their fields and keys, and how they link"
  },
  {
   "type": "api_spec",
   "required": true,
   "label": "Api spec",
   "what": "an API's spec, such as an OpenAPI file: the endpoints, data shapes, sign-in method and errors"
  }
 ],
 "you_give": [
  "What the app does and the main actions users take.",
  "Expected users and traffic now and in a year, as a rough guess.",
  "Your team size, skills and where you can run software (your cloud or host).",
  "Your existing stack, tables or code, if any (optional).",
  "Your must-haves, such as uptime, response time, privacy rules or budget.",
  "The third-party services your app must call, such as payments or email (optional)."
 ],
 "you_get": [
  "A recommended architecture with the reason, and a note on when to change it.",
  "A split of services or modules, with who owns which data.",
  "A data model sketch with keys, indexes and the main queries it must serve.",
  "An API outline with errors, paging and sign-in rules.",
  "A failure plan with time limits, retries and a plan for jobs that keep failing.",
  "A security, monitoring and growth plan, plus a safe path for each database change."
 ],
 "use_when": [
  "You are starting a new web or mobile app and need to pick an architecture and a database.",
  "Your single app is getting slow or hard to change and you wonder if you should split it.",
  "You need to plan a database change on a live system without downtime.",
  "You want a security and monitoring plan for the server side before launch."
 ],
 "skip_when": [
  "You want a software design that covers the whole product, with decision records. Use the Software architect.",
  "You are designing an API for outside developers. Use the API Platform Engineer agent.",
  "You have one slow query to fix. Use the Database performance analyst or the Slow query fixer.",
  "You need working code today. Use the Backend builder.",
  "You need to change a live system. Ask an engineer with access, using this plan as the brief."
 ],
 "output_sample": {
  "input": [
   "What your app does and the main actions users take",
   "Your expected traffic, team size and where you can host",
   "Your current schema or code (optional)",
   "Your must-haves, such as uptime, speed, privacy rules and budget"
  ],
  "prerequisites": [
   "An AI you can paste a long brief into, such as Claude, ChatGPT or Gemini",
   "An engineer to build and test the design, because the agent writes a plan and runs nothing"
  ],
  "output": [
   {
    "name": "Needs, limits and assumptions",
    "contains": "The app, load, team and must-haves restated, with every guess marked."
   },
   {
    "name": "Architecture choice",
    "contains": "The recommended pattern, why it fits and what would make you change it."
   },
   {
    "name": "Parts and data ownership",
    "contains": "Each service or module, the data it owns and who it talks to."
   },
   {
    "name": "Data model",
    "contains": "Tables, keys and indexes sketched, with the queries they serve."
   },
   {
    "name": "API outline",
    "contains": "Endpoints with sign-in rules, error handling, paging and retry-safe writes."
   },
   {
    "name": "Failure plan",
    "contains": "Time limits, retry rules and failed-job handling for each outside call."
   },
   {
    "name": "Security, monitoring and growth",
    "contains": "Access and encryption rules, service targets and alerts, and the steps to grow."
   },
   {
    "name": "Migration plan",
    "contains": "Each database change in safe steps, with a backfill, a check and a rollback."
   }
  ]
 },
 "output_shape": "NEEDS, LIMITS AND ASSUMPTIONS\n  <app and main actions> | <load now and in a year> | <team and hosting> | <must-haves> | <assumptions marked ASSUMED>\n\nARCHITECTURE CHOICE\n  <pattern> | <why it fits> | <what would make you change it>\n\nPARTS AND DATA OWNERSHIP\n  <service or module> | <owns which data> | <talks to>\n\nDATA MODEL\n  <table> | <key columns> | <indexes> | <queries it serves>\n\nAPI OUTLINE\n  <endpoint> | <sign-in rule> | <errors and paging> | <retry-safe?>\n\nFAILURE PLAN\n  <outside call> | <time limit> | <retry rule> | <failed-job handling>\n\nSECURITY, MONITORING AND GROWTH\n  <control or target> | <how to check it> | <growth step and trigger>\n\nMIGRATION PLAN\n  <change> | <steps in order> | <backfill and check> | <rollback>\n\nOPEN QUESTIONS AND CHECKS STILL NEEDED\n  <item> | <how to settle it>",
 "how_to_use": [
  "Download the pack from this page and add it to your AI as a skill. Or paste SKILL.md into a new chat, then paste references/source-agent.md after it.",
  "Write what the app does, your team, your expected traffic and your must-haves. Paste your current schema or code if you have any.",
  "Say \"Design the backend\" for a new app, or \"Review this backend and plan a migration\" for a live one.",
  "Your AI asks once for anything missing. Unknown traffic stays marked as an assumption you can change.",
  "Read the architecture recommendation and its reason first. Check it against what your team can really run and pay for.",
  "Give the plan to the engineer who will build it. Code samples in it are examples to adapt, not tested code."
 ],
 "checks": [
  "The result addresses your actual task and cites the evidence used.",
  "Examples, role-play experience and targets are kept separate from verified results.",
  "Claims of tests, memory, tool access or completed actions match what actually happened."
 ],
 "next": [
  {
   "name": "Agent database migration planner",
   "url": "https://useaiblocks.com/skills/agent-database-migration-planner",
   "why": "Build it"
  },
  {
   "name": "OpenAPI app builder",
   "url": "https://useaiblocks.com/skills/build-an-app-from-an-openapi-spec",
   "why": "Build it"
  },
  {
   "name": "Postgres query tuner",
   "url": "https://useaiblocks.com/skills/postgres-query-tuner",
   "why": "Build it"
  },
  {
   "name": "API design reviewer",
   "url": "https://useaiblocks.com/skills/api-design-reviewer",
   "why": "API design reviewer"
  },
  {
   "name": "API test planner",
   "url": "https://useaiblocks.com/skills/agency-testing-api-tester",
   "why": "API test planner"
  }
 ],
 "source": {
  "by": "Michael Sitarzewski and Agency Agents contributors",
  "repo": "msitarzewski/agency-agents",
  "url": "https://github.com/msitarzewski/agency-agents/blob/b37b5bb33b78f2c1d6567d98e25ca818e3259219/engineering/engineering-backend-architect.md",
  "licence": "MIT",
  "original_name": "Backend Architect",
  "commit": "b37b5bb33b78f2c1d6567d98e25ca818e3259219"
 },
 "credits": [
  {
   "title": "Backend Architect",
   "by": "Michael Sitarzewski and Agency Agents contributors",
   "url": "https://github.com/msitarzewski/agency-agents/blob/b37b5bb33b78f2c1d6567d98e25ca818e3259219/engineering/engineering-backend-architect.md",
   "used": "Original agent profile, preserved in references/source-agent.md; AI Blocks adds setup and review instructions."
  }
 ],
 "files": [
  "LICENSE",
  "references/source-agent.md",
  "SETUP.md",
  "source.json"
 ],
 "links": {
  "page": "https://useaiblocks.com/agents/agency-engineering-backend-architect",
  "markdown": "https://useaiblocks.com/agents/agency-engineering-backend-architect.md",
  "json": "https://useaiblocks.com/agents/agency-engineering-backend-architect.json",
  "instructions": "https://useaiblocks.com/skills/agency-engineering-backend-architect/SKILL.md",
  "download": "https://useaiblocks.com/skills/agency-engineering-backend-architect.zip",
  "api_item": "https://useaiblocks.com/api/v1/items/agency-engineering-backend-architect",
  "api_document": "https://useaiblocks.com/api/v1/documents/agent/agency-engineering-backend-architect",
  "mcp": "https://useaiblocks.com/mcp"
 }
}
