A chat-driven AI assistant for Swedish accounting and finance, built on .NET Aspire and Microsoft Semantic Kernel.
You talk to it in Swedish (or English). It orchestrates a fleet of plugins to pull bookkeeping data, run financial analysis, forecast trends, and hand you a finished Excel or PDF report.
Note
This is a sanitized public snapshot of a private project, shared as a portfolio / reference example of what you can build with Semantic Kernel and .NET Aspire. All credentials, API keys, customer data, and internal infrastructure details have been removed or replaced with placeholders. It is published for reading and learning — it will not run end-to-end without your own API keys and configuration.
Isa turns a free-form request like
"Make me a professional quarterly report showing revenue, COGS, and gross profit for the last five years and email it to me."
into a finished, formatted report. Under the hood the agent:
- Understands the request —
NaturalLanguageServiceextracts report parameters from free-form Swedish. - Fetches the data — pulls SIE4 bookkeeping exports via the Fortnox integration.
- Classifies it — maps accounts against the Swedish BAS chart of accounts.
- Computes the numbers — revenue, cost of goods sold, gross profit, and other KPIs.
- Forecasts — time-series projection with MathNet.Numerics.
- Composes the report — assembles charts, pivots, tables, and a KPI front page into a styled Excel/PDF document (ClosedXML / EPPlus).
- Delivers it — archives the file and emails it out.
The agent is the only orchestrator. Plugins never call each other directly — they expose [KernelFunction]s (with Swedish descriptions) and the LLM decides what to call, and in what order.
Three deployable services, orchestrated by .NET Aspire:
flowchart LR
User([User]) -->|chat| WebChat[WebChat<br/>Blazor Server]
WebChat -->|HTTP| Agent[Agent<br/>ASP.NET Core API]
Agent -->|Semantic Kernel| LLM[(LLM<br/>OpenAI-compatible)]
Agent -->|dynamic discovery| Plugins{{Semantic Kernel<br/>plugin fleet}}
Plugins --> Fortnox[Fortnox / SIE4]
Plugins --> Analysis[AnalysisPlugin<br/>reports + forecasting]
Plugins --> Comms[Mail / SMS / Slack / WhatsApp]
Plugins --> Docs[Dropbox / Google / Microsoft]
Agent --> DB[(SQLite via EF Core)]
AppHost[[AppHost<br/>Aspire orchestrator]] -.runs.-> Agent
AppHost -.runs.-> WebChat
src/AppHost— the Aspire distributed-application host that wires up and runs the other services plus the dashboard.src/Agent— the brain. An ASP.NET Core Web API hosting a Semantic KernelKernelwired to an OpenAI-compatible chat-completion endpoint. It discovers and loads plugins dynamically at runtime ([PluginDiscoverable],DynamicPluginDiscoveryService), runs chat, scheduled workflows (Quartz), and document interpretation. Persists to SQLite via EF Core.src/WebChat— a Blazor Server UI (interactive server components, Syncfusion) where the user logs in and chats. Pages for chat, workflows, history, plugin management, and settings.
The plugins are the agent's hands. The flagship is AnalysisPlugin; the rest connect Isa to the outside world.
| Plugin | Role |
|---|---|
| AnalysisPlugin (flagship) | SIE4 parsing, BAS classification, metrics, ML forecasting, Excel/PDF report composition |
| FortnoxPlugin | Fortnox accounting integration (SIE4 export, OAuth) |
| DocumentInterpreterPlugin | OCR + interpretation of invoices/receipts (Tesseract) |
| CompanyCheckupPlugin | Company lookups (Bolagsverket, SCB, OpenCorporates) |
| MailPlugin / SmsPlugin / WhatsAppPlugin / SlackPlugin | Outbound communication channels |
| DropboxPlugin / GoogleWorkspacePlugin / MicrosoftOfficePlugin | File & document access |
| GoogleSearchPlugin | Web search |
| OpenCagePlugin / OpenMeteoPlugin | Geocoding & weather |
| DateTimePlugin | Date/time reasoning |
- .NET 9, strict build (
TreatWarningsAsErrors,Nullable=enable) - .NET Aspire 9 for orchestration
- Microsoft Semantic Kernel 1.58 + OpenAI SDK (routed through an OpenAI-compatible endpoint)
- Blazor Server with Syncfusion components
- SQLite + EF Core 9
- Quartz for workflow scheduling
- ClosedXML / EPPlus for Excel/PDF, MathNet.Numerics for forecasting
- xUnit + Playwright for testing across unit, integration, and E2E layers
src/
AppHost/ Aspire orchestrator
Agent/ Web API — the agent runtime
WebChat/ Blazor Server UI
AnalysisPlugin/ Flagship: analysis & reporting
*Plugin/ ~17 Semantic Kernel plugins
ServiceDefaults/ Shared/ Cross-cutting helpers
tests/ xUnit unit/integration + Playwright E2E
docs/ Architecture Decision Records (50+) and guides
config/ Deployment & app config templates
Reading the code? Start with
src/Agent/Program.cs(plugin discovery + kernel setup) andsrc/AnalysisPlugin(the flagship feature).
Running it locally requires your own credentials. In broad strokes:
- Prerequisites — .NET 9 SDK, and an OpenAI-compatible chat endpoint.
- Configuration — copy the placeholder values in
src/Agent/appsettings.jsonandsrc/WebChat/appsettings.jsonand fill in your own keys (LLM endpoint, and whichever integrations you want to exercise). Nothing real ships in this repo. - OCR models — the OCR plugin needs Tesseract language data (
eng.traineddata,swe.traineddata) placed insrc/DocumentInterpreterPlugin/tessdata/. These are not committed (35 MB of binaries); download them from tessdata. - Run —
dotnet run --project src/AppHoststarts the agent, the web UI, and the Aspire dashboard. - Test —
dotnet testruns the suite.
The bookkeeping samples under tests/**/TestData/ and src/Agent/sample-financial-data.sie are synthetic (fictional companies, made-up figures) used purely to exercise the SIE4 parser and the report engine.
MIT — do what you like, no warranty.
dotnet · csharp · dotnet-aspire · semantic-kernel · ai-agent · llm · blazor · accounting · fintech · sie4 · bookkeeping · openai