Agent skill

Agent Framework

by jihadkhawaja in jihadkhawaja/Egroo

Build, extend, and debug AI agents in Egroo using the Microsoft Agent Framework (C .NET).

Apache-2.0Auto-check passedAI & LLM Engineering

Install Agent Framework

skills CLI
$ npx skills add jihadkhawaja/Egroo --skill agent-framework -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jihadkhawaja/Egroo agent-framework --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jihadkhawaja/Egroo.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/agent-framework .claude/skills/agent-framework && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
agent-framework
GitHub stars
178
Token cost
~1.9k tokens
SKILL.md length
503 words
Files
2 (incl. references)
Skills in repo
3
Repo updated
First seen
Licence
Apache-2.0

At a glance

Build, extend, and debug AI agents in Egroo using the Microsoft Agent Framework (C .NET).

  • Works in 7 steps: Creating a New Agent (Backend) → Adding a Builtin Function Tool → Wiring a New LLM Provider → …
  • : creating AgentDefinition
  • SKILL.md covers When to Use, Key Files, Architecture and Procedure, plus 2 more sections
  • Calls ollama

What it does

Agent Framework is an agent skill from jihadkhawaja/Egroo. Build, extend, and debug AI agents in Egroo using the Microsoft Agent Framework (C .NET). Use for: creating AgentDefinition, adding function tools with AIFunctionFactory, connecting MCP servers, managing agent conversations and session state, wiring new LLM providers (OpenAI, AzureOpenAI, Anthropic, Ollama), adding knowledge items, implementing streaming chat. Also covers AgentRuntimeService internals, BuiltinTools, and McpClientService patterns already in the codebase.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/ms-agent-framework.md`).

It sits in AI & LLM Engineering, covering Building AI agents, MCP servers and LLM inference and serving. It works with Model Context Protocol, Ollama, OpenAI and C#. The repository describes itself as: A refined social platform for humans and AI agents. Private by default. Yours by design. The licence is Apache-2.0.

When your agent uses it

  • : creating AgentDefinition
  • Adding function tools with AIFunctionFactory
  • Connecting MCP servers
  • Managing agent conversations and session state

Example prompts

  • “/agent-framework”

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Creating a New Agent (Backend)
  2. Adding a Builtin Function Tool
  3. Wiring a New LLM Provider
  4. Adding Knowledge Items
  5. Connecting an MCP Server
  6. Running a Conversation Turn
  7. Adding a New API Endpoint

What it can do on your machine

Read from SKILL.md and the folder at commit a69d04b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • ollama

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Agent Framework loads about 1.9k tokens when it runs, and up to ~2.8k if it reads all its reference files. Until then it costs about 123 tokens; SKILL.md has 503 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~123
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jihadkhawaja/Egroo at commit a69d04b, republished under its Apache-2.0 licence (© jihadkhawaja). 503 words, ~1,915 tokens.

Download SKILL.mdSave it as .claude/skills/agent-framework/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
agent-framework
description
Build, extend, and debug AI agents in Egroo using the Microsoft Agent Framework (C# .NET). Use for: creating AgentDefinition, adding function tools with AIFunctionFactory, connecting MCP servers, managing agent conversations and session state, wiring new LLM providers (OpenAI, AzureOpenAI, Anthropic, Ollama), adding knowledge items, implementing streaming chat. Also covers AgentRuntimeService internals, BuiltinTools, and McpClientService patterns already in the codebase.
argument-hint
Describe what you want to build or fix (e.g. "add a weather tool", "new Ollama agent", "debug streaming")

Microsoft Agent Framework — Egroo Integration

When to Use

  • Creating or modifying an AgentDefinition and its associated CRUD endpoints
  • Adding a new function tool (builtin or MCP-backed)
  • Wiring a new LLM provider (OpenAI, Azure OpenAI, Anthropic, Ollama)
  • Working with agent conversations, session state, or message history
  • Implementing or debugging streaming chat (ChatStreamAsync)
  • Adding knowledge items injected into the system prompt
  • Integrating a new MCP server for tool discovery/invocation

Key Files

FilePurpose
src/Egroo.Server/Services/AgentRuntimeService.csCore: builds AIAgent from AgentDefinition, runs chat turns, manages history
src/Egroo.Server/Services/BuiltinTools.csPredefined AIFunction tools (datetime, timezone) — add new builtins here
src/Egroo.Server/Services/McpClientService.csJSON-RPC HTTP client for MCP tool discovery and invocation
src/Egroo.Server/API/AgentEndpoint.csAll /api/v1/Agent Minimal API routes
src/jihadkhawaja.chat.shared/Models/Agent.csAgentDefinition, AgentTool, AgentKnowledge, AgentConversation, AgentConversationMessage, LlmProvider enum
src/jihadkhawaja.chat.shared/Interfaces/IAgentRepository.csRepository interface for all agent CRUD operations
src/Egroo.Server/Repository/AgentRepository.csEF Core implementation of IAgentRepository
src/jihadkhawaja.chat.client/Services/AgentService.csClient-side HTTP service (mirrors server endpoints)

For framework details, see ./references/ms-agent-framework.md.


Architecture

Client (Blazor)
  └─ AgentService (HTTP)
       └─ POST /api/v1/Agent/conversations/{id}/send-message
            └─ AgentRuntimeService.ChatAsync / ChatStreamAsync
                 ├─ IAgentRepository  → loads AgentDefinition, knowledge, tools, history
                 ├─ EncryptionService → decrypts agent API key
                 ├─ AIAgent (Microsoft.Agents.AI)
                 │    └─ provider: OpenAI | AzureOpenAI | Anthropic | Ollama
                 ├─ BuiltinTools     → pre-built AIFunctions
                 └─ McpClientService → dynamic MCP tool proxies

Procedure

1. Creating a New Agent (Backend)
  1. Model: AgentDefinition (in jihadkhawaja.chat.shared/Models/Agent.cs) holds all config. Required fields: UserId, Name, Provider (LlmProvider enum), Model, ApiKey (stored AES-encrypted), Instructions.

  2. Encrypt the API key before saving — EncryptionService.Encrypt(apiKey). Keys are stripped from all API responses.

  3. Register via POST /api/v1/Agent — already wired in AgentEndpoint.cs.

  4. Repository: All CRUD goes through IAgentRepository → AgentRepository. Register as scoped.

2. Adding a Builtin Function Tool

Add to src/Egroo.Server/Services/BuiltinTools.cs:

csharp
public static AIFunction MyNewTool { get; } = AIFunctionFactory.Create(
    ([Description("The input")] string input) =>
    {
        // ... logic ...
        return Task.FromResult("result");
    },
    name: "my_new_tool",
    description: "What this tool does.");

Then include it in AgentRuntimeService alongside existing builtins:

csharp
var tools = new List<AIFunction> { BuiltinTools.GetCurrentDatetime, BuiltinTools.MyNewTool };

Seed it for an agent via POST /api/v1/Agent/{agentId}/seed-builtin-tools.

3. Wiring a New LLM Provider

AgentRuntimeService switches on AgentDefinition.Provider. Add a new case:

csharp
LlmProvider.Ollama => new OllamaApiClient(new Uri(definition.Endpoint!))
    .AsChatClient(definition.Model)
    .AsAIAgent(instructions: systemPrompt, tools: tools),

Available NuGet packages already in Egroo.Server.csproj:

  • Microsoft.Agents.AI.OpenAI — .GetChatClient(model).AsAIAgent(...)
  • Microsoft.Agents.AI.Anthropic — AnthropicClient.AsAIAgent(...)
  • Microsoft.Extensions.AI.Ollama — OllamaApiClient.AsChatClient(model).AsAIAgent(...)
  • Azure.AI.OpenAI — AzureOpenAIClient.GetChatClient(model).AsAIAgent(...)
4. Adding Knowledge Items

Knowledge is injected into the system prompt by AgentRuntimeService:

csharp
var knowledgeItems = await _agentRepo.GetAgentKnowledgeAsync(agentId);
var systemPrompt = definition.Instructions + "\n\n" +
    string.Join("\n", knowledgeItems.Where(k => k.IsEnabled).Select(k => k.Content));

Add via POST /api/v1/Agent/{agentId}/knowledge.

Show full SKILL.md (228 more words)Show less
5. Connecting an MCP Server
  1. Register: POST /api/v1/Agent/{agentId}/mcp-servers with endpoint + optional API key.
  2. Discover tools: POST /api/v1/Agent/{agentId}/mcp-servers/discover-tools — calls McpClientService.DiscoverToolsAsync and persists to AgentTool table with Source = Mcp.
  3. At runtime, AgentRuntimeService wraps each MCP tool as an AIFunction that proxies through McpClientService.CallToolAsync.

McpClientService uses standard JSON-RPC 2.0 (tools/list, tools/call). API keys are sent as Authorization: Bearer headers.

6. Running a Conversation Turn
csharp
// Non-streaming
var response = await _agentRuntimeService.ChatAsync(userId, conversationId, "Hello");

// Streaming (IAsyncEnumerable<string>)
await foreach (var token in _agentRuntimeService.ChatStreamAsync(userId, conversationId, "Hello"))
{
    // push token to client via SignalR or SSE
}

Session state and message history are persisted per AgentConversation.Id via IAgentRepository.

7. Adding a New API Endpoint

Follow the Minimal API group pattern in AgentEndpoint.cs:

csharp
group.MapPost("/{agentId}/my-feature", async (IAgentRepository repo, Guid agentId, MyRequest req, HttpContext ctx) =>
{
    // use repo, return Results.Ok/NotFound
})
.RequireAuthorization();

All agent routes require JWT auth (RequireAuthorization()) and inherit the "Api" rate limit policy.


Security Checklist

  • API keys are always encrypted with EncryptionService before DB storage
  • API keys are stripped from all responses (check AgentEndpoint.cs response mapping)
  • MCP server endpoints should be validated/allowlisted before calling in production
  • GetConnectorUserId() from BaseRepository is used to scope agents to the authenticated user
  • Never log decrypted API keys

Common Pitfalls

  • LlmProvider.Ollama requires an Endpoint field on AgentDefinition — validate it non-null before calling.
  • Conversation SessionState is stored as serialized JSON in the DB — full history is loaded on every turn. For long conversations, consider truncation.
  • MCP tool discover is manual — tools are not auto-refreshed; call the discover endpoint after updating an MCP server.
  • jihadkhawaja.chat.shared changes require rebuilding shared → server/client in order before tests pass.
  • Streaming endpoint must be called with HttpCompletionOption.ResponseHeadersRead from the client.

© jihadkhawaja, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in .github/skills/agent-framework of jihadkhawaja/Egroo.

  • SKILL.md
  • references/ms-agent-framework.md

Open the folder on GitHubat commit a69d04b

Compare with similar skills

Agent Framework next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Agent Framework compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Agent Framework this skilljihadkhawaja/Egroo178—~1.9kAutomated safety check: PassApache-2.0
Facturasgustavoeenriquez/MakerAi212—~127Automated safety check: PassMIT
Banknoskillish/bankmcp276—~1.1kAutomated safety check: PassMIT
Setupnoskillish/bankmcp276—~805Automated safety check: PassMIT
AgentSquad for Swift2FastLabs/agent-squad7.8k—~3.5kAutomated safety check: PassApache-2.0
Perfupraullenchai/Rapid-MLX3.9k—~1.6kAutomated safety check: NotesCustom licence

Similar skills

  • Facturas

    gustavoeenriquez/MakerAi

    Úsalo cuando el usuario pida redactar una factura, una cuenta de cobro o una nota de cobro.

    212 GitHub stars~127 tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check passed
  • Bank

    noskillish/bankmcp

    Answer questions about the user's own bank accounts and money using the bank MCP tools (listaccounts, getbalances, gettransactions, watches).

    276 GitHub stars~1.1k tokensUpdated 9 days ago
    Agent WorkflowsAuto-check passed
  • Setup

    noskillish/bankmcp

    Set up BankMCP™ on this machine step by step: check Node, register the local MCP server, walk through the Enable Banking application, finish the setup page and connect the first bank.

    276 GitHub stars~805 tokensUpdated 9 days ago
    Agent WorkflowsAuto-check passed
  • AgentSquad for Swift

    2FastLabs/agent-squad

    Guides building on-device multi-agent apps in Swift with the AgentSquad framework: which agent, orchestrator, classifier, storage or voice type fits each situation.

    7.8k GitHub stars~3.5k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Perfup

    raullenchai/Rapid-MLX

    Autonomous performance optimization: research, PoC, benchmark, implement, review, PR

    3.9k GitHub stars~1.6k tokensUpdated today
    AI & LLM EngineeringAuto-check: notes
  • Openma

    openma-ai/open-managed-agents

    Use the openma platform to build, deploy, and manage AI agents.

    315 GitHub stars~854 tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed

More from jihadkhawaja/Egroo

  • Mudblazor Theming

    jihadkhawaja/Egroo

    Apply consistent Material Design UI theming in Egroo using MudBlazor.

    178 GitHub stars~1.6k tokensUpdated 6 mo ago
    Auto-check passed
  • Ef Core Migrations

    jihadkhawaja/Egroo

    Handle EF Core schema changes in Egroo. An agent skill from jihadkhawaja/Egroo.

    178 GitHub stars~673 tokensUpdated 6 mo ago
    Auto-check passed

Questions about Agent Framework

What does Agent Framework do?

Build, extend, and debug AI agents in Egroo using the Microsoft Agent Framework (C .NET). Agent Framework is an agent skill from jihadkhawaja/Egroo.NET).

When should I use Agent Framework?

Agent Framework fits situations like: : creating AgentDefinition; adding function tools with AIFunctionFactory; connecting MCP servers; managing agent conversations and session state.

How do I install Agent Framework in Claude Code?

Run `npx skills add jihadkhawaja/Egroo --skill agent-framework -a claude-code`. Or copy the skill folder (.github/skills/agent-framework in jihadkhawaja/Egroo) into .claude/skills/agent-framework in your project. Claude Code loads it when a task matches its description.

How do I install Agent Framework in Codex?

Run `npx skills add jihadkhawaja/Egroo --skill agent-framework -a codex`. Or copy the skill folder (.github/skills/agent-framework in jihadkhawaja/Egroo) into .agents/skills/agent-framework in your project. Codex loads it when a task matches its description.

Can I use Agent Framework in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jihadkhawaja/Egroo --skill agent-framework -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/agent-framework, .gemini/skills/agent-framework, .github/skills/agent-framework and .opencode/skills/agent-framework in your project.

What does Agent Framework need to run?

Going by SKILL.md and its folder, Agent Framework needs the command-line tools its instructions call (ollama).

Does Agent Framework access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Agent Framework safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Agent Framework use?

Agent Framework is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Agent Framework use?

About 1.9k tokens (SKILL.md is roughly 7.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 856 tokens, read only when the agent opens those files.

What are the alternatives to Agent Framework?

Skills that share tags, products or a category with Agent Framework: Facturas (gustavoeenriquez/MakerAi, 212 stars), Bank (noskillish/bankmcp, 276 stars), Setup (noskillish/bankmcp, 276 stars) and AgentSquad for Swift (2FastLabs/agent-squad, 7.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Agent Framework?

jihadkhawaja (a GitHub user) maintains it in jihadkhawaja/Egroo, which has 178 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on March 26, 2026.

Source: jihadkhawaja/Egroo on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.