This project is an intelligent task management system that leverages AI to manage tasks with human-in-the-loop confirmations. It allows users to add, delete, and list tasks, with actions requiring human approval before execution.
The Agent Task Manager Human In The Loop is designed to manage tasks intelligently using AI. It processes user queries to determine actions such as adding, deleting, or listing tasks. Actions are confirmed by humans before execution, ensuring control and accuracy. The system uses Durable Objects to maintain state and handle task confirmations.
To start the project locally, use the following command:
npx nx dev agent-task-manager-human-in-the-loop
- deploy: Deploys the application using Wrangler.
- dev: Starts the development server using Wrangler.
- lint: Lints the source code using Biome.
- start: Starts the development server using Wrangler.
- test: Runs tests using Vitest.
- test:ci: Runs tests in CI mode using Vitest.
- type-check: Checks TypeScript types without emitting files.
- Request:
- Response:
{ "confirmation": { "id": "string", "action": "add" | "delete", "title": "string", "description": "string", "taskId": "string" }, "message": "string" } - Curl Command:
curl -X POST http://localhost:8787/query -H "Content-Type: application/json" -d '{"agentId": "your-agent-id", "prompt": "your-prompt"}'
- Request:
{ "agentId": "string", "confirm": true | false } - Response:
{ "result": "Task | string | false | undefined" } - Curl Command:
curl -X POST http://localhost:8787/confirmations/{confirmationId} -H "Content-Type: application/json" -d '{"agentId": "your-agent-id", "confirm": true}'
The system is built as an application using Durable Objects to manage state. It employs a human-in-the-loop pattern to ensure that AI-generated actions are confirmed by a human before execution.
graph TD;
A[User] -->|Sends Query| B[TaskManagerAgent]
B -->|Creates Confirmation| C[Human Approval]
C -->|Confirms Action| D[TaskManagerAgent]
D -->|Executes Action| E[Task List]
The system uses the Tool Use Pattern by dynamically interacting with AI models to determine task actions and confirmations.
graph TD;
A[TaskManagerAgent] -->|Identify Task| B[AI Model]
B -->|Invoke AI| C[Generate Action]
C -->|Integrate Data| D[TaskManagerAgent]
The TaskManagerAgent acts as an autonomous agent, managing tasks dynamically and seeking human feedback for confirmations.
graph TD;
A[TaskManagerAgent] -->|Manage Tasks| B[Human Feedback]
B -->|Provide Feedback| A
{ "agentId": "string", "prompt": "string" }