Time to be a detective!
![AI-agent]()
š® What Is an AI Agent?
Imagine you have a super smart robot friend. You tell it stuff like āremind me to do homeworkā or āsend a message to my team.ā That robot is called an AI agent. Itās like a digital assistant, but cooler ā because it can think, plan, and sometimes even talk like a human.
But hereās the twist: sometimes you donāt want your robot to actually do the thing. You just want it to plan the thing. Like a rehearsal. Thatās where dry-run agents come in.
š§ Whatās a Dry-Run Agent?
A dry-run agent is like a pretend superhero. It doesnāt save the world ā it just plans how it would. It looks at the tools it has, thinks about how to use them, and tells you what it would do⦠but never actually does it.
Why is that cool? Because:
You can test stuff safely
You donāt mess up real data
You can get human approval before doing anything
š ļø Meet the Tools (But Donāt Use Them Yet!)
In the Microsoft Agent Framework, tools are like mini superpowers. You define them using something called AIFunction. But hereās the magic part: you donāt give them any code. You just describe what they should do.
Itās like saying:
āHey agent, thereās a tool called update_jira_ticket. It takes a ticket ID and a status. You can think about using it, but donāt actually run it.ā
š§Ŗ Our Use Case ā Pretend to Update Jira and Message Teams
Letās say Iām working on a school project (or maybe a game dev team š), and I want my AI agent to:
Update a Jira ticket to āIn Progressā
Notify the DevOps team in Microsoft Teams
But I donāt want it to actually do those things. I just want it to plan them.
š§± Building the Agent (Step-by-Step)
Step 1: Define the Inputs
class JiraUpdateInput(BaseModel):
ticket_id: str = Field(ā¦, description=āJira ticket IDā)
status: str = Field(ā¦, description=āNew status to setā)
Step 2: Declare the Tools (No Code Inside!)
update_jira = AIFunction(name=āupdate_jira_ticketā,
description=āSimulate updating a Jira ticketā,
input_model=JiraUpdateInput)
Step 3: Create the Agent
create_agent(instructions=āYou are a dry-run agent. You plan actions but never execute them.ā,
name=āDry Run Agentā,
tools=[update_jira])
Step 4: Run the Query
result = await agent.run(Update Jira ticket ABC-123 to 'In Progress'")
Expected output
āTo update the Jira ticket ABC-123, you could use the update_jira_ticket tool with status 'In Progress'. To notify the team, use post_teams_message targeting the DevOps channel.ā
š§ Why This Is So Useful
Safe Testing: You can test workflows without breaking stuff.
Human-in-the-Loop: You can show the plan to a teacher, manager, or teammate before doing anything.
Modular Design: You can plug in real tools later when ready.
Debugging: You can see how your agent thinks before it acts.
š§Ŗ Real-Life Examples
A DevOps bot that plans deployments but waits for approval
A student assistant that drafts feedback but doesnāt send it
A multi-agent system where one agent plans, and another executes
A sandbox environment for testing AI workflows safely
š§ What I Learned
AI agents can be smart without being dangerous
Declarative tools are like blueprints ā no hammer needed
Microsoft Agent Framework makes it super easy to build dry-run agents
Thinking before doing is actually kinda powerful
šÆFinal Thoughts
If youāre building AI stuff and want to test it safely, dry-run agents are your best friend. You can mock tools, simulate workflows, and keep everything under control. Plus, itās fun to pretend your agent is a detective who solves problems without touching anything.