{% extends "base.html" %} {% block title %}Agent Management - AgentHub{% endblock %} {% block content %}

{{ page_title }}

{{ page_description }}

{% if success %}
{% endif %} {% if error %}
{% endif %}
{{ 'All AI Agents' if current_view == 'all' else 'Your AI Agents' }}
{{ agent_count }}
{% if agents %}
{% for agent in agents %} {% endfor %}
Agent Name Status Version Department Created Actions
{{ agent.agent_name }}
{{ agent.agent_purpose[:80] if agent.agent_purpose else 'No purpose listed' }}{% if agent.agent_purpose and agent.agent_purpose|length > 80 %}...{% endif %}
{% set status_class = {'Active': 'success', 'Development': 'warning', 'Inactive': 'secondary', 'Deprecated': 'danger'} %} {{ agent.agent_status or 'Unknown' }} {{ agent.agent_version or 'N/A' }} {{ agent.agent_department or 'N/A' }} {{ agent.created_at.strftime('%Y-%m-%d') if agent.created_at else 'N/A' }}
{% set can_edit = agent.created_by == current_user._id|string or (current_user.is_admin) or (agent.agent_contact_person and current_user.email and agent.agent_contact_person.lower() == current_user.email.lower()) %} {% if can_edit %} {% else %} {% endif %} {% if agent.created_by == current_user._id|string %} {% else %} {% endif %}
{% else %}
No Agents Yet

You haven't created any agents yet. Click the button below to get started!

Create Your First Agent
{% endif %}
{% endblock %}