FieldCure.AssistStudio.Core 0.16.0

There is a newer version of this package available.
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
                    
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.16.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FieldCure.AssistStudio.Core" Version="0.16.0" />
                    
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.16.0
                    
#r "nuget: FieldCure.AssistStudio.Core, 0.16.0"
                    
#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.16.0
                    
#: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.16.0
                    
Install as a Cake Addin
#tool nuget:?package=FieldCure.AssistStudio.Core&version=0.16.0
                    
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 ArchiveKnowledgeBase 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.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)

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 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.