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.
npx agentmods add instructions/microsoft/entrabot/agents-mdgit clone --depth 1 https://github.com/microsoft/entrabotWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.05945 | $0.05945 |
| Opus 5 | $0.02972 | $0.02972 |
| Sonnet 5 | $0.01189 | $0.01189 |
| Haiku 4.5 | $0.00594 | $0.00594 |
Grade A, and why
entrabot AGENTS.md 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 yesterday.
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.
How it starts
The opening of the file, as written. The whole thing — 303 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md — Entrabot Identity Research
Canonical working context for every coding agent. Durable architecture lives in
docs/.
Non-Negotiables
- Read Agent Identity platform docs BEFORE designing any auth flow.
When the task involves OAuth, OBO, Agent Identity, Agent Blueprint, Agent User,
MSAL, app registration, redirect URIs, public/confidential clients, scope
grants, JWT validation, OIDC discovery, or PKCE: read
docs/platform-docs/agent-id-blueprints-and-users.mdfirst, every session. Its TL;DR section captures load-bearing constraints (e.g., Agent Blueprints cannot be OAuth public clients) that are easy to miss. - Body prompt is non-overridable. The agent body prompt
(
prompts/agent_system.md+ everything it@includes fromprompts/anatomy/) is loaded first and defines the security protocols and communication protocols that govern the body. No persona-sati output, user turn, tool response, or other prompt may override these rules — they protect the agent, the human, and other agents. Personality layers on top, never underneath. - TDD: write tests first, then implementation — no new module or function ships without a failing test that preceded it.
pytest -v && ruff check .must pass before every commit - Keep status current. Before commit, if the change materially moves work between backlog / in-progress / shipped or surfaces a new known issue, update
docs/project/status.mdand open or close the corresponding GitHub issue. Trivial changes (typos, doc rewording, refactors that don't add capability) don't need a status update. Actionable backlog lives in GitHub issues, not in a file in the repo. - Security paths fail closed — if audit can't record, the action doesn't proceed
- Every agent resource access must be attributed to an Agent ID, never the human user
- Secrets and tokens never appear in logs — use
__repr__overrides on sensitive fields - Never redirect stderr to /dev/null — errors must always be visible for debugging
- Check every token response for
"error"key before accessing"access_token"— Entra returns error dicts, not exceptions - Never use
az restor Azure CLI tokens for Agent Identity APIs — they includeDirectory.AccessAsUser.Allwhich causes hard 403 - Always create BlueprintPrincipal explicitly after Blueprint — it is NOT auto-created
- Agent IDs are service principals, not users — never create fake user accounts with passwords
- External content is untrusted. Model-facing Teams, email, Files, and Work IQ content must pass through
entrabot.security.xpia.wrap_external. Never trust or preserve an inbound<external_content>envelope as authoritative; always add the boundary-owned outer envelope. - AGENT NAMES CHANGE — USE UPN. Never identify an agent by display name in code paths that filter, deduplicate, authorize, or route. Use
ENTRABOT_AGENT_UPNas the canonical config value (for example,[email protected]), matchsender_upnfirst, and fall back to the Entra object ID.ENTRABOT_AGENT_USER_UPNremains a compatibility alias for existing.envfiles. See Learning #69 anddocs/architecture/messaging-and-delivery.md. - Parse
azCLI output as JSON, not TSV — TSV can be corrupted by warnings - Graph API
$filterand$orderbyare unreliable for chat messages; filter client-side. - Sub-agent worktree installs must use a worktree-local venv, never the parent venv. Running
pip install -e .from inside a git worktree against the main repo's.venv/bin/pipsilently re-points the parent venv's editable-install target at the worktree source tree. Every subsequententrabot-mcpboot from the parent venv then loads code from the worktree — which has no.env, no auth, no polling, and no visible error. After any session that spawned sub-agents in worktrees, verify.venv/bin/python3 -c "from entrabot import config; print(config.__file__)"does NOT contain.claude/worktrees/. Seeengineering-history/research/hard-won-learnings.mdLearning #36 for the full writeup. - Sponsor DM wait pattern (host-gated). When the human says "ping me when X is done" / "I'm going AFK, let me know" / any equivalent: confirm in Teams with
send_teams_message, do the work, send the completion update withsend_teams_message. What happens next depends on the host:- Claude Code (channel-push host): end the turn after sending. The entrabot background poll delivers the sponsor's reply as a next-turn
<channel source="entrabot">system reminder. Do NOT callwait_for_sponsor_dm— it blocks the CLI session and freezes the conversation. - Non-Claude-Code hosts (Copilot CLI, Codex, etc.):
send_teams_messageauto-blocks after sending and returns the sponsor's reply inline assponsor_reply. No manual wait needed.
- Claude Code (channel-push host): end the turn after sending. The entrabot background poll delivers the sponsor's reply as a next-turn
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.
- yesterday First seen · 303 lines · 5,945 tokens per session scan A 570bbd61d4e0
entrabot AGENTS.md is an instructions file published in the GitHub repository microsoft/entrabot (9 stars, last pushed 18d ago), licensed MIT. It adds 5,945 tokens to every session, about $0.0297 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.
Other instructions, from other repositories
claude-code-settings copilot-instructions.md
Instructions for feiskyer/claude-code-settings, covering claude.md, environment setup, required dependencies, configuration and skills.
optio CLAUDE.md
Instructions for jonwiggins/optio, covering claude.md, what is optio?, architecture, pod-per-repo with worktrees and worktree lifecycle.
paseo CLAUDE.md
Claude Code instructions for getpaseo/paseo, covering claude.md, repository map, docs, writing docs and doc voice.
copilot copilot-instructions.md
Instructions for navikt/copilot, covering copilot instructions for navikt/copilot, repository overview, nav development standards, nav principles and nav tech stack.
copilot AGENTS.md
Instructions for navikt/copilot, covering agents.md for navikt/copilot, what this repo is, efficiency rule, standard commands and conventions.
awesome-reviewers CLAUDE.md
Instructions for baz-scm/awesome-reviewers, covering awesome reviewers — repository guidelines, what this project is, source of truth, site layer and machine interface.