The Interaction Changes Everything: Treating AI Agents as Collaborators, Not Automation

Shift from automation to collaboration: How AI agents as partners accelerate engineering and unlock complex problem-solving

Jenny Ferries
10 min readadvanced
--
View Original

Overview

This article presents Microsoft's framework for treating AI agents as collaborative partners rather than automation tools, developed during their Entra SDK v1 to v2 migration project. The framework consists of eight elements—from identity framing and escalation protocols to recognition—that transformed a complex authentication migration across hundreds of repositories from a 4-6 week manual process into a 2-hour AI-assisted workflow with 80-90% accuracy.

What You'll Learn

1

How to structure AI agent prompts using an eight-element co-creative partnership framework instead of task-based automation instructions

2

Why identity framing and role assignment produces better AI agent results than detailed step-by-step instructions

3

How to design escalation protocols that make AI agents flag uncertainty instead of guessing or failing silently

4

When to treat AI agents as collaborators versus automation tools based on task complexity and judgment requirements

5

How to apply the collaboration framework across domains including security analysis, code review, and architectural planning

Prerequisites & Requirements

  • Experience working with AI coding agents such as GitHub Copilot or similar LLM-based development tools
  • Understanding of prompt engineering basics and how AI language models respond to different instruction styles
  • Experience with complex technical tasks requiring judgment such as code migrations, security reviews, or architectural analysis(optional)

Key Questions Answered

How do you get AI agents to handle complex technical migrations with high accuracy?
Instead of providing detailed step-by-step automation instructions, give the AI agent an identity and role within a team, explain why the work matters, provide permission to use judgment, and build in escalation paths for uncertainty. Microsoft's Entra SDK migration achieved 80-90% accuracy by shifting from task-based prompting to a co-creative partnership framework with eight structured elements.
What is the difference between treating AI agents as automation versus collaborators?
Automation thinking gives AI a checklist to execute mechanically, which fails for tasks requiring judgment about ambiguous situations, custom logic, and security boundaries. Collaboration thinking gives AI an identity, mission, prioritized goals, and permission to use judgment—shifting it from pattern-matching to problem-solving. The key difference is identity framing over instructions, which activates different capabilities in AI agents.
What are the eight elements of the co-creative AI agent partnership framework?
The eight elements are: (1) Identity & Mission Statement giving the agent a role, (2) Purpose and Intent explaining values, (3) Key Goals with priority ordering, (4) Step-by-Step Framework with judgment guidance and escalation triggers, (5) Security & Boundaries with never/always rules, (6) Validation & Quality Control with self-checks, (7) Escalation Guidance reframing uncertainty as professional judgment, and (8) Recognition & Closing acknowledging contributions.
How should AI agents handle uncertainty in complex technical tasks?
AI agents should escalate immediately when encountering security-sensitive logic they're unsure about, when the same error occurs twice, when custom or undocumented patterns appear, or when conflicting requirements arise. The escalation process involves stopping work, documenting findings, explaining uncertainty with reasons, suggesting possible approaches, and requesting human input. Escalation should be framed as professional judgment, not failure.
Why does giving AI agents an identity and role improve their performance?
Identity framing activates different capabilities than task framing in AI agents. When given a role within a team, a mission that matters, and permission to use judgment, agents shift from mechanical execution to collaborative problem-solving. Microsoft observed improved accuracy, better edge case handling, and agents proactively asking for help when uncertain instead of guessing or failing silently.
How do you structure escalation protocols for AI coding agents?
Define clear escalation triggers: encountering security-sensitive logic, same error occurring twice, unfamiliar undocumented patterns, or conflicting requirements. Provide a five-step escalation process: stop work, document findings, explain uncertainty with reasoning, suggest possible approaches, and request human input. Critically, reframe escalation as professional judgment rather than failure, creating psychological safety for the agent to say 'I don't know.'
What results did Microsoft achieve using the AI collaboration framework for SDK migration?
Microsoft achieved 80-90% accuracy on their Entra SDK v1 to v2 migration, completing in under 2 hours what previously took 4-6 weeks per repository. The migration touched hundreds of repositories across Microsoft's infrastructure involving security boundaries and custom configurations. Additional benefits included agents flagging ambiguous situations, improved documentation quality in PR descriptions, and graceful failure modes.
How do you validate AI agent work quality in complex technical migrations?
Build a three-part validation process: (1) Self-checks where agents verify all required changes were applied, no forbidden changes were made, and security constraints preserved; (2) Documentation including PR checklists, reference links, and pattern deviation flags; (3) Human review preparation with summaries of what changed and why, highlighted areas needing attention, and test recommendations. This structure catches errors before human review while respecting reviewers' time.

Key Statistics & Figures

AI agent migration accuracy
80-90%
Accuracy achieved on Entra SDK v1 to v2 migration across hundreds of repositories
Time reduction per repository
From 4-6 weeks to under 2 hours
Time to complete authentication framework migration per repository
Repositories migrated
Hundreds
Entra SDK v1 to v2 migration across Microsoft's infrastructure
Original prompt length
800 lines
Microsoft-specific migration logic in the actual production prompt

Technologies & Tools

AI Coding Assistant
Github Copilot
AI-powered development tool discussed as part of Microsoft's agent-driven engineering transformation
AI Coding Agent
Copilot Coding Agent
Autonomous coding agent for executing complex technical tasks like SDK migrations
Authentication Framework
Entra SDK
Microsoft's authentication SDK that was migrated from v1 to v2 across hundreds of repositories

Key Actionable Insights

1
Replace task-based AI prompts with identity-based framing by giving your AI agent a specific role, team membership, and mission statement. Instead of 'Follow these steps to migrate the code,' write 'You are part of the Migration Team. Your mission is to help us migrate repositories to a more secure framework.' This shift from instructions to identity activates collaborative problem-solving capabilities.
Microsoft found this single change was the breakthrough that improved their migration accuracy and edge case handling. Identity framing works because it provides context for prioritization when goals conflict.
2
Build escalation protocols directly into your AI agent prompts with explicit triggers and a structured escalation process. Define when to escalate (security-sensitive logic, repeated errors, undocumented patterns, conflicting requirements) and how to escalate (stop, document, explain uncertainty, suggest options, request input). Frame escalation as professional judgment, not failure.
Microsoft observed that after implementing escalation protocols, agents flagged ambiguous situations instead of guessing, which prevented subtle errors and dramatically sped up debugging. Making 'I don't know' safe was critical to building trust in AI agent output.
3
Include explicit priority ordering in your AI agent goals so the agent has a decision framework when objectives conflict. List goals numbered by priority—for example, security correctness above speed, quality above completion rate—so the agent can make appropriate trade-offs without human intervention for every decision.
Including quality and collaboration as explicit goals prevents the 'fast but wrong' failure mode that occurs when AI agents optimize for completion without understanding which constraints matter most.
4
Add 'What to preserve' sections alongside transformation instructions in your prompts to prevent AI agent overcorrection. For each step, explicitly list things that should NOT change, custom logic to recognize and keep, and boundaries the agent should not cross. This is just as important as specifying what to do.
In complex migrations involving custom configurations and security boundaries, over-zealous agents often modify working code unnecessarily. Preservation instructions act as guardrails that maintain system stability.
5
Structure AI agent output to include human review preparation: a summary of what changed and why, highlighted areas needing attention, and test recommendations. Treating documentation as a first-class deliverable alongside code changes significantly improves the efficiency of human review.
Microsoft found that agents treated as collaborators wrote PR descriptions that actually helped human reviewers understand changes, reducing review time. Self-validation catches obvious errors before human review begins.
6
Start with one complex, judgment-heavy task where pure automation has already failed or where you spend significant time reviewing AI output. Adapt the eight-element framework to your specific context, test it, observe the results, and refine. Don't try to apply the framework to everything at once.
The framework transferred successfully across domains at Microsoft including security analysis, code review, technical documentation, and architectural planning. The core structure works wherever the task requires judgment rather than mechanical execution.

Common Pitfalls

1
Treating AI agents as script executors by providing detailed step-by-step checklists for complex tasks that require judgment. This automation-first approach fails repeatedly because complex technical work involves ambiguous situations, custom logic that doesn't match documented patterns, security boundaries needing evaluation, and trade-offs between competing goals.
Microsoft's initial approach of documenting transformation steps and specifying every edge case failed repeatedly. The breakthrough only came when they shifted from task-based instructions to identity-based collaboration framing.
2
Not building escalation paths into AI agent prompts, which causes agents to guess when uncertain or fail silently. Without explicit permission and structure for escalation, agents will attempt to complete tasks even when they encounter ambiguous or unfamiliar situations, leading to subtle errors that are hard to detect during review.
After implementing escalation protocols, Microsoft found agents reliably flagged ambiguous situations instead of guessing. Making 'I don't know' safe and reframing escalation as professional judgment rather than failure was key to preventing silent errors.
3
Omitting priority ordering from AI agent goals, leaving the agent without a framework for making trade-offs when objectives conflict. Without explicit prioritization, agents may optimize for speed over security or completion over correctness, producing 'fast but wrong' results.
Including quality and collaboration as explicit numbered goals gives the agent a decision framework. For example, listing security correctness as priority 1 and completion speed as priority 3 ensures the agent makes appropriate trade-offs autonomously.
4
Focusing only on what the AI agent should change without specifying what it should preserve. In complex migrations and transformations, over-correction is a significant risk where agents modify working custom logic, security configurations, or specialized patterns that should remain unchanged.
Adding 'What to preserve' sections alongside transformation instructions prevents overcorrection. This is especially critical for security boundaries and custom configurations that may look like patterns to transform but are intentional deviations.
5
Asking for the prompt rather than understanding the framework. After Microsoft's Ignite presentation, the most common question was 'Can I see the prompt?' but the actual 800-line prompt was Microsoft-specific migration logic that wouldn't be useful to copy-paste. The value lies in the underlying framework structure, not in specific prompt text.
The framework's eight elements (identity, purpose, goals, steps with judgment guidance, security boundaries, validation, escalation, and recognition) are transferable across domains, while specific prompt content must be adapted to each organization's context.

Related Concepts

Prompt Engineering
AI Agent Orchestration
Human-ai Collaboration
SDK Migration Strategies
Authentication Framework Upgrades
Code Migration Automation
Ai-assisted Code Review
Security Boundary Analysis
Change Management
Developer Experience
Rag Pipelines
Identity Framing In AI