koan-ai-integration
БесплатноБез исполняемых скриптовНе проверенChat endpoints, embeddings, RAG workflows, vector search
от diegosouzapw★ 68 звёзд на GitHubОб этом скилле
Koan AI Integration
Core Principle
AI capabilities integrate seamlessly with entity patterns. Store embeddings on entities, use vector repositories for search, and leverage standard Entity
Quick Reference
Chat Endpoints
public class ChatController : ControllerBase
{
private readonly IAi _ai;
[HttpPost]
public async Task<IActionResult> Chat(
[FromBody] ChatRequest request,
CancellationToken ct)
{
var response = await _ai.ChatAsync(new AiChatRequest
{
Model = "gpt-4",
Messages = request.Messages,
SystemPrompt = "You are a helpful assistant.",
Temperature = 0.7
}, ct);
return Ok(new { message = response.Content, usage = response.Usage });
}
}
Entity with Embeddings
[DataAdapter("weaviate")] // Force vector database
public class ProductSearch : Entity<ProductSearch>
{
public string ProductId { get; set; } = "";
public string Description { get; set; } = "";
[VectorField]
public float[] DescriptionEmbedding { get; set; } = Array.Empty<float>();
// Semantic search
public static async Task<List<ProductSearch>> SimilarTo(
string query,
CancellationToken ct = default)
{
return await Vector<ProductSearch>.SearchAsync(query, limit: 10, ct);
}
}
RAG Workflow
public class KnowledgeBaseService
{
private readonly IAi _ai;
public async Task<string> AnswerQuestion(string question, CancellationToken ct)
{
// 1. Find relevant documents via vector search
var relevantDocs = await KnowledgeDocument.SimilarTo(question, ct);
// 2. Build context from documents
var context = string.Join("\n\n", relevantDocs.Select(d => d.Content));
// 3. Query AI with context
var response = await _ai.ChatAsync(new AiChatRequest
{
Model = "gpt-4",
SystemPrompt = $"Answer based on this context:\n\n{context}",
Messages = new[] { new AiMessage { Role = "user", Content = question } }
}, ct);
return response.Content;
}
}
Configuration
{
"Koan": {
"AI": {
"Providers": {
"Primary": {
"Type": "OpenAI",
"ApiKey": "{OPENAI_API_KEY}",
"Model": "gpt-4"
},
"Fallback": {
"Type": "Ollama",
"BaseUrl": "http://localhost:11434",
"Model": "llama2"
}
}
},
"Data": {
"Sources": {
"Vectors": {
"Adapter": "weaviate",
"ConnectionString": "http://localhost:8080"
}
}
}
}
}
When This Skill Applies
- ✅ Integrating AI features
- ✅ Semantic search
- ✅ Chat interfaces
- ✅ Embeddings generation
- ✅ RAG workflows
- ✅ AI-enriched entities
Reference Documentation
- Full Guide:
docs/guides/ai-integration.md - Vector How-To:
docs/guides/ai-vector-howto.md - Sample:
samples/S5.Recs/(AI recommendation engine) - Sample:
samples/S16.PantryPal/(Vision AI integration)
Установить koan-ai-integration в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл koan-ai-integration?
Chat endpoints, embeddings, RAG workflows, vector search
Как установить скилл koan-ai-integration?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл koan-ai-integration запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
agent-skill-stack
Find, evaluate, and assemble the smallest compatible set of AI Agent Skills for an end-to-end natural-language goal. Use when a user wants Skills for a…
от GitHubbuild-evidence-map
Build an auditable evidence map for a contested technical choice, research synthesis, proposal review, or consequential decision. Use when Copilot must…
от GitHubpinecone-rag
Build production RAG pipelines and persistent agent memory using Pinecone as the vector database backend. ALWAYS USE THIS SKILL when the user mentions…
от GitHubqdrant-monitoring-debugging
Diagnoses Qdrant production issues using metrics and observability tools. Use when someone reports 'optimizer stuck', 'indexing too slow', 'memory too high'…
от GitHub