feat: agent platform initial commit
- FastAPI + HTMX UI: dashboard, agents CRUD, chat, audit, tools - SQLite schema: agents, conversations, messages, audit, sessions - Code-agent sync (agents/*.py -> DB on startup) - MCP client with health check - Token auth (Bearer + session) - LiteLLM integration via llm.py - Docker Compose: agent-platform + mcp-tools services - Smoke tests pass: /health 200, /api/agents 200, / 401
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
{% 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 %}
|
||||
Reference in New Issue
Block a user