-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path__init__.py
More file actions
39 lines (34 loc) · 1.24 KB
/
__init__.py
File metadata and controls
39 lines (34 loc) · 1.24 KB
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
32
33
34
35
36
37
38
"""
SafePred: Safety-TS-LMA (Safety-aware Language Model Agents)
A comprehensive safety-aware planning framework for Web Agents that uses:
- Trajectory graph modeling to capture state-action relationships
- Single-step prediction with integrated risk evaluation
- Risk filtering to identify compliance/safety risks early
- Single-step execution in the real environment
Main Components:
- TrajectoryGraph: Builds and maintains state-action trajectory graphs
- WorldModel: Simulates state transitions and evaluates risks
- SafeAgent: High-level interface for easy integration
- SafePredWrapper: Universal wrapper for easy benchmark integration
"""
from .core.trajectory_graph import TrajectoryGraph, StateNode, ActionEdge
from .models.world_model import WorldModel, BaseWorldModel
from .agent.agent import SafeAgent
from .config.config import SafetyConfig, default_config
from .wrapper import SafePredWrapper
from .adapters.base import BenchmarkAdapter, register_adapter, get_adapter
__version__ = "1.0.0"
__all__ = [
"TrajectoryGraph",
"StateNode",
"ActionEdge",
"WorldModel",
"BaseWorldModel",
"SafeAgent",
"SafetyConfig",
"default_config",
"SafePredWrapper",
"BenchmarkAdapter",
"register_adapter",
"get_adapter",
]