Agent Node Reference
Technical reference for the Agent node type
Agent node reference
Technical reference for the Agent node type. An Agent is the robot or autonomous device being controlled in the OctoMY™ network.
Overview
| Property | Value |
|---|---|
| Class | Agent (inherits Node) |
| NodeType | TYPE_AGENT |
| NodeRole | ROLE_AGENT |
| Default Port | 8124 (UDP) |
| Theme Color | #e83636 (red) |
| Library | libagent |
Architecture
Agent modes
Agents operate under different modes that control their behavior:
Authority mode
Determines who has control over the Agent:
| Mode | Description |
|---|---|
| Independent (default) | When first commissioned, the Agent complies with local commands issued by user in local UI |
| Available | When another node has been granted skeptron authority, the agent can only be controlled when in available authority mode |
Design Decision: Authority modes
The authority mode system separates "who can control" (trust/skeptron) from "is being controlled" (control mode). This allows an Agent to grant skeptron authority to a Remote without immediately surrendering control.
Alternatives considered: Always active skeptron, permission-based control Tradeoff: Requires understanding two related concepts Benefit: Flexible control handoff, maintains operator oversight
Skeptron mode
When a node gains skeptron authority over the Agent, they may choose to control it:
| Mode | Description |
|---|---|
| Skeptron Off (default) | No skeptron authority holders are currently controlling this agent |
| Skeptron On | A skeptron authority holder is currently controlling this agent |
Note: Requires Agent to be in "Available" authority mode.
Did You Know?
"Skeptron" (σκῆπτρον) is the Greek word for scepter - a symbol of royal authority. In OctoMY™, holding the skeptron means having the authority to control the Agent. Like a real scepter, it can be passed between trusted parties.
Control mode
How the Agent is currently being controlled:
| Mode | Description |
|---|---|
| Idle (default) | Currently not under any particular control |
| Waypoint | Following a waypoint path on the map |
| Plan | Following instructions from a Plan |
| Manual | Following manual instructions from a Remote |
Core components
Agent class
The main Agent class extends Node with hardware-specific functionality:
class Agent : public Node {
QSharedPointer<AgentWindow> mWindow;
QSharedPointer<AgentConfigStore> mAgentConfigStore;
QSharedPointer<AgentConfigService> mAgentConfigService;
QSharedPointer<ControllerHandler> mControllerHandler;
// ...
};
Key methods
| Method | Description |
|---|---|
nodeConfigure() |
Initialize Agent-specific configuration |
nodeActivate(bool) |
Activate/deactivate the Agent |
nodeWindow() |
Returns the AgentWindow instance |
nodeRole() |
Returns ROLE_AGENT |
nodeType() |
Returns TYPE_AGENT |
configuration() |
Get current AgentConfig |
controllerHandler() |
Get the hardware ControllerHandler |
Configuration
Agent config
Agent-specific configuration stored in AgentConfigStore:
| Setting | Type | Description |
|---|---|---|
| Controller type | enum | ardumy, servotor32, etc. |
| Serial port | string | Hardware connection path |
| Actuator mapping | JSON | Servo/motor configuration |
| Sensor configuration | JSON | Attached sensors |
Storage location
~/.local/share/OctoMY™/OctoMY Agent/<personality>/
├── keystore.json # Cryptographic keys
├── addressbook.json # Known peers
├── agentconfig.json # Hardware configuration
└── planbook/ # Behavior plans
Pro Tip
Each Agent personality gets its own completely isolated data directory. This means you can run multiple Agents on the same machine, each with different hardware configurations and trust relationships. Useful for testing and development!
Services
The Agent activates these services in order:
| Level | Service | Purpose |
|---|---|---|
| 1 | KeyStoreService | Cryptographic identity |
| 2 | LocalIdentityStoreService | Node identity |
| 3 | LocalAddressListService | Network addresses |
| 4 | AddressBookService | Known peers |
| 5 | PlanBookService | Behavior plans |
| 6 | CarrierService | UDP transport |
| 7 | CommsService | Communication protocol |
| 8 | DiscoveryClientService | Peer discovery |
| - | AgentConfigService | Hardware configuration |
Hardware integration
Controller types
| Controller | Hardware | Library |
|---|---|---|
| ArduMY | Arduino via serial | libardumy |
| Servotor32 | Servotor32 board | libhardware |
| Custom | User-defined | libhardware |
Actuator support
- Servo motors (PWM)
- DC motors (H-bridge)
- Stepper motors
- LED indicators
- Custom GPIO
Sensor support
- Distance sensors (ultrasonic, IR)
- Cameras (via Qt Multimedia)
- GPS (via Qt Positioning)
- IMU (accelerometer, gyroscope, compass)
- Custom analog inputs
Communication
As Agent role
In communication, the Agent role means:
- Receives commands from Controls (Remote, Hub)
- Sends sensor data to Controls
- Receives Plan updates
- Executes local Plans
Couriers registered
| Courier | Direction | Purpose |
|---|---|---|
AgentStateCourier |
Out | Current state broadcast |
SensorsCourier |
Out | Sensor data streaming |
BlobCourier |
Both | Binary data transfer |
DiscoveryCourier |
Both | Peer discovery |
UI components
Agent window
The main window for Agent UI:
Activities
| Activity | Purpose |
|---|---|
| FaceActivity | Robot face display |
| HardwareActivity | Hardware configuration |
| AgentDeliveryActivity | First-time setup |
| PairingActivity | Peer trust setup |
First-time setup
The Agent "birth" process:
- Key Generation - Create cryptographic identity
- Personality Generation - Derive name, colors, identicon
- Hardware Detection - Scan for connected controllers
- Controller Configuration - Set up actuators/sensors
- Discovery - Announce presence to network
Did You Know?
The Agent birth process is called "delivery" in OctoMY terminology. The
AgentDeliveryActivityguides users through this one-time setup wizard. Once delivered, the Agent remembers its identity permanently.
Command line
# Start Agent with default personality
./agent
# Start with specific personality
./agent --personality "MyRobot"
# Start with specific base directory
./agent --base-dir /path/to/data
# Enable debug output
./agent --debug
API reference
Inherited from Node
The Node base class provides these inherited methods:
keyStore()- Access cryptographic keysaddressBook()- Access known peerscomms()- Access communication systemdiscoveryClient()- Access peer discoverynodeIdentity()- Get this node's identity
Agent-specific
| Method | Returns | Description |
|---|---|---|
configurationStore() |
AgentConfigStore |
Hardware config storage |
configuration() |
AgentConfig |
Current configuration |
controllerHandler() |
ControllerHandler |
Active hardware controller |
Component reference
| Component | QDoc API |
|---|---|
Agent |
API |
AgentWindow |
API |
AgentConfig |
API |
AgentConfigStore |
API |
AgentStateCourier |
API |
AgentDeliveryActivity |
API |
ControllerHandler |
API |
Node |
API |