Skip to content
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

Feature: Agent can self-schedule workflow #217

Merged
merged 8 commits into from
Feb 7, 2025

Conversation

jfrank-summit
Copy link
Member

@jfrank-summit jfrank-summit commented Feb 7, 2025

closes #189

The goal of this PR was to introduce the first step in agent-driven scheduling of tasks. With this update, an agent has the option to selfSchedule which will return a next suggested prompt and how long to wait until running the workflow again. This system is an improvement over the interval driven current approach, but will need to be upgraded to be able to take other actions while waiting. This will likely be implemented with a message queue system of some sort, to be determined.

Key Changes:

Workflow Node and Prompt Updates:

  • Replaced workflowSummaryNode with finishWorkflowNode in the orchestration workflow. This includes changes in src/agents/workflows/orchestrator/nodes.ts, src/agents/workflows/orchestrator/orchestratorWorkflow.ts, and src/agents/workflows/orchestrator/prompts.ts. [1] [2] [3] [4] [5]

  • Added finishWorkflowNode implementation in src/agents/workflows/orchestrator/nodes/finishWorkflowNode.ts, which includes logic for parsing the finished workflow and logging errors.

  • Created a new prompt for finishing workflows in src/agents/workflows/orchestrator/nodes/finishWorkflowPrompt.ts, including detailed instructions for summarizing the workflow and handling self-scheduling.

Type and Configuration Updates:

  • Updated the OrchestratorConfig and OrchestratorState types to include finishWorkflowPrompt and finishedWorkflow respectively in src/agents/workflows/orchestrator/types.ts. [1] [2]

  • Modified the createPrompts function to support the new finishWorkflowPrompt and added a selfSchedule option in src/agents/workflows/orchestrator/prompts.ts.

Cleanup and Removal:

  • Removed the old workflowSummaryNode and its associated prompt from the codebase, including deletions in src/agents/workflows/orchestrator/nodes/workflowSummaryNode.ts and src/agents/workflows/orchestrator/nodes/workflowSummaryPrompt.ts. [1] [2]

These changes collectively enhance the workflow orchestration system by introducing a more detailed and flexible node for finishing workflows, along with corresponding prompt updates and type adjustments.

@jfrank-summit jfrank-summit requested a review from Xm0onh February 7, 2025 00:44
@jfrank-summit jfrank-summit force-pushed the feat/agent-self-schedule branch from b864494 to 4880e03 Compare February 7, 2025 00:56
Copy link
Member

@Xm0onh Xm0onh left a comment

Choose a reason for hiding this comment

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

Awsome!

@jfrank-summit jfrank-summit merged commit a44761f into main Feb 7, 2025
5 checks passed
@jfrank-summit jfrank-summit deleted the feat/agent-self-schedule branch February 7, 2025 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: Agent Self-Scheduling for Future Tasks - Part 1
2 participants