File size: 2,418 Bytes
be37527
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
"""
Data models for the Driver Recruit Environment.

Tool-based action interface for long-horizon recruiting pipeline.
Agent uses CRM, messaging, approval, and workflow tools.
"""

from pydantic import Field

from openenv.core.env_server.types import Action, Observation


class RecruitopenenvAction(Action):
    """Tool-based action the agent takes."""

    tool: str = Field(
        ...,
        description="Tool: crm, messaging, approval, workflow",
    )
    action: str = Field(
        ...,
        description=(
            "Action within tool. "
            "crm: read_candidate, update_stage, update_field, add_note. "
            "messaging: send_message, read_reply. "
            "approval: request_approval, check_approval. "
            "workflow: wait."
        ),
    )
    topic: str = Field(
        default="",
        description=(
            "Message topic for messaging.send_message: "
            "greeting, call, experience, home_time, pay, equipment, route, "
            "deal_breakers, availability, violations, medical_card, references, "
            "pitch, offer, negotiate_pay, negotiate_home_time, signing_bonus, address_concern"
        ),
    )
    job_id: int = Field(
        default=-1,
        description="Job index (0-5). Used with pitch, offer, request_approval.",
    )
    stage: str = Field(
        default="",
        description="Target stage for crm.update_stage: contacted, interested, approval_pending, offer_sent, hired, lost",
    )
    field: str = Field(
        default="",
        description="CRM field for crm.update_field",
    )
    value: str = Field(
        default="",
        description="Value for crm.update_field or text for crm.add_note",
    )


class RecruitopenenvObservation(Observation):
    """What the agent sees after each action."""

    driver_name: str = Field(default="", description="Driver's name")
    crm_summary: str = Field(default="", description="CRM record (empty until read_candidate)")
    jobs_summary: str = Field(default="", description="Available job listings")
    discovered_info: str = Field(default="", description="Info discovered through conversation")

    stage: str = Field(default="lead", description="Current pipeline stage")
    feedback: str = Field(default="", description="API response from last action")
    pending_reply: bool = Field(default=False, description="Whether an unread message is waiting")