cd /news/ai-agents/agent-shells-how-do-you-feature-togg… · home › topics › ai-agents › article
[ARTICLE · art-175640] src=dev.to ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

Agent Shells: How Do You Feature-Toggle Agent Capabilities Across Environments?

A developer described a "default-open with overlays" architecture for feature-toggling agent capabilities across environments, in which product feature flags gate shared shell UX while per-agent overlay rows carry scope labels, starter prompts, export prefixes and access arrays as data rather than code forks. The catalog API owns visibility and authorization, and the SPA renders only what the API returns instead of decoding JWTs to filter hard-coded agent ids. The approach is meant to keep specialist agents as data and config so the core repo avoids a pull request for every new assistant.

recommendation

Keep starter prompts, export prefixes and access arrays in flag-gated overlay rows returned by the catalog API, and test general-only, specialized-only, flag-off and flag-on configurations in CI.

more in playbook: Designing agent systems
by read5 min views4 publishedNov 24, 2026

I used AI tools to help draft and edit this post. I checked the facts and the wording, and the original lives at geekindata.com. The diagrams are on that page.

Key takeaways

Multi-agent shells rot when every new assistant becomes an if-else on agent ids. Microcopy forks. Export prefixes fork. Access checks fork. Soon the SPA is a one-off catalog pretending to be a product.

Default-open with overlays. Product feature flags gate shared UX. Per-agent overlay rows carry the differences. The SPA never invents policy from a JWT. The core stays clean because specialist agents are data, not code forks.

Named model: default-open with overlays

Figure 1. Default-open with overlays. Flags gate shared UX. Overlay rows carry agent differences. The catalog API owns what the SPA may show.

Agent catalogs tend to grow faster than the shared UX can absorb. Each "quick" special case for one assistant taught the next engineer that hard-coding was normal. Feature flags plus overlay rows restored a single shell with many agents.

If starters, export names, and access arrays live in code beside agent ids, every team wants a fork. If they live in overlay rows gated by flags, the core stays boring and the catalog stays honest. Authorization still belongs on the API; overlays describe what the API already allows the shell to show. Figure 2 is the Learn surface for managing feature flags. Treat it as product posture for shared surfaces, not as a place to encode team preferences in React.

Figure 2. Shared shell UX is a product feature. Agent differences belong in overlay rows the API already authorizes. Source: Microsoft Learn: manage feature flags.

Figure 3 is the create-flag switch. Flags gate surfaces. App roles still decide what the catalog may show.

Figure 3. Feature flags gate surfaces. App roles still decide what the catalog may show. The SPA should not invent policy from JWTs. Source: Microsoft Learn: manage feature flags.

Chat layout, citation drawers, export affordances, and follow-up chips are product features. Gate them with flags so you can disable a surface without deleting an agent. Flags are for product posture, not for encoding team preferences in React.

Each agent row can carry scope labels, starter prompts, export prefixes, and access arrays. Variation between deployments should select which rows are loaded, not rewrite the shell. Overlays scale; forks multiply support. Figure 4 is the row shape.

Figure 4. Overlay row as data. Scope, starters, export prefixes, and access arrays ride with the agent. Selecting rows is not rewriting the shell.

The catalog API returns what this caller may see. The SPA renders that list. Decoding roles in the browser to filter hard-coded ids duplicates policy and drifts. One access payload beats three copies of role strings. Figure 5 is the ownership split.

Figure 5. Catalog API owns visibility. React that decodes JWTs and filters hard-coded agent ids is how policy drifts from the API.

Tone and helper text for a feature belong with the feature flag, not scattered beside agent ids. Otherwise you fix a typo in four branches and miss the fifth. Parent toggles keep copy reviewable.

Specialist packs arrive as data and config. The core repo should not need a pull request every time a specialist agent is added for one team. If the core PR list is mostly agent ids, you inverted the architecture.

Test general-only, specialized-only, flag-off, and flag-on. Do not maintain a separate test suite per forked shell. When a flag changes default, CI should tell you before a release does.

Overlays are not a second authorization system. They decorate an already authorized catalog. If an access array on a row disagrees with the API role check, the API wins and the row is wrong. Build a validator that fails CI when overlay access claims exceed what roles can grant. Configuration that over-promises is a security bug with a friendly JSON face.

Inventory every branch on agent id. Classify each as product feature, overlay field, or true one-off that should be a flag. Move fields into rows. Replace branches with flag checks. Delete dead id lists. Keep a short ADR so the next engineer does not reintroduce "just one if" for a favored agent. Favored agents are still rows.

When a starter prompt is wrong, on-call should edit overlay data or a flagged config, not ship a shell hotfix. When a feature misbehaves for everyone, flip the parent flag. Separate those runbooks. Mixing "fix one agent" with "disable citations globally" in the same panic path is how you take down the wrong surface.

If-else catalogs. Every agent id teaches a new special case.

JWT parsing in React. Policy drifts from the API. Figure 5 is that failure made visible.

Copy forks. Same feature, five wordings, no owner.

Per-team branches. One shell becomes many apps.

Flag soup without owners. Nobody knows what "true" means in production.

Tests per fork. Velocity dies; fear of merge rises.

Use as-is

Adapt before you use

Flags and overlays add configuration surface. Hard-coded ids feel faster for the first few agents and collapse as the catalog grows. API-driven catalogs need API-level tests; browser-side role parsing needs tribal knowledge. Flag ownership and naming discipline are mandatory; unnamed flags become landmines. A clean core with overlays takes packaging work up front and removes fork tax forever after.

Primary references: Azure App Configuration feature flag guidance and your Microsoft Foundry / agent catalog API docs on Microsoft Learn where applicable. Pair product flag docs with the authorization ADR so toggles never become a backdoor.

Gate shared UX with flags. Describe agents as overlays. Keep policy on the API. Test the matrix. The shell should feel like one product even when the catalog is many specialists.

── more in #ai-agents 4 stories · sorted by recency
── more on @microsoft 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/agent-shells-how-do-…] indexed:0 read:5min 2026-11-24 · —