FieldCure.AssistStudio.Core 0.19.2

dotnet add package FieldCure.AssistStudio.Core --version 0.19.2
                    
NuGet\Install-Package FieldCure.AssistStudio.Core -Version 0.19.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FieldCure.AssistStudio.Core" Version="0.19.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FieldCure.AssistStudio.Core" Version="0.19.2" />
                    
Directory.Packages.props
<PackageReference Include="FieldCure.AssistStudio.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add FieldCure.AssistStudio.Core --version 0.19.2
                    
#r "nuget: FieldCure.AssistStudio.Core, 0.19.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package FieldCure.AssistStudio.Core@0.19.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=FieldCure.AssistStudio.Core&version=0.19.2
                    
Install as a Cake Addin
#tool nuget:?package=FieldCure.AssistStudio.Core&version=0.19.2
                    
Install as a Cake Tool

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.

License: MIT

Features

  • Tool OrchestrationToolCallExecutor with confirmation handler and parallel execution, ToolResolver for built-in/MCP tool merge
  • Specialist AgentsISpecialist interface for domain-specific sub-agent routing (e.g., Web Search Specialist)
  • Knowledge BaseKnowledgeBase model for multi-KB metadata persistence
  • Workspace ContextIWorkspaceContext for dynamic system prompt injection
  • MCP Server Management — Built-in server lifecycle (install, update, connect) via BuiltInServerHelper
  • RAG SupportIContextProvider retrieves ContextChunks for queries
  • Structured LoggingDiagnosticLogger with pluggable callbacks
  • Hardware ProbingHardwareProbe for 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 in FieldCure.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.Core.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.Core.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.Core;

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}
            """;
    }
}

Routing hints for the parent

ISpecialist itself only defines the sub-agent's own contract. Implementations can additionally expose a plain const string (by convention named RoutingGuideline) that the host appends to the parent conversation's system prompt. This is how the host steers the parent on when to delegate and how to handle the specialist's result — e.g. forward the returned report verbatim, re-invoke on status: "truncated", or preserve the specialist parameter on retry instead of falling back to generic delegate_task arguments.

WebSearchSpecialist.RoutingGuideline and JudgmentSpecialist.RoutingGuideline in AssistStudio are reference patterns. The constant is not part of the ISpecialist interface — the host that knows about a specialist appends its guideline explicitly when building the parent system prompt.

Tip: model choice per specialist

Different LLM families handle long structured protocols differently. Specialists that spell out an elaborate multi-phase dialectic (e.g. the Judgment protocol's ASSERT → CHALLENGE → SYNTHESIZE loop) behave noticeably differently depending on the underlying model:

  • Compression-oriented models tend to execute the protocol with purpose-first summarization — they produce the final report inside a single max_tokens budget and return status: "completed".
  • Verbatim-oriented models tend to follow the protocol section by section and more easily hit max_tokens mid-synthesis, returning status: "truncated". The routing guideline's re-invocation rule still recovers a usable report, but at higher token cost.

This is not a correctness issue — the pipeline handles both paths — but it's worth considering when picking the provider preset a specialist runs under. The host already exposes this knob via the specialistPresetProvider delegate passed to SubAgentTool; a future revision of ISpecialist may also carry a PreferredProvider hint.

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
ProviderModel Saved provider configuration — model, temperature, thinking, PDF capability (renamed from ProviderPreset in Ai.Providers 0.7.0)
McpToolAdapter Bridges MCP tools to IAssistTool (zero MCP SDK dependency)

License

MIT — Copyright (c) 2026 FieldCure Co., Ltd.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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 80 5/5/2026
0.19.1 94 5/4/2026
0.19.0 79 5/4/2026
0.18.0 99 4/27/2026
0.17.0 97 4/21/2026
0.16.0 93 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.19.2: Rebuilt against FieldCure.Ai.Providers 0.7.2 so the Claude Opus 4.7 adaptive thinking-shape fix flows transitively to consumers of FieldCure.AssistStudio.Controls.WinUI / .Core (NuGet's lowest-applicable resolver previously stayed pinned to 0.7.1 through Core 0.19.1). No code or public API changes.