-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
base: main
Are you sure you want to change the base?
add ScheduleAgent #9247
Conversation
Co-authored-by: Copilot <[email protected]>
flow-service.ts has been deprecated, please use agent-service.ts, antd has been deprecated, please use shadcn. |
@isthaison Thanks for the contribution. We've sent the invitation to join the InfinFlow organization ~~ |
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.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this 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:
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
# Conflicts: # web/src/pages/agent/index.tsx
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. |
schedule agent task