AI ML: Script AI Clients
AI-first map for choosing the built-in EyeAuras AI SDK/runtime first and using direct provider SDKs only when intentionally bypassing it.
Script AI Clients Discovery Map
Reference map for script mini-apps that need AI chat, vision, tool-calling, or
agent workflows. Start with the built-in EyeAuras.AISdk / EyeAuras.AI
runtime, then use direct provider NuGet clients only for explicit escape-hatch
cases.
User Intents
- Use the built-in EyeAuras AI SDK/runtime from a script or mini-app.
- Call a chat/vision/OCR model through configured EyeAuras AI profiles.
- Send a captured image to an AI model.
- Register AI-callable tools through the existing Semantic Kernel-based infrastructure.
- Decide when a script should intentionally bypass the built-in AI SDK with a direct provider NuGet.
- Keep API keys and model configuration outside hardcoded source when possible.
Concept Model
EyeAuras.AISdkpackages the built-in EyeAuras AI surface for script/project use. It brings in theEyeAuras.AIruntime and desktop AI helpers.- Built-in EyeAuras AI runtime is the app subsystem for chat sessions, profiles, retrieval, Semantic Kernel plugins, tool approval, MCP/Codex surfaces, and reusable chat UI.
- Use the built-in runtime as the default path for app-integrated AI. It already owns profile selection, key resolution, tool policy, session state, retrieval, and UI/event plumbing.
- External AI client NuGets are ordinary script dependencies used directly by a mini-app when the script deliberately bypasses the built-in runtime.
- External AI client assemblies are not default host/script references. Add
them explicitly with
#r "nuget:..."or project references when a script wants to call a provider SDK directly. - Direct clients are an escape hatch for provider-specific features, experiments, or standalone calls that should not participate in EyeAuras AI profiles, plugins, retrieval, or chat UI.
- Captured screen/window images usually come from CV/image APIs before being attached to an AI session or converted to provider-specific image input.
Common Flow: Built-in AI SDK
- Reference or depend on
EyeAuras.AISdkfor script/project AI integrations. - Resolve AI services through the script/project host surface, usually
AiEngine,IAiProfileRepository, session configurators, or UI factories. - Create an
IAiSession/IAiChatSessionthroughAiEngine. - Use configured
AiModelProfileentries instead of hardcoded provider clients and keys. - Attach
AiKernelPlugintools, retrieval plugins, or context snapshots when the workflow needs them. - Send turns through the session and render events with
AiChatViewModel/AiChatComponentwhen UI is needed. - Dispose session handles and subscriptions with script lifetime.
Common Flow: Direct Provider Escape Hatch
- Confirm the built-in AI SDK/runtime does not cover the required provider feature or experiment.
- Add the provider client explicitly with
#r "nuget:..."or a project reference. - Keep provider API keys in variables, config providers, user settings, or secret storage.
- Capture or receive inputs from EyeAuras APIs, then convert them to the provider-specific request format.
- Dispose provider clients, subscriptions, and buffers with script lifetime.
Prefer
- Prefer built-in
EyeAuras.AISdk/EyeAuras.AIruntime for AI chat, model profiles, key resolution, Semantic Kernel tools, retrieval, MCP/Codex, app-integrated assistants, and reusable chat UI. - Prefer
AiEngine,IAiProfileRepository,AiKernelPlugin,AiChatViewModel, andAiChatComponentover direct provider clients when building on EyeAuras AI infrastructure. - Use direct provider NuGets only when the script intentionally owns provider versioning, authentication, request shape, and response parsing.
- Prefer storing API keys in variables, config providers, user settings, or secret storage rather than hardcoding.
- Prefer bounded image sizes and compressed formats for vision calls.
- Prefer separating capture logic from AI-client request logic.
Avoid
- Avoid defaulting to direct provider SDKs when the built-in AI SDK can satisfy the workflow.
- Avoid bypassing EyeAuras profiles, key resolution, tool approval, and session state for app-integrated AI.
- Avoid confusing external provider SDKs with
EyeAuras.AISdk/EyeAuras.AIruntime services. - Avoid hardcoding real API keys in scripts or docs.
- Avoid sending large raw images when compressed bytes are sufficient.
- Avoid blocking UI/render loops while waiting for network calls.
- Avoid assuming provider SDK versions and model names stay current forever.
Research Anchors
EyeAuras.AISdkEyeAuras.AIAiEngineIAiProfileRepositoryIAiChatSessionAiModelProfileAiKernelPluginAiChatViewModelAiChatComponentMicrosoft.SemanticKernelKernelFunctionAttributeOpenAIClientOpenAI.ChatChatClientChatMessageChatMessageContentPartBinaryDataToJpegDataIImageSearchTriggerWindowImageProcessedEventArgs
Search Synonyms
- EyeAuras AISdk
- built-in AI SDK
- built-in AI runtime
- external AI client
- direct OpenAI NuGet
- chat client
- vision model
- GPT OCR
- image to text
- screenshot OCR
- direct provider SDK escape hatch
- AI profile
- AI plugin
Related Maps
ml/ai.mdml/ai-runtime.mdml/ai-kernel-plugins.mdcomputer-vision/images.mdscripting/references-and-resources.md