FieldCure.AssistStudio.Core
0.16.0
See the version list below for details.
dotnet add package FieldCure.AssistStudio.Core --version 0.16.0
NuGet\Install-Package FieldCure.AssistStudio.Core -Version 0.16.0
<PackageReference Include="FieldCure.AssistStudio.Core" Version="0.16.0" />
<PackageVersion Include="FieldCure.AssistStudio.Core" Version="0.16.0" />
<PackageReference Include="FieldCure.AssistStudio.Core" />
paket add FieldCure.AssistStudio.Core --version 0.16.0
#r "nuget: FieldCure.AssistStudio.Core, 0.16.0"
#:package FieldCure.AssistStudio.Core@0.16.0
#addin nuget:?package=FieldCure.AssistStudio.Core&version=0.16.0
#tool nuget:?package=FieldCure.AssistStudio.Core&version=0.16.0
FieldCure.AssistStudio.Core
App-level helpers and models for AssistStudio — tool orchestration, specialist agents, workspace context, and MCP server management. AI providers live in FieldCure.Ai.Providers.
Features
- Tool Orchestration —
ToolCallExecutorwith confirmation handler and parallel execution,ToolResolverfor built-in/MCP tool merge - Specialist Agents —
ISpecialistinterface for domain-specific sub-agent routing (e.g., Web Search Specialist) - Knowledge Archive —
KnowledgeBasemodel for multi-KB metadata persistence - Workspace Context —
IWorkspaceContextfor dynamic system prompt injection - MCP Server Management — Built-in server lifecycle (install, update, connect) via
BuiltInServerHelper - RAG Support —
IContextProviderretrievesContextChunks for queries - Structured Logging —
DiagnosticLoggerwith pluggable callbacks - Hardware Probing —
HardwareProbefor GPU/CPU detection (Ollama compatibility) - Platform-Agnostic — Targets
net8.0
Note: AI providers (Claude, OpenAI, Gemini, Ollama, Groq), streaming, and shared models (
ChatMessage,AiRequest,IAssistTool, etc.) are inFieldCure.Ai.Providers. See Supported Providers.
Install
dotnet add package FieldCure.AssistStudio.Core
Tool Execution
ToolCallExecutor runs tool calls with optional user confirmation and parallel execution:
using FieldCure.AssistStudio.Helpers;
var executor = new ToolCallExecutor([weatherTool, fileTool, searchTool]);
// User confirmation — returns (Approved, UserNote)
executor.ConfirmationHandler = async (toolName, argsJson) =>
{
var approved = await ShowConfirmationDialog(toolName, argsJson);
return (approved, userNote: null);
};
// Execute a single tool call
var result = await executor.ExecuteAsync(toolCall);
Console.WriteLine(result.Text);
// Multimedia results (IMultiContentTool)
foreach (var media in result.MediaItems)
Console.WriteLine($" {media.MimeType}: {media.FileName}");
Tool Resolution
ToolResolver merges built-in tools with MCP tools, prefixing names on conflict:
using FieldCure.AssistStudio.Helpers;
// Built-in "read_file" + MCP "read_file" → MCP tool becomes "filesystem_read_file"
var tools = ToolResolver.Resolve(builtInTools, mcpTools, conversationState);
Specialist Agents
Define domain-specific specialists for sub-agent routing via ISpecialist:
using FieldCure.AssistStudio;
public class WebSearchSpecialist : ISpecialist
{
public string Name => "web_search_specialist";
public string DisplayName => "Web Search Specialist";
public string? Icon => null;
public IReadOnlyList<string> AllowedTools { get; } =
["web_search", "web_fetch", "run_javascript"];
public IReadOnlyList<string> FallbackServers { get; } = ["builtin_essentials"];
public int MaxRounds => 15;
public TimeSpan Timeout => TimeSpan.FromMinutes(2);
public string BuildSystemPrompt(
string userQuery, IReadOnlyDictionary<string, string>? contextHints = null)
{
return $"""
You are a web research specialist.
Search the web, read relevant pages, and produce a concise report.
## Task
{userQuery}
""";
}
}
Workspace Context
Inject dynamic context into the system prompt based on app state:
public class MyWorkspace : IWorkspaceContext
{
public string? ActiveLabel => "Project: MyApp";
public Task<string?> GetContextAsync(CancellationToken ct = default)
=> Task.FromResult<string?>($"Current file: {_currentFile}");
}
Diagnostic Logging
Wire up DiagnosticLogger to capture internal events from providers and helpers:
DiagnosticLogger.OnException = ex => logger.LogError(ex, "AssistStudio error");
DiagnosticLogger.OnWarning = msg => logger.LogWarning(msg);
DiagnosticLogger.OnInfo = msg => logger.LogInformation(msg);
Key Types
Core Types
| Type | Description |
|---|---|
ToolCallExecutor |
Executes tool calls with confirmation handler and parallel execution. Supports IMultiContentTool for multimedia results |
ToolResolver |
Merges built-in and MCP tools with conflict resolution |
ISpecialist |
Specialist agent interface — Name, DisplayName, AllowedTools, BuildSystemPrompt |
KnowledgeBase |
KB metadata — Id, Name, SourcePaths, Embedding/Contextualizer config |
IWorkspaceContext |
Dynamic system prompt injection interface |
IContextProvider |
RAG retrieval interface — returns ContextChunks for a query |
BuiltInServerConfig |
Configuration for built-in MCP servers (enabled, folders, search engine) |
Profile |
System prompt (SystemPrompt) + tool/server selection preset |
McpServerConfig |
MCP server connection configuration (command, args, transport) |
DiagnosticLogger |
Structured logging with OnException/OnWarning/OnInfo callbacks |
HardwareProbe |
GPU/CPU detection for Ollama model compatibility |
From FieldCure.Ai.Providers (transitive dependency)
| Type | Description |
|---|---|
IAiProvider |
Provider interface — completion, streaming, model listing, thinking support |
StreamEvent |
Discriminated union — TextDelta, ThinkingDelta, ToolCallStart, Usage, StreamCompleted |
IAssistTool |
Tool/function calling interface with optional confirmation |
AiRequest / AiResponse |
Request and response models |
ChatMessage |
Conversation message with role, content, attachments, and tree branching |
ProviderPreset |
Saved provider configuration — model, temperature, thinking, PDF capability |
McpToolAdapter |
Bridges MCP tools to IAssistTool (zero MCP SDK dependency) |
Related Packages
- FieldCure.Ai.Providers — AI provider clients (Claude, OpenAI, Gemini, Ollama, Groq) and shared models. Core depends on this.
- FieldCure.Ai.Execution — Agent loop and sub-agent execution engine built on Providers.
- FieldCure.AssistStudio.Controls.WinUI — WinUI 3 chat UI controls built on this library.
License
MIT — Copyright (c) 2026 FieldCure Co., Ltd.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- FieldCure.Ai.Providers (>= 0.4.0)
- Microsoft.Win32.Registry (>= 5.0.0)
- System.Management (>= 9.0.14)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on FieldCure.AssistStudio.Core:
| Package | Downloads |
|---|---|
|
FieldCure.AssistStudio.Controls.WinUI
AI Chat UI Controls for WinUI 3. Supports Claude, OpenAI, Gemini, Ollama and more. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.19.2 | 86 | 5/5/2026 |
| 0.19.1 | 97 | 5/4/2026 |
| 0.19.0 | 81 | 5/4/2026 |
| 0.18.0 | 99 | 4/27/2026 |
| 0.17.0 | 98 | 4/21/2026 |
| 0.16.0 | 94 | 4/14/2026 |
| 0.15.0 | 104 | 4/10/2026 |
| 0.14.0 | 95 | 4/7/2026 |
| 0.13.0 | 102 | 3/31/2026 |
| 0.12.0 | 106 | 3/30/2026 |
| 0.11.0 | 101 | 3/29/2026 |
| 0.10.0 | 98 | 3/24/2026 |
| 0.9.0 | 101 | 3/24/2026 |
| 0.8.0 | 90 | 3/22/2026 |
| 0.7.0 | 96 | 3/21/2026 |
| 0.6.0 | 104 | 3/17/2026 |
| 0.5.0 | 103 | 3/17/2026 |
| 0.4.0 | 101 | 3/17/2026 |
v0.16.0: Fix stale .astd references to .astx and filter MRU by extension. Ai.Providers 0.3.0 → 0.4.0.