Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

add ScheduleAgent #9247

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
isthaison wants to merge 21 commits into infiniflow:main
base: main
Choose a base branch
Loading
from isthaison:main
Open

add ScheduleAgent #9247

isthaison wants to merge 21 commits into infiniflow:main from isthaison:main

Conversation

Copy link
Contributor

@isthaison isthaison commented Aug 5, 2025

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.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.

isthaison reacted with heart emoji

Copy link
Member

yingfeng commented Aug 5, 2025

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

isthaison reacted with heart emoji

@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.
Copilot

This comment was marked as outdated.

isthaison and others added 6 commits August 6, 2025 15:57
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@isthaison isthaison marked this pull request as ready for review August 6, 2025 08:59
Copy link
Contributor Author

Hi @cike8899 @yingfeng This feature is ready!

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:

isthaison and others added 2 commits August 8, 2025 17:51
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

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.

isthaison reacted with heart emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot Copilot left review comments

+1 more reviewer

@dcc123456 dcc123456 dcc123456 left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

💞 feature Feature request, pull request that fullfill a new feature. size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /