AgentEval samples.instructions.md

A set of guidelines for creating AgentEval sample programs. Each sample demonstrates one topic and includes readable output, setup guidance, and a way to work without Azure credentials when possible.

In plain words
What is it for?
It helps name samples, structure their C# code, explain what they demonstrate, show progress and results, and handle missing credentials.
Why use it?
It keeps examples consistent and easier for developers to understand, run, and compare.

Instructions file for GitHub Copilot

Install

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.

agentmods
npx agentmods add instructions/agentevalhq/agenteval/samples
Clone the repo
git clone --depth 1 https://github.com/AgentEvalHQ/AgentEval

Made for: GitHub Copilot.

Per session 575 This file is loaded in full into every session.
When invoked 575 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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

ModelPer sessionOnce invoked
Fable 5 $0.00575 $0.00575
Opus 5 $0.00287 $0.00287
Sonnet 5 $0.00115 $0.00115
Haiku 4.5 $0.00057 $0.00057

Measured 2d ago against content hash ecc07113766d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

AgentEval samples.instructions.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 2d ago.

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.

.github/instructions/samples.instructions.md · 93 lines

How it starts

The opening of the file, as written. The whole thing — 93 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Sample Implementation Guidelines

Sample Naming Convention

Samples are numbered: Sample01_HelloWorld, Sample02_AgentWithOneTool, etc.

Sample Structure

Each sample should:

  1. Have a clear single focus
  2. Include time-to-understand estimate
  3. Work with or without Azure credentials (use mocks when possible)
  4. Print clear step-by-step output

Sample Header Template

/// <summary>
/// Sample XX: Title - Short description
/// 
/// This demonstrates:
/// - Feature 1
/// - Feature 2
/// - Feature 3
/// 
/// ⏱️ Time to understand: X minutes
/// </summary>
public static class Sample_XX_Title
{
    public static async Task RunAsync()
    {
        PrintHeader();
        
        if (!AIConfig.IsConfigured)
        {
            AIConfig.PrintMissingCredentialsWarning();
            Console.WriteLine("   ⚠️  This sample requires Azure OpenAI credentials.\n");
            return;
        }
        
        // Step 1, 2, 3...
    }
}

Console Output Pattern

Use consistent formatting:

Console.WriteLine("📝 Step 1: Creating agent...\n");
Console.WriteLine($"   ✓ Agent '{agent.Name}' created\n");

Console.WriteLine("📊 RESULTS:");
Console.WriteLine(new string('─', 60));

Using AIConfig

All samples should use AIConfig class for configuration:

var azureClient = new AzureOpenAIClient(AIConfig.Endpoint, AIConfig.KeyCredential);
var chatClient = azureClient.GetChatClient(AIConfig.ModelDeployment).AsIChatClient();

Creating Mock Agents

When credentials unavailable, provide mock fallback:

private static AIAgent CreateMockAgent()
{
    var mockClient = new MockChatClient("Expected response text");
    return new ChatClientAgent(mockClient, new ChatClientAgentOptions
    {
        Name = "MockAgent",
        ChatOptions = new() { Instructions = "You are a helpful assistant." }
    });
}

Registering in Program.cs

Add sample to the menu in samples/AgentEval.Samples/Program.cs:

("XX. Sample Title", Sample_XX_Title.RunAsync),

Read the full file on GitHub · 93 lines

Changes

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.

  1. 2d ago First seen · 93 lines · 575 tokens per session scan A ecc07113766d

Subscribe to this mod's changes

AgentEval samples.instructions.md is an instructions file published in the GitHub repository AgentEvalHQ/AgentEval (138 stars, last pushed 2d ago), licensed MIT. It adds 575 tokens to every session, about $0.0029 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-30.