An educational local-first incident triage assistant built with C# and the Microsoft Agent Framework.
This project now uses AIAgent + AgentWorkflowBuilder for orchestration, while keeping deterministic policy enforcement in code for severity and domain safety.
The runtime flow:
- Operator enters incident details.
TriageAuthoringAgentgenerates structured JSON triage output.TriageReviewAgentreviews and normalizes that JSON in a sequential workflow.- App parses the typed
IncidentTriageReport. - Deterministic
TriagePolicyEnforcerapplies hard severity/domain guardrails. - Final report + SLA hint is printed.
If structured parsing fails, the app falls back to plain text triage mode.
/stream uses agent streaming output for real-time console rendering.
- Microsoft Agent Framework agent creation with
ChatClientAgent - Sequential workflow composition with
AgentWorkflowBuilder.BuildSequential(...) - Local model integration through OpenAI-compatible endpoint (
Ollama) - Structured JSON-first triage contract (
IncidentTriageReport) - Deterministic post-processing guardrails in C#
- .NET 10 SDK or later
- Ollama installed and running locally
- A local chat model pulled (example):
ollama pull mistral:7bFrom the project root:
dotnet run --project IncidentTriageLocalAgentCommands:
/stream <incident>/sample/exit
Use these sample incident prompts to validate severity classification, domain selection, and action quality:
Checkout API p95 latency jumped from 220ms to 4.8s after deploy 2026-02-20 14:05 UTC. Error rate is 18% on POST /checkout. DB connections are 98% saturated. US-East customers report payment timeouts.Login failures started at 2026-02-21 09:12 UTC. 42% of auth requests fail with upstream 503 from identity provider. No deploy today. All regions affected.Order processing delay increased from 1 minute to 47 minutes since 2026-02-21 03:00 UTC. Queue depth rose from 2,000 to 480,000. Consumer lag keeps increasing.Nightly report job failed at 2026-02-20 01:00 UTC with low disk warning on analytics node. Customer-facing APIs are unaffected.One internal dashboard widget shows stale cache since 2026-02-20. No customer impact. Workaround exists.
Streaming example:
/stream Login failures started at 2026-02-21 09:12 UTC. 42% of auth requests fail with upstream 503 from identity provider. No deploy today. All regions affected.
IncidentTriageLocalAgent/appsettings.json:
{
"Agent": {
"Provider": "ollama",
"BaseUrl": "http://localhost:11434/v1",
"ApiKey": "ollama",
"ModelId": "mistral:7b",
"Temperature": 0.1,
"MaxOutputTokens": 800
}
}Environment overrides (ITA_ prefix):
ITA_Agent__ProviderITA_Agent__BaseUrlITA_Agent__ApiKeyITA_Agent__ModelIdITA_Agent__TemperatureITA_Agent__MaxOutputTokens
.
+-- IncidentTriageLocalAgent.slnx
+-- IncidentTriageLocalAgent/
| +-- IncidentTriageLocalAgent.csproj
| +-- Program.cs
| +-- appsettings.json
| +-- App/
| | +-- AgentAppConfig.cs
| +-- Domain/
| | +-- IncidentTriageReport.cs
| +-- Services/
| | +-- IncidentTriageService.cs
| | +-- TriagePolicyEnforcer.cs
+-- LICENSE
See the LICENSE file.
Contributions are welcome for improvements within the current project scope.
Suggested contribution areas:
- Triage instruction quality and prompt robustness
- Deterministic severity/domain policy rules
- Structured response validation and error handling
- Test coverage for policy enforcement and parsing paths
- Console UX improvements for on-call workflows
Typical contribution workflow:
- Fork the repo and create a feature branch.
- Make focused changes with clear commit messages.
- Run
dotnet build IncidentTriageLocalAgentlocally. - Open a pull request describing the problem, approach, and verification.