Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

feat(frontend): surface scheduled agents in library & copilot briefings (#12818)

Ubbed13a85bef75d
diff --git a/autogpt_platform/backend/backend/api/features/library/_add_to_library.py b/autogpt_platform/backend/backend/api/features/library/_add_to_library.py
index 243ec1c0d8..e77e22c7f5 100644
--- a/autogpt_platform/backend/backend/api/features/library/_add_to_library.py
+++ b/autogpt_platform/backend/backend/api/features/library/_add_to_library.py
@@ -12,6 +12,7 @@ import prisma.models
import backend.api.features.library.model as library_model
import backend.data.graph as graph_db
+from backend.api.features.library.db import _fetch_schedule_info
from backend.data.graph import GraphModel, GraphSettings
from backend.data.includes import library_agent_include
from backend.util.exceptions import NotFoundError
@@ -117,4 +118,5 @@ async def add_graph_to_library(
f"for store listing version #{store_listing_version_id} "
f"to library for user #{user_id}"
)
- return library_model.LibraryAgent.from_db(added_agent)
+ schedule_info = await _fetch_schedule_info(user_id, graph_id=graph_model.id)
+ return library_model.LibraryAgent.from_db(added_agent, schedule_info=schedule_info)
diff --git a/autogpt_platform/backend/backend/api/features/library/_add_to_library_test.py b/autogpt_platform/backend/backend/api/features/library/_add_to_library_test.py
index 4d4ae9bdcd..dbb8a17626 100644
--- a/autogpt_platform/backend/backend/api/features/library/_add_to_library_test.py
+++ b/autogpt_platform/backend/backend/api/features/library/_add_to_library_test.py
@@ -21,13 +21,17 @@ async def test_add_graph_to_library_create_new_agent() -> None:
"backend.api.features.library._add_to_library.library_model.LibraryAgent.from_db",
return_value=converted_agent,
) as mock_from_db,
+ patch(
+ "backend.api.features.library._add_to_library._fetch_schedule_info",
+ new=AsyncMock(return_value={}),
+ ),
):
mock_prisma.return_value.create = AsyncMock(return_value=created_agent)
result = await add_graph_to_library("slv-id", graph_model, "user-id")
assert result is converted_agent
- mock_from_db.assert_called_once_with(created_agent)
+ mock_from_db.assert_called_once_with(created_agent, schedule_info={})
# Verify create was called with correct data
create_call = mock_prisma.return_value.create.call_args
create_data = create_call.kwargs["data"]
@@ -54,6 +58,10 @@ async def test_add_graph_to_library_unique_violation_updates_existing() -> None:
"backend.api.features.library._add_to_library.library_model.LibraryAgent.from_db",
return_value=converted_agent,
) as mock_from_db,
+ patch(
+ "backend.api.features.library._add_to_library._fetch_schedule_info",
+ new=AsyncMock(return_value={}),
+ ),
):
mock_prisma.return_value.create = AsyncMock(
side_effect=prisma.errors.UniqueViolationError(
@@ -65,7 +73,7 @@ async def test_add_graph_to_library_unique_violation_updates_existing() -> None:
result = await add_graph_to_library("slv-id", graph_model, "user-id")
assert result is converted_agent
- mock_from_db.assert_called_once_with(updated_agent)
+ mock_from_db.assert_called_once_with(updated_agent, schedule_info={})
# Verify update was called with correct where and data
update_call = mock_prisma.return_value.update.call_args
assert update_call.kwargs["where"] == {
diff --git a/autogpt_platform/backend/backend/api/features/library/db.py b/autogpt_platform/backend/backend/api/features/library/db.py
index 0e7357bad3..1e01ea638f 100644
--- a/autogpt_platform/backend/backend/api/features/library/db.py
+++ b/autogpt_platform/backend/backend/api/features/library/db.py
@@ -1,6 +1,7 @@
import asyncio
import itertools
import logging
+from datetime import datetime, timezone
from typing import Literal, Optional
import fastapi
@@ -62,6 +63,46 @@ async def _fetch_execution_counts(user_id: str, graph_ids: list[str]) -> dict[st
}
+async def _fetch_schedule_info(
+ user_id: str, graph_id: Optional[str] = None
+) -> dict[str, str]:
+ """Fetch a map of graph_id → earliest next_run_time ISO string.
+
+ When `graph_id` is provided, the scheduler query is narrowed to that graph,
+ which is cheaper for single-agent lookups (detail page, post-update, etc.).
+ """
+ try:
+ scheduler_client = get_scheduler_client()
+ schedules = await scheduler_client.get_execution_schedules(
+ graph_id=graph_id,
+ user_id=user_id,
+ )
+ earliest: dict[str, tuple[datetime, str]] = {}
+ for s in schedules:
+ parsed = _parse_iso_datetime(s.next_run_time)
+ if parsed is None:
+ continue
+ current = earliest.get(s.graph_id)
+ if current is None or parsed < current[0]:
+ earliest[s.graph_id] = (parsed, s.next_run_time)
+ return {graph_id: iso for graph_id, (_, iso) in earliest.items()}
+ except Exception:
+ logger.warning("Failed to fetch schedules for library agents", exc_info=True)
+ return {}
+
+
+def _parse_iso_datetime(value: str) -> Optional[datetime]:
+ """Parse an ISO 8601 datetime, tolerating `Z` and naive forms (assumed UTC)."""
+ try:
+ parsed = datetime.fromisoformat(value.replace("Z", "+00:00"))
+ except ValueError:
+ logger.warning("Failed to parse schedule next_run_time: %s", value)
+ return None
+ if parsed.tzinfo is None:
+ parsed = parsed.replace(tzinfo=timezone.utc)
+ return parsed
+
+
async def list_library_agents(
user_id: str,
search_term: Optional[str] = None,
@@ -157,7 +198,10 @@ async def list_library_agents(
logger.debug(f"Retrieved {len(library_agents)} library agents for user #{user_id}")
graph_ids = [a.agentGraphId for a in library_agents if a.agentGraphId]
- execution_counts = await _fetch_execution_counts(user_id, graph_ids)
+ execution_counts, schedule_info = await asyncio.gather(
+ _fetch_execution_counts(user_id, graph_ids),
+ _fetch_schedule_info(user_id),
+ )
# Only pass valid agents to the response
valid_library_agents: list[library_model.LibraryAgent] = []
@@ -167,6 +211,7 @@ async def list_library_agents(
library_agent = library_model.LibraryAgent.from_db(
agent,
execution_count_override=execution_counts.get(agent.agentGraphId),
+ schedule_info=schedule_info,
)
valid_library_agents.append(library_agent)
except Exception as e:
@@ -240,7 +285,10 @@ async def list_favorite_library_agents(
)
graph_ids = [a.agentGraphId for a in library_agents if a.agentGraphId]
- execution_counts = await _fetch_execution_counts(user_id, graph_ids)
+ execution_counts, schedule_info = await asyncio.gather(
+ _fetch_execution_counts(user_id, graph_ids),
+ _fetch_schedule_info(user_id),
+ )
# Only pass valid agents to the response
valid_library_agents: list[library_model.LibraryAgent] = []
@@ -250,6 +298,7 @@ async def list_favorite_library_agents(
library_agent = library_model.LibraryAgent.from_db(
agent,
execution_count_override=execution_counts.get(agent.agentGraphId),
+ schedule_info=schedule_info,
)
valid_library_agents.append(library_agent)
except Exception as e:
@@ -316,6 +365,12 @@ async def get_library_agent(id: str, user_id: str) -> library_model.LibraryAgent
where={"userId": store_listing.owningUserId}
)
+ schedule_info = (
+ await _fetch_schedule_info(user_id, graph_id=library_agent.AgentGraph.id)
+ if library_agent.AgentGraph
+ else {}
+ )
+
return library_model.LibraryAgent.from_db(
library_agent,
sub_graphs=(
@@ -325,6 +380,7 @@ async def get_library_agent(id: str, user_id: str) -> library_model.LibraryAgent
),
store_listing=store_listing,
profile=profile,
+ schedule_info=schedule_info,
)
@@ -360,7 +416,10 @@ async def get_library_agent_by_store_version_id(
},
include=library_agent_include(user_id),
)
- return library_model.LibraryAgent.from_db(agent) if agent else None
+ if not agent:
+ return None
+ schedule_info = await _fetch_schedule_info(user_id, graph_id=agent.agentGraphId)
+ return library_model.LibraryAgent.from_db(agent, schedule_info=schedule_info)
async def get_library_agent_by_graph_id(
@@ -389,7 +448,10 @@ async def get_library_agent_by_graph_id(
assert agent.AgentGraph # make type checker happy
# Include sub-graphs so we can make a full credentials input schema
sub_graphs = await graph_db.get_sub_graphs(agent.AgentGraph)
- return library_model.LibraryAgent.from_db(agent, sub_graphs=sub_graphs)
+ schedule_info = await _fetch_schedule_info(user_id, graph_id=agent.agentGraphId)
+ return library_model.LibraryAgent.from_db(
+ agent, sub_graphs=sub_graphs, schedule_info=schedule_info
+ )
async def add_generated_agent_image(
@@ -531,7 +593,11 @@ async def create_library_agent(
for agent, graph in zip(library_agents, graph_entries):
asyncio.create_task(add_generated_agent_image(graph, user_id, agent.id))
- return [library_model.LibraryAgent.from_db(agent) for agent in library_agents]
+ schedule_info = await _fetch_schedule_info(user_id)
+ return [
+ library_model.LibraryAgent.from_db(agent, schedule_info=schedule_info)
+ for agent in library_agents
+ ]
async def update_agent_version_in_library(
@@ -593,7 +659,8 @@ async def update_agent_version_in_library(
f"Failed to update library agent for {agent_graph_id} v{agent_graph_version}"
)
- return library_model.LibraryAgent.from_db(lib)
+ schedule_info = await _fetch_schedule_info(user_id, graph_id=agent_graph_id)
+ return library_model.LibraryAgent.from_db(lib, schedule_info=schedule_info)
async def create_graph_in_library(
@@ -1498,7 +1565,11 @@ async def bulk_move_agents_to_folder(
),
)
- return [library_model.LibraryAgent.from_db(agent) for agent in agents]
+ schedule_info = await _fetch_schedule_info(user_id)
+ return [
+ library_model.LibraryAgent.from_db(agent, schedule_info=schedule_info)
+ for agent in agents
+ ]
def collect_tree_ids(
diff --git a/autogpt_platform/backend/backend/api/features/library/model.py b/autogpt_platform/backend/backend/api/features/library/model.py
index 26251a2cd1..8bd4a9edab 100644
--- a/autogpt_platform/backend/backend/api/features/library/model.py
+++ b/autogpt_platform/backend/backend/api/features/library/model.py
@@ -214,6 +214,14 @@ class LibraryAgent(pydantic.BaseModel):
folder_name: str | None = None # Denormalized for display
recommended_schedule_cron: str | None = None
+ is_scheduled: bool = pydantic.Field(
+ default=False,
+ description="Whether this agent has active execution schedules",
+ )
+ next_scheduled_run: str | None = pydantic.Field(
+ default=None,
+ description="ISO 8601 timestamp of the next scheduled run, if any",
+ )
settings: GraphSettings = pydantic.Field(default_factory=GraphSettings)
marketplace_listing: Optional["MarketplaceListing"] = None
@@ -224,6 +232,7 @@ class LibraryAgent(pydantic.BaseModel):
store_listing: Optional[prisma.models.StoreListing] = None,
profile: Optional[prisma.models.Profile] = None,
execution_count_override: Optional[int] = None,
+ schedule_info: Optional[dict[str, str]] = None,
) -> "LibraryAgent":
"""
Factory method that constructs a LibraryAgent from a Prisma LibraryAgent
@@ -359,6 +368,10 @@ class LibraryAgent(pydantic.BaseModel):
folder_id=agent.folderId,
folder_name=agent.Folder.name if agent.Folder else None,
recommended_schedule_cron=agent.AgentGraph.recommendedScheduleCron,
+ is_scheduled=bool(schedule_info and agent.agentGraphId in schedule_info),
+ next_scheduled_run=(
+ schedule_info.get(agent.agentGraphId) if schedule_info else None
+ ),
settings=_parse_settings(agent.settings),
marketplace_listing=marketplace_listing_data,
)
diff --git a/autogpt_platform/backend/snapshots/lib_agts_search b/autogpt_platform/backend/snapshots/lib_agts_search
index ae1d6ce7fd..e2a2975f97 100644
--- a/autogpt_platform/backend/snapshots/lib_agts_search
+++ b/autogpt_platform/backend/snapshots/lib_agts_search
@@ -40,6 +40,8 @@
"folder_id": null,
"folder_name": null,
"recommended_schedule_cron": null,
+ "is_scheduled": false,
+ "next_scheduled_run": null,
"settings": {
"human_in_the_loop_safe_mode": true,
"sensitive_action_safe_mode": false
@@ -86,6 +88,8 @@
"folder_id": null,
"folder_name": null,
"recommended_schedule_cron": null,
+ "is_scheduled": false,
+ "next_scheduled_run": null,
"settings": {
"human_in_the_loop_safe_mode": true,
"sensitive_action_safe_mode": false
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatSidebar/ChatSidebar.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatSidebar/ChatSidebar.tsx
index c135c95aa7..a8c5816e01 100644
--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatSidebar/ChatSidebar.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatSidebar/ChatSidebar.tsx
@@ -246,7 +246,7 @@ export function ChatSidebar() {
</SidebarHeader>
)}
{!isCollapsed && (
- <SidebarHeader className="shrink-0 px-4 pb-4 pt-4 shadow-[0_4px_6px_-1px_rgba(0,0,0,0.05)]">
+ <SidebarHeader className="shrink-0 px-4 pb-3 pt-3 shadow-[0_4px_6px_-1px_rgba(0,0,0,0.05)]">
<motion.div
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/PulseChips/usePulseChips.ts b/autogpt_platform/frontend/src/app/(platform)/copilot/components/PulseChips/usePulseChips.ts
index f1d56232fe..9c4bab2e66 100644
--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/PulseChips/usePulseChips.ts
+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/PulseChips/usePulseChips.ts
@@ -5,10 +5,12 @@ import { useSitrepItems } from "@/app/(platform)/library/components/SitrepItem/u
import type { PulseChipData } from "./types";
import { useMemo } from "react";
+const THREE_DAYS_MS = 3 * 24 * 60 * 60 * 1000;
+
export function usePulseChips(): PulseChipData[] {
const { agents } = useLibraryAgents();
- const sitrepItems = useSitrepItems(agents, 5);
+ const sitrepItems = useSitrepItems(agents, 5, THREE_DAYS_MS);
return useMemo(() => {
return sitrepItems.map((item) => ({
diff --git a/autogpt_platform/frontend/src/app/(platform)/library/components/AgentBriefingPanel/BriefingTabContent.tsx b/autogpt_platform/frontend/src/app/(platform)/library/components/AgentBriefingPanel/BriefingTabContent.tsx
index 5d4df627d9..939ec5403f 100644
--- a/autogpt_platform/frontend/src/app/(platform)/library/components/AgentBriefingPanel/BriefingTabContent.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/library/components/AgentBriefingPanel/BriefingTabContent.tsx
@@ -160,6 +160,20 @@ const TAB_STATUS_LABEL: Record<string, string> = {
idle: "No recent activity",
};
+function getAgentStatusLabel(tab: string, agent: LibraryAgent): string {
+ if (tab === "scheduled" && agent.next_scheduled_run) {
+ const diff = new Date(agent.next_scheduled_run).getTime() - Date.now();
+ const minutes = Math.round(diff / 60_000);
+ if (minutes <= 0) return "Scheduled to run soon";
+ if (minutes < 60) return `Scheduled to run in ${minutes}m`;
+ const hours = Math.round(minutes / 60);
+ if (hours < 24) return `Scheduled to run in ${hours}h`;
+ const days = Math.round(hours / 24);
+ return `Scheduled to run in ${days}d`;
+ }
+ return TAB_STATUS_LABEL[tab] ?? "";
+}
+
function AgentListSection({
activeTab,
agents,
@@ -204,7 +218,7 @@ function AgentListSection({
agentName: agent.name,
agentImageUrl: agent.image_url,
priority: status,
- message: TAB_STATUS_LABEL[activeTab] ?? "",
+ message: getAgentStatusLabel(activeTab, agent),
status,
}}
/>
diff --git a/autogpt_platform/frontend/src/app/(platform)/library/components/ContextualActionButton/ContextualActionButton.tsx b/autogpt_platform/frontend/src/app/(platform)/library/components/ContextualActionButton/ContextualActionButton.tsx
index 5788db815a..f72e34c982 100644
--- a/autogpt_platform/frontend/src/app/(platform)/library/components/ContextualActionButton/ContextualActionButton.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/library/components/ContextualActionButton/ContextualActionButton.tsx
@@ -4,8 +4,6 @@ import {
EyeIcon,
ArrowsClockwiseIcon,
MonitorPlayIcon,
- PlayIcon,
- ArrowCounterClockwiseIcon,
} from "@phosphor-icons/react";
import { cn } from "@/lib/utils";
import { useRouter } from "next/navigation";
@@ -63,6 +61,6 @@ const ACTION_CONFIG: Record<
error: { label: "View error", icon: EyeIcon },
listening: { label: "Reconnect", icon: ArrowsClockwiseIcon },
running: { label: "Watch live", icon: MonitorPlayIcon },
- idle: { label: "Start", icon: PlayIcon },
- scheduled: { label: "Start", icon: ArrowCounterClockwiseIcon },
+ idle: { label: "View", icon: EyeIcon },
+ scheduled: { label: "View", icon: EyeIcon },
};
diff --git a/autogpt_platform/frontend/src/app/(platform)/library/components/SitrepItem/SitrepItem.tsx b/autogpt_platform/frontend/src/app/(platform)/library/components/SitrepItem/SitrepItem.tsx
index 3277b06716..54bcd59cb0 100644
--- a/autogpt_platform/frontend/src/app/(platform)/library/components/SitrepItem/SitrepItem.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/library/components/SitrepItem/SitrepItem.tsx
@@ -1,5 +1,6 @@
"use client";
+import { OverflowText } from "@/components/atoms/OverflowText/OverflowText";
import { Text } from "@/components/atoms/Text/Text";
import {
WarningCircleIcon,
@@ -117,9 +118,11 @@ export function SitrepItem({ item }: Props) {
<Text variant="body-medium" className="leading-tight text-zinc-900">
{item.agentName}
</Text>
- <Text variant="small" className="leading-tight text-zinc-500">
- {item.message}
- </Text>
+ <OverflowText
+ value={item.message}
+ variant="small"
+ className="leading-tight text-zinc-500"
+ />
</div>
</div>
diff --git a/autogpt_platform/frontend/src/app/(platform)/library/components/SitrepItem/useSitrepItems.ts b/autogpt_platform/frontend/src/app/(platform)/library/components/SitrepItem/useSitrepItems.ts
index 2b4a1deb8b..02c33b48eb 100644
--- a/autogpt_platform/frontend/src/app/(platform)/library/components/SitrepItem/useSitrepItems.ts
+++ b/autogpt_platform/frontend/src/app/(platform)/library/components/SitrepItem/useSitrepItems.ts
@@ -19,21 +19,32 @@ import {
export function useSitrepItems(
agents: LibraryAgent[],
maxItems: number,
+ scheduledWithinMs?: number,
): SitrepItemData[] {
const { data: executions } = useGetV1ListAllExecutions({
query: { select: okData },
});
return useMemo(() => {
- if (!executions || agents.length === 0) return [];
+ if (agents.length === 0) return [];
const graphIdToAgent = new Map(agents.map((a) => [a.graph_id, a]));
- const agentExecutions = groupByAgent(executions, graphIdToAgent);
+ const agentExecutions = groupByAgent(executions ?? [], graphIdToAgent);
const items: SitrepItemData[] = [];
+ const coveredAgentIds = new Set<string>();
for (const [agent, execs] of agentExecutions) {
const item = buildSitrepFromExecutions(agent, execs);
- if (item) items.push(item);
+ if (item) {
+ items.push(item);
+ coveredAgentIds.add(agent.id);
+ }
+ }
+
+ for (const agent of agents) {
+ if (coveredAgentIds.has(agent.id)) continue;
+ const configItem = buildSitrepFromConfig(agent, scheduledWithinMs);
+ if (configItem) items.push(configItem);
}
const order: Record<SitrepPriority, number> = {
@@ -48,7 +59,7 @@ export function useSitrepItems(
items.sort((a, b) => order[a.priority] - order[b.priority]);
return items.slice(0, maxItems);
- }, [agents, executions, maxItems]);
+ }, [agents, executions, maxItems, scheduledWithinMs]);
}
function groupByAgent(
@@ -131,3 +142,57 @@ function buildSitrepFromExecutions(
return null;
}
+
+function buildSitrepFromConfig(
+ agent: LibraryAgent,
+ scheduledWithinMs?: number,
+): SitrepItemData | null {
+ if (agent.has_external_trigger) {
+ return {
+ id: `${agent.id}-listening`,
+ agentID: agent.id,
+ agentName: agent.name,
+ priority: "listening",
+ message: "Waiting for trigger event",
+ status: "listening",
+ };
+ }
+
+ if (agent.is_scheduled || agent.recommended_schedule_cron) {
+ if (!isNextRunWithin(agent.next_scheduled_run, scheduledWithinMs)) {
+ return null;
+ }
+ return {
+ id: `${agent.id}-scheduled`,
+ agentID: agent.id,
+ agentName: agent.name,
+ priority: "scheduled",
+ message: formatNextRun(agent.next_scheduled_run),
+ status: "scheduled",
+ };
+ }
+
+ return null;
+}
+
+function isNextRunWithin(
+ iso: string | undefined | null,
+ windowMs: number | undefined,
+): boolean {
+ if (windowMs === undefined) return true;
+ if (!iso) return false;
+ const diff = new Date(iso).getTime() - Date.now();
+ return diff <= windowMs;
+}
+
+function formatNextRun(iso: string | undefined | null): string {
+ if (!iso) return "Has a scheduled run";
+ const diff = new Date(iso).getTime() - Date.now();
+ const minutes = Math.round(diff / 60_000);
+ if (minutes <= 0) return "Scheduled to run soon";
+ if (minutes < 60) return `Scheduled to run in ${minutes}m`;
+ const hours = Math.round(minutes / 60);
+ if (hours < 24) return `Scheduled to run in ${hours}h`;
+ const days = Math.round(hours / 24);
+ return `Scheduled to run in ${days}d`;
+}
diff --git a/autogpt_platform/frontend/src/app/(platform)/library/hooks/useAgentStatus.ts b/autogpt_platform/frontend/src/app/(platform)/library/hooks/useAgentStatus.ts
index ada5560040..2b3246454e 100644
--- a/autogpt_platform/frontend/src/app/(platform)/library/hooks/useAgentStatus.ts
+++ b/autogpt_platform/frontend/src/app/(platform)/library/hooks/useAgentStatus.ts
@@ -64,7 +64,7 @@ function computeAgentStatus(
"Execution failed";
} else if (agent.has_external_trigger) {
status = "listening";
- } else if (agent.recommended_schedule_cron) {
+ } else if (agent.is_scheduled || agent.recommended_schedule_cron) {
status = "scheduled";
} else {
status = "idle";
@@ -196,7 +196,7 @@ export function useFleetSummary(agents: LibraryAgent[]): FleetSummary {
counts.error += 1;
} else if (agent.has_external_trigger) {
counts.listening += 1;
- } else if (agent.recommended_schedule_cron) {
+ } else if (agent.is_scheduled || agent.recommended_schedule_cron) {
counts.scheduled += 1;
} else {
counts.idle += 1;
diff --git a/autogpt_platform/frontend/src/app/(platform)/library/hooks/useLibraryFleetSummary.ts b/autogpt_platform/frontend/src/app/(platform)/library/hooks/useLibraryFleetSummary.ts
index 8aa7a92812..e07117aa51 100644
--- a/autogpt_platform/frontend/src/app/(platform)/library/hooks/useLibraryFleetSummary.ts
+++ b/autogpt_platform/frontend/src/app/(platform)/library/hooks/useLibraryFleetSummary.ts
@@ -94,7 +94,7 @@ export function useLibraryFleetSummary(
summary.error += 1;
} else if (agent.has_external_trigger) {
summary.listening += 1;
- } else if (agent.recommended_schedule_cron) {
+ } else if (agent.is_scheduled || agent.recommended_schedule_cron) {
summary.scheduled += 1;
} else {
summary.idle += 1;
diff --git a/autogpt_platform/frontend/src/app/api/openapi.json b/autogpt_platform/frontend/src/app/api/openapi.json
index ff426c267e..bba1c867fb 100644
--- a/autogpt_platform/frontend/src/app/api/openapi.json
+++ b/autogpt_platform/frontend/src/app/api/openapi.json
@@ -10949,6 +10949,17 @@
"anyOf": [{ "type": "string" }, { "type": "null" }],
"title": "Recommended Schedule Cron"
},
+ "is_scheduled": {
+ "type": "boolean",
+ "title": "Is Scheduled",
+ "description": "Whether this agent has active execution schedules",
+ "default": false
+ },
+ "next_scheduled_run": {
+ "anyOf": [{ "type": "string" }, { "type": "null" }],
+ "title": "Next Scheduled Run",
+ "description": "ISO 8601 timestamp of the next scheduled run, if any"
+ },
"settings": { "$ref": "#/components/schemas/GraphSettings" },
"marketplace_listing": {
"anyOf": [
diff --git a/autogpt_platform/frontend/src/components/layout/Navbar/Navbar.tsx b/autogpt_platform/frontend/src/components/layout/Navbar/Navbar.tsx
index e56e14a451..149cf12507 100644
--- a/autogpt_platform/frontend/src/components/layout/Navbar/Navbar.tsx
+++ b/autogpt_platform/frontend/src/components/layout/Navbar/Navbar.tsx
@@ -60,7 +60,7 @@ export function Navbar() {
<PreviewBanner branchName={previewBranchName} />
) : null}
<nav
- className="inline-flex w-full items-center bg-[#FAFAFA]/80 p-3 backdrop-blur-xl"
+ className="inline-flex w-full items-center border-b border-[#f1f1f1] bg-[#FAFAFA]/80 p-3 backdrop-blur-xl"
style={{ height: NAVBAR_HEIGHT_PX }}
>
{/* Left section */}