61 lines
2.3 KiB
HTML
61 lines
2.3 KiB
HTML
|
|
{% extends "base.html" %}
|
|||
|
|
|
|||
|
|
{% block title %}{{ agent.name }} – Agent Platform{% endblock %}
|
|||
|
|
|
|||
|
|
{% block content %}
|
|||
|
|
<div class="page-header">
|
|||
|
|
<h1>{{ agent.name }}</h1>
|
|||
|
|
<p class="subtitle"><code>{{ agent.id }}</code> · {{ agent.description }}</p>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<section class="card">
|
|||
|
|
<h2>Definition (aus Code)</h2>
|
|||
|
|
<p><small>Diese Definition liegt in <code>agents/*.py</code> und ist read-only im UI. Änderungen am Code erfordern Server-Neustart.</small></p>
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label>System-Prompt</label>
|
|||
|
|
<textarea readonly rows="10">{{ agent.system_prompt }}</textarea>
|
|||
|
|
</div>
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label>Erlaubte Tools</label>
|
|||
|
|
<input type="text" value="{{ agent.allowed_tools|join(', ') }}" readonly>
|
|||
|
|
</div>
|
|||
|
|
{% if agent.model %}
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label>LLM-Override</label>
|
|||
|
|
<input type="text" value="{{ agent.model }}" readonly>
|
|||
|
|
</div>
|
|||
|
|
{% endif %}
|
|||
|
|
</section>
|
|||
|
|
|
|||
|
|
<section class="card">
|
|||
|
|
<h2>Runtime-Settings</h2>
|
|||
|
|
<form hx-put="/api/agents/{{ agent.id }}" hx-target="#settings-result" class="form">
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label>
|
|||
|
|
<input type="checkbox" name="enabled" {% if agent.enabled %}checked{% endif %} value="true">
|
|||
|
|
Aktiv (Agent darf verwendet werden)
|
|||
|
|
</label>
|
|||
|
|
</div>
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label>Custom-Settings (JSON, optional)</label>
|
|||
|
|
<textarea name="custom_settings" rows="4" placeholder='{"temperature": 0.5, "max_tokens": 1000}'>{{ agent.custom_settings | tojson(indent=2) if agent.custom_settings else "{}" }}</textarea>
|
|||
|
|
</div>
|
|||
|
|
<button type="submit" class="btn btn-primary">Settings speichern</button>
|
|||
|
|
<a href="/agents" class="btn">Zurück</a>
|
|||
|
|
</form>
|
|||
|
|
<div id="settings-result"></div>
|
|||
|
|
</section>
|
|||
|
|
|
|||
|
|
<section class="card">
|
|||
|
|
<h2>Chat starten</h2>
|
|||
|
|
<form hx-post="/api/chat/{{ agent.id }}" hx-target="#chat-result" hx-swap="innerHTML" class="form">
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label>Erste Nachricht</label>
|
|||
|
|
<textarea name="message" rows="3" required placeholder="Hallo!"></textarea>
|
|||
|
|
</div>
|
|||
|
|
<button type="submit" class="btn btn-primary">Chat starten</button>
|
|||
|
|
</form>
|
|||
|
|
<div id="chat-result"></div>
|
|||
|
|
</section>
|
|||
|
|
{% endblock %}
|