Skip to content

User

Bases: Agent

A simple agent that represents a user in the system.

Properties (in addition to Agent properties):

This agent does not have additional properties beyond those inherited from the base Agent class.

Inputs: None.

Outputs: - DEFAULT: The output stream where the user agent sends messages.

Source code in blue/agents/user.py
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
class UserAgent(Agent):
    """A simple agent that represents a user in the system.

     Properties (in addition to Agent properties):
    ----------
    This agent does not have additional properties beyond those inherited from the base Agent class.

    Inputs:
    None.

    Outputs:
    - `DEFAULT`: The output stream where the user agent sends messages.
    """

    def __init__(self, **kwargs):
        if 'name' not in kwargs:
            kwargs['name'] = "USER"
        super().__init__(**kwargs)

    ####### inputs / outputs
    def _initialize_inputs(self):
        pass

    def _initialize_outputs(self):
        """Initialize outputs for the user agent."""
        self.add_output("DEFAULT", description="user output")

    def _initialize(self, properties=None):
        """ Initialize the UserAgent with default properties, setting it as non-instructable."""
        super()._initialize(properties=properties)

        # user is not instructable
        self.properties['instructable'] = False
Last update: 2025-10-03