Building an AI Assistant in C# with Cross‑Language Plugins
Описание и применение
Создание AI‑ассистента на C# с использованием кросс‑язычных плагинов WeavePort, позволяющих интегрировать существующие библиотеки Python/TypeScript без переписывания, сохраняя контроль над рабочим процессом и безопасностью.
Задача
Developing a C# AI assistant while reusing existing Python/TypeScript libraries without rewriting them, while maintaining control over workflow, security, and lifecycle.
Результат
WeavePort enables seamless integration of cross‑language plugins, preserving application control, security, and lifecycle management while avoiding code duplication.
Рабочий процесс
- 1. Identify a capability to replace (e.g., proposal scoring).
- 2. Create a plugin in the target language (Python) exposing a function (strategy.evaluate).
- 3. Register the plugin with WeavePort and bind it to a tenant/knowledge profile.
- 4. In C# host, instantiate LocalPluginClient and call CallAsync with request data.
- 5. Plugin receives request, calls host APIs (e.g., knowledge.read) via context.call_host.
- 6. Plugin computes scores and returns a typed result.
- 7. Host validates the result and commits it to application state.
- 8. WeavePort manages worker lifecycle, timeouts, and cleanup automatically.
Доказательства
WeavePort is an open‑source plugin runtime for .NET.
Python plugins run in Python processes. TypeScript plugins run through Node.
The host decides which records that grant permits.
- Дата записи: 2026-09-20T10:45:30.955Z