forked from CopilotKit/CopilotKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschedule_meeting.py
More file actions
31 lines (25 loc) · 856 Bytes
/
Copy pathschedule_meeting.py
File metadata and controls
31 lines (25 loc) · 856 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
"""Schedule meeting tool implementation.
The HITL gating happens on the frontend via useHumanInTheLoop.
This tool just returns a pending approval status for the framework
wrapper to surface.
"""
from __future__ import annotations
from typing import Any
def schedule_meeting_impl(
reason: str,
duration_minutes: int = 30,
) -> dict[str, Any]:
"""Schedule a meeting (requires human approval).
Returns a pending_approval status. The actual gating is done by the
frontend's useHumanInTheLoop hook — the agent pauses until the user
approves or rejects.
"""
return {
"status": "pending_approval",
"reason": reason,
"duration_minutes": duration_minutes,
"message": (
f"Meeting request: {reason} ({duration_minutes} min). "
"Awaiting human approval."
),
}