Skip to content

srmbsrg/silicon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Silicon — Dark Factory Modernization Advisor

A minimal, runnable prototype built on the Microsoft Agent Framework (Microsoft.Agents.AI, GA April 2026 — the "building blocks for AI" .NET framework that consolidates AutoGen + Semantic Kernel).

Silicon is an AI agent that advises engineering leaders on modernizing legacy systems onto a modern, automated ("dark factory") platform — relevant to Carborundum AI's Bismuth / Dark Factory product line.

What it demonstrates

This is a deliberately small program that exercises the three core Agent Framework building blocks end-to-end against a live model:

# Building block In this code
1 Agent over a model provider IChatClient from GitHub Models (free) wired into an AIAgent via chatClient.AsAIAgent(...)
2 Tools = plain C# methods Three [Description]-annotated methods registered with AIFunctionFactory.Create(...); the model decides when to call them
3 Stateful multi-turn sessions An AgentSession (created with agent.CreateSessionAsync()) that carries conversation state across RunAsync calls

The three tools

Tool Signature Returns
AnalyzeStack (string techStack) Migration complexity: Straightforward / Moderate / Complex (keyword-signal heuristic)
GetMigrationPath (string complexity) Recommended phased migration path from a static lookup
EstimateEffort (string complexity, int teamSize) Rough week estimate (base effort scaled by √team for coordination overhead)

The two demos

  • Demo 1 — single turn, all three tools. One user message ("VB6 app, SQL Server 2008, no tests, 4 engineers — analyze, recommend, estimate") causes the model to chain all three tools in a single turn and synthesize a recommendation.
  • Demo 2 — multi-turn session, state persistence. Turn 1 asks only for a complexity classification of a COBOL mainframe system. Turn 2 says "without re-analyzing, recommend the path and estimate for 6 engineers." The agent reuses the Complex classification from turn 1 — visible in the trace, it calls GetMigrationPath/EstimateEffort without calling AnalyzeStack again — proving the AgentSession preserved state.

Each tool prints a [tool call] ... trace line when the model actually invokes it, so you can see the building blocks working rather than inferring them from the final answer.

Running it

Prerequisites

  • .NET 9 SDK
  • A GitHub personal access token (any classic PAT works — no special scopes needed for GitHub Models, which is free).

Run

# PowerShell
$env:GITHUB_TOKEN = "ghp_xxxxxxxxxxxxxxxx"
dotnet run
# bash
GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxx dotnet run

If GITHUB_TOKEN is unset, the program prints setup instructions and exits cleanly. If the model provider rejects the request (expired token or GitHub Models rate limiting), it prints a clear diagnostic instead of crashing.

Configuration

Defined as constants at the top of Program.cs:

  • Endpoint: https://models.inference.ai.azure.com (GitHub Models)
  • Model: gpt-4o-mini

The model client is created with AzureAIInferenceChatClient via new ChatCompletionsClient(endpoint, new AzureKeyCredential(token)).AsIChatClient(modelId) from Microsoft.Extensions.AI.AzureAIInference.

Packages

Package Version Role
Microsoft.Agents.AI 1.10.0 The Agent Framework — AIAgent, AgentSession, AsAIAgent()
Microsoft.Extensions.AI.AzureAIInference 10.0.0-preview IChatClient adapter over the Azure AI Inference SDK (GitHub Models speaks this protocol)

Sample output

DEMO 1 — Single turn, all three tools
USER > We run a VB6 line-of-business app backed by SQL Server 2008 ... 4 engineers ...
   [tool call] AnalyzeStack("VB6 app, SQL Server 2008, no tests")
   [tool call] GetMigrationPath("Complex")
   [tool call] EstimateEffort("Complex", teamSize: 4)
SILICON > Complexity: Complex ... ~20 weeks with a team of 4 engineers.

DEMO 2 — Multi-turn session (state persistence via AgentSession)
USER > ... COBOL mainframe ... Just classify its migration complexity for now.
   [tool call] AnalyzeStack("COBOL mainframe batch process, ...")
SILICON > ... classified as Complex.
USER > Good. Now — without re-analyzing — recommend the path and estimate for 6 engineers.
   [tool call] GetMigrationPath("Complex")        <-- "Complex" recalled from turn 1, no re-analysis
   [tool call] EstimateEffort("Complex", teamSize: 6)
SILICON > ... approximately 17 weeks with a team of 6 engineers.

Built as a Carborundum AI / Silicon (Manifold Element) prototype.

About

Dark Factory Modernization Advisor - Microsoft Agent Framework .NET 9 prototype.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages