Skip to content

Commit c653d9a

Browse files
author
SentienceDEV
committed
Abstraction for browser automation tasks
1 parent 1bce000 commit c653d9a

File tree

7 files changed

+1779
-9
lines changed

7 files changed

+1779
-9
lines changed

predicate/agents/__init__.py

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,35 @@
88
Agent types:
99
- PredicateBrowserAgent: Single-executor agent with manual step definitions
1010
- PlannerExecutorAgent: Two-tier agent with LLM-generated plans
11+
12+
Task abstractions:
13+
- AutomationTask: Generic task model for browser automation
14+
- TaskCategory: Task category hints for heuristics selection
15+
16+
Heuristics:
17+
- HeuristicHint: Planner-generated hints for element selection
18+
- ComposableHeuristics: Dynamic heuristics composition
19+
20+
Recovery:
21+
- RecoveryState: Checkpoint tracking for rollback recovery
22+
- RecoveryCheckpoint: Individual recovery checkpoint
1123
"""
1224

25+
from .automation_task import (
26+
AutomationTask,
27+
ExtractionSpec,
28+
SuccessCriteria,
29+
TaskCategory,
30+
)
1331
from .browser_agent import (
1432
CaptchaConfig,
1533
PermissionRecoveryConfig,
1634
PredicateBrowserAgent,
1735
PredicateBrowserAgentConfig,
1836
VisionFallbackConfig,
1937
)
38+
from .composable_heuristics import ComposableHeuristics
39+
from .heuristic_spec import COMMON_HINTS, HeuristicHint, get_common_hint
2040
from .planner_executor_agent import (
2141
ExecutorOverride,
2242
IntentHeuristics,
@@ -35,14 +55,25 @@
3555
normalize_plan,
3656
validate_plan_smoothness,
3757
)
58+
from .recovery import RecoveryCheckpoint, RecoveryState
3859

3960
__all__ = [
61+
# Automation Task
62+
"AutomationTask",
63+
"ExtractionSpec",
64+
"SuccessCriteria",
65+
"TaskCategory",
4066
# Browser Agent
4167
"CaptchaConfig",
4268
"PermissionRecoveryConfig",
4369
"PredicateBrowserAgent",
4470
"PredicateBrowserAgentConfig",
4571
"VisionFallbackConfig",
72+
# Heuristics
73+
"COMMON_HINTS",
74+
"ComposableHeuristics",
75+
"HeuristicHint",
76+
"get_common_hint",
4677
# Planner + Executor Agent
4778
"ExecutorOverride",
4879
"IntentHeuristics",
@@ -60,5 +91,7 @@
6091
"StepStatus",
6192
"normalize_plan",
6293
"validate_plan_smoothness",
94+
# Recovery
95+
"RecoveryCheckpoint",
96+
"RecoveryState",
6397
]
64-

0 commit comments

Comments
 (0)