60 lines
2.5 KiB
HTML
60 lines
2.5 KiB
HTML
|
|
{% extends "base.html" %}
|
|||
|
|
|
|||
|
|
{% block title %}Agents – Agent Platform{% endblock %}
|
|||
|
|
|
|||
|
|
{% block content %}
|
|||
|
|
<div class="page-header">
|
|||
|
|
<h1>Agents</h1>
|
|||
|
|
<a href="/agents/new" class="btn btn-primary">+ Neuer Agent</a>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<section class="card">
|
|||
|
|
<p><small><strong>Hinweis:</strong> Code-Agents (definiert in <code>agents/*.py</code>) werden beim Start in die DB synchronisiert. Du kannst sie hier anpassen oder neue Agents rein in der DB anlegen.</small></p>
|
|||
|
|
</section>
|
|||
|
|
|
|||
|
|
<section class="card">
|
|||
|
|
<h2>{{ agents|length }} Agent(s)</h2>
|
|||
|
|
{% if agents %}
|
|||
|
|
<table class="table">
|
|||
|
|
<thead>
|
|||
|
|
<tr><th>ID</th><th>Name</th><th>Quelle</th><th>Tools</th><th>Status</th><th>Aktionen</th></tr>
|
|||
|
|
</thead>
|
|||
|
|
<tbody>
|
|||
|
|
{% for agent in agents %}
|
|||
|
|
<tr>
|
|||
|
|
<td><code>{{ agent.id }}</code></td>
|
|||
|
|
<td>{{ agent.name }}</td>
|
|||
|
|
<td>
|
|||
|
|
{% if agent.source == "code" %}
|
|||
|
|
<span class="badge badge-blue">Code</span>
|
|||
|
|
{% else %}
|
|||
|
|
<span class="badge">DB</span>
|
|||
|
|
{% endif %}
|
|||
|
|
</td>
|
|||
|
|
<td><small>{{ agent.allowed_tools|length }} Tool(s)</small></td>
|
|||
|
|
<td>
|
|||
|
|
{% if agent.enabled %}
|
|||
|
|
<span class="badge badge-green">aktiv</span>
|
|||
|
|
{% else %}
|
|||
|
|
<span class="badge badge-red">inaktiv</span>
|
|||
|
|
{% endif %}
|
|||
|
|
</td>
|
|||
|
|
<td>
|
|||
|
|
<a href="/agents/{{ agent.id }}" class="btn btn-sm">Edit</a>
|
|||
|
|
{% if agent.enabled %}
|
|||
|
|
<button hx-post="/api/agents/{{ agent.id }}/disable" hx-swap="none" hx-on::after-request="location.reload()" class="btn btn-sm">Disable</button>
|
|||
|
|
{% else %}
|
|||
|
|
<button hx-post="/api/agents/{{ agent.id }}/enable" hx-swap="none" hx-on::after-request="location.reload()" class="btn btn-sm">Enable</button>
|
|||
|
|
{% endif %}
|
|||
|
|
<button hx-delete="/api/agents/{{ agent.id }}" hx-confirm="Wirklich löschen?" hx-swap="none" hx-on::after-request="location.reload()" class="btn btn-sm btn-danger">Delete</button>
|
|||
|
|
</td>
|
|||
|
|
</tr>
|
|||
|
|
{% endfor %}
|
|||
|
|
</tbody>
|
|||
|
|
</table>
|
|||
|
|
{% else %}
|
|||
|
|
<p class="empty-state">Keine Agents vorhanden. <a href="/agents/new">Ersten Agent anlegen</a></p>
|
|||
|
|
{% endif %}
|
|||
|
|
</section>
|
|||
|
|
{% endblock %}
|