Skip to content

Conversation

isthaison
Copy link
Contributor

schedule agent task

  • New Feature (non-breaking change which adds functionality)

@Copilot Copilot AI review requested due to automatic review settings August 5, 2025 08:28
@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. 💞 feature Feature request, pull request that fullfill a new feature. labels Aug 5, 2025
Copilot

This comment was marked as outdated.

@cike8899
Copy link
Contributor

cike8899 commented Aug 5, 2025

flow-service.ts has been deprecated, please use agent-service.ts, antd has been deprecated, please use shadcn.

@yingfeng
Copy link
Member

yingfeng commented Aug 5, 2025

@isthaison Thanks for the contribution. We've sent the invitation to join the InfinFlow organization ~~

@isthaison isthaison marked this pull request as draft August 5, 2025 10:12
IT: Sop.Son added 5 commits August 5, 2025 17:19
Introduces schedule management for agents, including a modal UI for creating, editing, toggling, and deleting schedules, as well as viewing run history and statistics. Adds schedule-related interfaces, hooks, and integrates new schedule API endpoints into agent-service and api utility. Updates agent page to support schedule modal and related actions.
Introduces backend models, services, and API routes for agent scheduling, including creation, update, listing, toggling, deletion, and execution history/statistics. Adds frontend React hooks and UI for managing schedules, including form validation, schedule listing, and execution history display. Updates agent schedule modal to use new form components and logic.
…dule-agent

# Conflicts:
#	api/apps/canvas_app.py
#	web/src/pages/agent/schedule-modal/index.tsx
Deleted schedule-related API endpoints from api.ts and corresponding methods from flow-service.ts as they are no longer used. Updated useFetchSchedules hook to accept canvas_id and include it in the query key and API call.
@isthaison isthaison requested a review from Copilot August 6, 2025 08:53
Copilot

This comment was marked as outdated.

@isthaison isthaison marked this pull request as ready for review August 6, 2025 08:59
@isthaison
Copy link
Contributor Author

Hi @cike8899 @yingfeng This feature is ready!

@isthaison isthaison requested a review from Copilot August 8, 2025 10:50
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds comprehensive scheduling functionality for agent execution, enabling users to schedule agent tasks to run at specific times with various frequency patterns (once, daily, weekly, monthly). This feature provides automated agent execution capabilities through a new ScheduleAgent component.

Key changes include:

  • Complete schedule management system with API endpoints for CRUD operations
  • Agent executor service for running scheduled tasks
  • React UI components for schedule creation and management

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
web/src/utils/api.ts Adds schedule-related API endpoints
web/src/services/agent-service.ts Adds schedule service methods and exports
web/src/pages/agent/schedule-modal/index.tsx New comprehensive schedule management UI component
web/src/pages/agent/index.tsx Integrates schedule modal into agent page
web/src/locales/en.ts Adds English translations for schedule features
web/src/interfaces/database/schedule.ts Defines TypeScript interfaces for schedule data
web/src/hooks/schedule-hooks.ts Custom React hooks for schedule operations
rag/svr/agent_executor.py New agent executor service for running scheduled tasks
docker/entrypoint.sh Updates Docker entrypoint to support agent executor
api/db/services/schedule_agent_service.py Backend service for schedule management
api/db/db_models.py Adds database models for schedule and schedule runs
api/apps/canvas_app.py Adds schedule management API endpoints
Comments suppressed due to low confidence (2)

api/db/services/schedule_agent_service.py:85

  • [nitpick] The lambda expressions in the schedule_checks dictionary on line 121 are complex and reduce readability. Consider extracting them into separate methods for better maintainability.
            if not all_schedules:

@ZhenhangTung
Copy link

Hi @isthaison, thanks a lot for the contribution 🙌 I think it’s a great feature! We just need a bit more time to discuss and evaluate it, so appreciate your patience in the meantime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💞 feature Feature request, pull request that fullfill a new feature. size:XXL This PR changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants