idun-gguf ist ein voll funktionsfähiger lokaler Tool-Agent, der das Pattern von
idun-sdk 1:1 spiegelt — aber mit lokalen GGUF-Modellen via
Ollama statt Azure Cloud.
┌──────────────────────────────────────────────────┐
│ idun-gguf CLI / Python / MCP │
│ (OpenAI-kompatibler Client, stdlib-only) │
├──────────────────────────────────────────────────┤
│ Ollama (localhost:11434) │
│ qwen3:8b (GGUF, Q4_K_M) │
├──────────────────────────────────────────────────┤
│ Tool Registry (7 Tools) │
│ web_search memory file_ops code_executor │
├──────────────────────────────────────────────────┤
│ Full Agent Trajectory Output │
│ .text (final answer) + .steps (Schritte) │
└──────────────────────────────────────────────────┘
1 # Aus dem Projektverzeichnis
2 cd /app/idun_gguf_integration_1709
3 pip install -e .
4
5 # Oder direkt
6 pip install -e /app/idun_gguf_integration_1709/
1 # Einfache Frage (finale Antwort)
2 idun-gguf chat "Was ist Python?"
3
4 # Vollständigen Agent-Trajectory anzeigen
5 idun-gguf trace "Was ist Python?"
6
7 # Verfügbare Tools auflisten
8 idun-gguf tools
9
10 # Aktuelles Modell anzeigen
11 idun-gguf model
1 from idun_gguf import IdunLocalClient , Response
2
3 # Client erstellen
4 client = IdunLocalClient ( )
5
6 # Einfache Antwort
7 response = client . complete ( "Was ist Python?" )
8 print ( response . text ) # Finale Antwort
9 print ( len ( response . steps ) ) # Anzahl Schritte
10
11 # Mit Trajectory
12 for step in response . steps :
13 print ( f"[ { step . type } ] { step . content } " )
14 if step . type == "tool_call" :
15 print ( f" → Tool: { step . tool_name } , Input: { step . tool_input } " )
16 if step . type == "tool_result" :
17 print ( f" ← Ergebnis: { step . tool_output [ : 100] } ..." )
1 # Tools auflisten
2 echo '{"jsonrpc":"2.0","method":"tools/list","id":1}' | \
3 python3 -m idun_gguf.mcp_server
4
5 # idun_chat aufrufen
6 echo '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"idun_chat","arguments":{"prompt":"Was ist Python?"}},"id":2}' | \
7 python3 -m idun_gguf.mcp_server
Führt eine Anfrage aus und zeigt die finale Antwort.
1 # Mit Prompt als Argument
2 idun-gguf chat "Was ist Python?"
3
4 # Mit System-Prompt
5 idun-gguf chat "Erkläre ML" --system "Du bist ein ML-Experte"
6
7 # Als JSON-Ausgabe
8 idun-gguf chat "Hallo" --json
9
10 # Mit anderem Modell
11 idun-gguf chat "Hallo" --model llama3.1:8b
Führt eine Anfrage aus und zeigt den vollständigen Agent-Trajectory.
1 # Vollständigen Trace anzeigen
2 idun-gguf trace "Was ist Python?"
3
4 # Als JSON-Ausgabe
5 idun-gguf trace "Hallo" --json
Listet alle verfügbaren Tools mit ihren Parametern.
Zeigt das aktuell verwendete Modell und die Ollama-URL.
┌──────────────────────────────────────────────────────┐
│ idun-gguf Package │
│ │
│ ┌─────────────┐ ┌─────────────────┐ │
│ │ cli.py │ │ mcp_server.py │ │
│ │ (Click) │ │ (JSON-RPC) │ │
│ └──────┬──────┘ └────────┬────────┘ │
│ │ │ │
│ ┌──────┴──────────────────┴────────┐ │
│ │ client.py │ │
│ │ IdunLocalClient: .complete() │ │
│ │ → Response(.text, .steps) │ │
│ └───────────────┬──────────────────┘ │
│ │ │
│ ┌───────────────┴──────────────────┐ │
│ │ Tool Registry │ │
│ │ web_search │ memory │ file_ops │ │
│ │ code_executor │ │
│ └──────────────────────────────────┘ │
└──────────────────────────┬───────────────────────────┘
│
▼
┌───────────────────────┐
│ Ollama (localhost) │
│ qwen3:8b (GGUF) │
│ OpenAI-kompatible API │
└───────────────────────┘
│
▼
┌───────────────────────┐
│ GGUF Model (Q4_K_M) │
│ ~5.2GB, CPU-Inference │
└───────────────────────┘
1 # Prüfen
2 curl http://localhost:11434/api/tags
3
4 # Neustarten
5 ollama serve &
1 ollama list # Prüfen ob qwen3:8b gelistet ist
2 ollama pull qwen3:8b # Falls nicht
1 # ChromaDB persistiert in ~/.idun_gguf_memory/
2 # Bei Problemen: rm -rf ~/.idun_gguf_memory/
1 # Repository klonen
2 git clone https://huggingface.co/Qapdex/Idun-5-MoE-sdk-GGUF
3 cd idun-gguf
4
5 # Entwicklungsmodus
6 pip install -e .
7
8 # Tests
9 python -m pytest tests/