AI Agents

{#if loading}
Loading agents...
{:else}
{#each agents as agent} {@const agentExecs = getAgentExecutions(agent.id)} {@const runningExecs = agentExecs.filter(e => e.status === "running")} {@const completedExecs = agentExecs.filter(e => e.status === "completed")} {/each}

{selectedAgent ? `${selectedAgent.name} Execution Log` : "Recent Executions"}

{#each (selectedAgent ? getAgentExecutions(selectedAgent.id) : executions) as execution}
{getAgentIcon(execution.agent_id)}
Task #{execution.task_id}
{formatTimestamp(execution.started_at)}
{execution.status.replace(/_/g, ' ')}
{#if execution.output_result?.reasoning}

{execution.output_result.reasoning}

{/if} {#if execution.actions_proposed && execution.actions_proposed.length > 0}
Actions: {execution.actions_proposed.length} {#each execution.actions_proposed.slice(0, 2) as action} {action.type} {/each}
{/if} {#if execution.error_message}
Error: {execution.error_message}
{/if}
{:else}
No executions yet
{/each}
{/if}