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:

🛠️ 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:

  1. Update a Jira ticket to “In Progress”

  2. 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

🧪 Real-Life Examples

🧠 What I Learned

🎯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.