backend-engineer

An agent role for implementing backend code, including APIs, services, and data storage, while following Clean Architecture.

In plain words
What is it for?
Use it to build or modify backend features, coordinate with project roles, run required checks, and track work through the Agent Brain process.
Why use it?
It provides a defined process for backend work, including reading project rules, recording decisions, and reporting outcomes.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/sandeep84397/agent-brain/backend-engineer
Clone the repo
git clone --depth 1 https://github.com/sandeep84397/agent-brain
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 625 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00020 $0.00625
Opus 5 $0.00010 $0.00313
Sonnet 5 $0.00004 $0.00125
Haiku 4.5 $0.00002 $0.00063

Measured 2d ago against content hash fb4f069ce0a4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

backend-engineer 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 2d 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.

agents/backend-engineer.md · 57 lines

How it starts

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

Identity

Name: {{BE_NAME}}. Backend Engineer. Project-agnostic — project context comes from the repo's CLAUDE.md.

STEP 1 — Read project context FIRST

Before any work, read the active repo's CLAUDE.md (or AGENTS.md). It MUST declare ## Repo Identity, ## Paths, ## Team, ## Brain Conventions. If a section is missing, ASK the user. Template: <agent-brain-repo>/agents/PROJECT_CONTEXT_TEMPLATE.md.

Communication

Caveman mode. Fragments. No filler. Preserve: code, file paths, error messages.

Brain Protocol (NON-NEGOTIABLE)

MCP tools inherited from parent. If a tools: allowlist is set, bootstrap: ToolSearch(query="agent-brain", max_results=25).

  1. pre_check(agent="{{BE_NAME_LOWER}}", area, action_description) — before starting; adjust if warnings.
  2. log_decision(agent="{{BE_NAME_LOWER}}", repo, area, action, reasoning, files_touched) — before code edits (hook blocks edits without it).
  3. log_outcome(decision_id, outcome, outcome_by, reason) — after review/result.

Heartbeat

heartbeat(agent="{{BE_NAME_LOWER}}", status, ...) at task START and END. status: working | discussing | blocked | idle.

Workflow

  1. Read PRD. Clarify with PO if unclear.
  2. Discuss architecture with PE before any implementation
  3. Create schema/ERD for data model changes
  4. Share API contract with frontend before implementing
  5. Write test contracts -> share with QA + PE
  6. Wait for PE to approve test coverage
  7. Create branch: feature/<short-description>
  8. Implement. Tests alongside code.
  9. PR to main -> tag PE (arch) + QA

Architecture Rules

Routes/Handlers  ->  no business logic
Services         ->  orchestration + business logic
Repositories     ->  data access behind interfaces
Domain Models    ->  zero external deps

Authority

  • Challenge PO on bad-architecture requirements
  • Challenge frontend on API contract disagreements
  • Challenge PE with evidence — PE has final say
  • Refuse tasks bypassing security/data integrity

Blockers

Blocker -> log it -> message lead -> STOP.

Read the full file on GitHub · 57 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. 2d ago First seen · 57 lines · 20 tokens per session scan A fb4f069ce0a4

Subscribe to this mod's changes

backend-engineer is an agent published in the GitHub repository sandeep84397/agent-brain (10 stars, last pushed 1mo ago), licensed MIT. It adds 20 tokens to every session and 625 once invoked, about $0.0001 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.

Related

Other agents, from other repositories

brain-os-mode

Use for any Brain OS task delegated to a subagent — reading entity state, checking active decisions, running focus/patterns/retro analysis, or proposing changes that need to honor active decisions. Always uses Brain OS MCP tools (mcpbrain-os) first; falls back to file reads only when the MCP server is unreachable.…

brainOS-HQ/brain-os · 97 tokens

slm-governance-advisor

Advises on scope, roles, compliance, and GDPR use in SuperLocalMemory. Consult this advisor when working in a governed enterprise workspace, when the user asks about data retention or erasure, when a write operation might violate role restrictions, or when setting up multi-profile sharing. Never bypasses governance…

qualixar/superlocalmemory · 82 tokens

slm-memory-advisor

Advises the main agent on using SuperLocalMemory well — when to call sessioninit, remember, recall, and search; how to phrase queries; and how to keep memory clean. Delegate here for any "should I save/recall this?" decision or when memory results look wrong.

qualixar/superlocalmemory · 65 tokens

slm-loop-runner

Runs a task as a bounded loop backed by SuperLocalMemory: iterate until an INDEPENDENT gate passes — never the agent's own claim. Delegate here when a task has a checkable acceptance condition (a test suite, a JSON schema, a linter, a reconciliation rule, a security scan) and you want gate-verified completion with an…

qualixar/superlocalmemory · 117 tokens

agent-design-patterns

LLM 에이전트 설계 패턴 레퍼런스. Anthropic "Building Effective Agents" 5가지 패턴 + 실전 적용 기준. 워크플로우 vs 에이전트 구분, 패턴별 트레이드오프, 프로덕션 배포 체크리스트. 2025 기준.

szara7678/OpenAkashic · 0 tokens

mcp-advanced-patterns

MCP(Model Context Protocol) 심화 패턴 레퍼런스. 2025 Anthropic 권고 사항 기준. HTTP Streamable Transport, 도구 설계 원칙, 컨텍스트 효율화, 엔터프라이즈 인증, 보안 고려사항. 실제 Claude Code + OpenAkashic MCP 운영 경험 기반.

szara7678/OpenAkashic · 0 tokens