Files
installerscript-sh/recipes/ai/agent-config/install.sh
2025-11-11 11:47:15 +01:00

65 lines
2.4 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env bash
set -euo pipefail
ensure_root
detect_pkg_manager
pkg_install curl
if ask_to_install "Agent-Konfiguration"; then
echo ""
read -rp "Ollama Router Base-URL (z.B. http://192.168.3.21:11437): " ROUTER_URL
ROUTER_URL=${ROUTER_URL:-http://localhost:11437}
BASE="/srv/ai/agents"
$SUDO mkdir -p "${BASE}"
$SUDO tee "${BASE}/agents.yml" >/dev/null <<'EOF'
language: de
autonomy: soft
scope: global
agents:
- name: Strategie-Agent
purpose: "Lange Planungsdialoge, Roadmaps, Tabellen, UI/UX-Brainstorming."
default_models:
primary: "llama3.1:8b-instruct"
secondary: "mistral-nemo:12b"
cpu_fallback: "phi3:mini"
endpoint: "${ROUTER_URL}"
prompt_preset: |
Du bist ein strategischer Planer. Arbeite iterativ, strukturiert und deutschsprachig.
Liefere Tabellen (Markdown), klare Meilensteine, Risiken, Abhängigkeiten.
Frage NUR nach, wenn kritische Annahmen fehlen; sonst entscheide pragmatisch.
Modus: soft Vorschläge machen, aber Details selbstständig ausarbeiten.
- name: Denker-Agent
purpose: "Tiefes Reasoning (CoT), Architektur- und Lösungsentwürfe, Mathe/Logik."
default_models:
primary: "huihui_ai/deepseek-r1-abliterated:14b"
secondary: "phi3:medium-128k"
cpu_fallback: "phi3:mini"
endpoint: "${ROUTER_URL}"
prompt_preset: |
Denke in überprüfbaren Schritten. Erkläre Annahmen, bevor du entscheidest.
Bevorzuge Beweise, Gegenbeispiele und Tests. Schließe mit TL;DR.
- name: Gedächtnis-Agent
purpose: "RAG, Wissensquellen, Zitationen, Abruf & Zusammenführung von Fakten."
default_models:
retriever_llm: "phi3:mini"
embed_model: "mxbai-embed-large"
cpu_fallback: "gemma2:2b-instruct-q6_K"
endpoint: "${ROUTER_URL}"
prompt_preset: |
Orchestriere Nachschlagen in Wissenssammlungen (RAG). Zitiere Fundstellen (Datei/Seite/Abschnitt).
Antworte nüchtern, fasse Unsicherheit transparent zusammen.
sources:
- name: "Gesetze"
type: "pdf"
location: "/srv/ai/corpus/law"
- name: "Shadowrun-Regeln"
type: "pdf"
location: "/srv/ai/corpus/shadowrun"
- name: "Tech-Docs"
type: "mixed"
location: "/srv/ai/corpus/tech"
EOF
$SUDO sed -i "s|\${ROUTER_URL}|${ROUTER_URL}|g" "${BASE}/agents.yml"
echo "✅ Agenten-Profile: ${BASE}/agents.yml"
else
log "${YELLOW}⏭ Agent-Konfiguration übersprungen.${NC}"
fi