Skip to content

Constants

Constants and enums for PyAgenity agent graph execution and messaging.

This module defines special node names, message storage levels, execution states, and response granularity options for agent workflows.

Classes:

Name Description
ExecutionState

Graph execution states for agent workflows.

ResponseGranularity

Response granularity options for agent graph outputs.

StorageLevel

Message storage levels for agent state persistence.

Attributes:

Name Type Description
END Literal['__end__']
START Literal['__start__']

Attributes

END module-attribute

END = '__end__'

START module-attribute

START = '__start__'

Classes

ExecutionState

Bases: StrEnum

Graph execution states for agent workflows.

Values

RUNNING: Execution is in progress. PAUSED: Execution is paused. COMPLETED: Execution completed successfully. ERROR: Execution encountered an error. INTERRUPTED: Execution was interrupted. ABORTED: Execution was aborted. IDLE: Execution is idle.

Attributes:

Name Type Description
ABORTED
COMPLETED
ERROR
IDLE
INTERRUPTED
PAUSED
RUNNING
Source code in pyagenity/utils/constants.py
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
class ExecutionState(StrEnum):
    """
    Graph execution states for agent workflows.

    Values:
        RUNNING: Execution is in progress.
        PAUSED: Execution is paused.
        COMPLETED: Execution completed successfully.
        ERROR: Execution encountered an error.
        INTERRUPTED: Execution was interrupted.
        ABORTED: Execution was aborted.
        IDLE: Execution is idle.
    """

    RUNNING = "running"
    PAUSED = "paused"
    COMPLETED = "completed"
    ERROR = "error"
    INTERRUPTED = "interrupted"
    ABORTED = "aborted"
    IDLE = "idle"

Attributes

ABORTED class-attribute instance-attribute
ABORTED = 'aborted'
COMPLETED class-attribute instance-attribute
COMPLETED = 'completed'
ERROR class-attribute instance-attribute
ERROR = 'error'
IDLE class-attribute instance-attribute
IDLE = 'idle'
INTERRUPTED class-attribute instance-attribute
INTERRUPTED = 'interrupted'
PAUSED class-attribute instance-attribute
PAUSED = 'paused'
RUNNING class-attribute instance-attribute
RUNNING = 'running'

ResponseGranularity

Bases: StrEnum

Response granularity options for agent graph outputs.

Values

FULL: State, latest messages. PARTIAL: Context, summary, latest messages. LOW: Only latest messages.

Attributes:

Name Type Description
FULL
LOW
PARTIAL
Source code in pyagenity/utils/constants.py
55
56
57
58
59
60
61
62
63
64
65
66
67
class ResponseGranularity(StrEnum):
    """
    Response granularity options for agent graph outputs.

    Values:
        FULL: State, latest messages.
        PARTIAL: Context, summary, latest messages.
        LOW: Only latest messages.
    """

    FULL = "full"
    PARTIAL = "partial"
    LOW = "low"

Attributes

FULL class-attribute instance-attribute
FULL = 'full'
LOW class-attribute instance-attribute
LOW = 'low'
PARTIAL class-attribute instance-attribute
PARTIAL = 'partial'

StorageLevel

Message storage levels for agent state persistence.

Attributes:

Name Type Description
ALL

Save everything including tool calls.

MEDIUM

Only AI and human messages.

LOW

Only first human and last AI message.

Source code in pyagenity/utils/constants.py
17
18
19
20
21
22
23
24
25
26
27
28
29
class StorageLevel:
    """
    Message storage levels for agent state persistence.

    Attributes:
        ALL: Save everything including tool calls.
        MEDIUM: Only AI and human messages.
        LOW: Only first human and last AI message.
    """

    ALL = "all"
    MEDIUM = "medium"
    LOW = "low"

Attributes

ALL class-attribute instance-attribute
ALL = 'all'
LOW class-attribute instance-attribute
LOW = 'low'
MEDIUM class-attribute instance-attribute
MEDIUM = 'medium'