Agents
Delivery agents are the people who carry out tasks on the ground — picking up packages, making deliveries, and collecting payments.
What Is an Agent?
An agent in Deliverty Hub represents a delivery driver or courier who is responsible for fulfilling tasks. Agents are linked to a user account within an organization and use the Deliverty Driver App to receive assignments, navigate to locations, update task statuses, and report their GPS position in real time.
Each agent belongs to exactly one organization. The platform enforces strict tenant isolation, so agents in Organization A cannot see or be assigned tasks from Organization B.
An agent is a specialized profile attached to a user account. Not every user is an agent — only users who have an agent profile can be assigned tasks and appear on the live tracking map. Organization admins and dispatchers typically do not have agent profiles.
Agent Profile
Every agent has a profile that contains operational information beyond the standard user account. This profile is what the assignment engine and dispatch system use to determine which agent should receive a task.
| Field | Type | Description |
|---|---|---|
user |
User | The linked user account (name, email, phone number) |
isAvailable |
Boolean | Whether the agent is currently available to accept new tasks |
currentLatitude |
Decimal | Last reported GPS latitude from the mobile app |
currentLongitude |
Decimal | Last reported GPS longitude from the mobile app |
lastLocationUpdate |
Timestamp | When the agent's location was last updated |
organization |
Organization | The organization the agent belongs to |
Availability Status
An agent's availability determines whether they can be considered for new task assignments. The isAvailable flag controls this behavior:
- Available (
isAvailable: true) — The agent is online, ready to accept tasks, and will be included in the assignment engine's candidate pool. - Unavailable (
isAvailable: false) — The agent is offline or on a break. The assignment engine will skip this agent when looking for candidates.
Agents can toggle their availability from the Deliverty Driver App. Dispatchers can also change an agent's availability from the dashboard if needed (for example, to take an agent offline for a vehicle issue).
Only available agents are considered by the automatic assignment algorithms. If no agents are available, tasks will remain in the AWAITING_ASSIGNMENT status until an agent becomes available or a dispatcher assigns manually.
Shift Management
While Deliverty Hub does not enforce rigid shift schedules at the platform level, the availability system provides a flexible approach to shift management:
- Self-managed shifts — Agents open the mobile app and mark themselves as available when they start their shift, and unavailable when they finish.
- Dispatcher-managed shifts — Dispatchers can set agent availability from the dashboard, effectively starting and ending shifts on behalf of agents.
- Location-based visibility — The live map shows all available agents with their current GPS position, giving dispatchers a real-time view of field capacity.
Location Tracking
The Deliverty Driver App reports the agent's GPS position to the backend at regular intervals:
- Update frequency: Every 15 seconds
- Minimum distance: 10 meters (updates are skipped if the agent has not moved at least 10 meters since the last report)
- Transport protocol: Socket.IO via the
/trackingnamespace
These location updates power several platform features:
- The live tracking map in the dashboard, where dispatchers can see all agents in real time
- The nearest-agent assignment algorithm, which calculates distances between agents and task pickup locations
- Customer-facing tracking — customers can see the progress of their delivery on a map
- Performance analytics — historical location data helps calculate actual travel times and distances
If an agent's lastLocationUpdate is older than a few minutes, it likely means the mobile app is in the background or the device has lost network connectivity. The dashboard will visually indicate stale locations so dispatchers can identify agents with outdated positions.
Performance Tracking
Deliverty Hub tracks several performance indicators for each agent, helping dispatchers and managers evaluate delivery efficiency:
| Metric | Description |
|---|---|
| Tasks Completed | Total number of tasks the agent has successfully delivered |
| Average Delivery Time | Mean time from task acceptance to completion |
| Acceptance Rate | Percentage of assigned tasks the agent accepts (vs. rejects or lets expire) |
| Active Time | Total time spent in available status during a given period |
| Current Load | Number of tasks currently assigned to the agent that are not yet completed |
These metrics are used by some assignment algorithms (such as load-balanced assignment) to distribute tasks more fairly across the fleet.
Managing Agents from the Dashboard
Organization admins and dispatchers can manage agents through the dashboard:
- View all agents — See a list of all agents in the organization with their current availability, location, and active task count.
- Agent detail view — Click on an agent to see their full profile, task history, and performance metrics.
- Toggle availability — Manually set an agent as available or unavailable.
- Assign tasks — Manually assign a pending task to a specific agent from the task detail or agent detail view.
- View on map — See the agent's real-time position on the live tracking map.
Agents and Couriers
It is important to understand the relationship between agents and couriers:
- An agent is an individual delivery person with a user account and the mobile app.
- A courier is a delivery provider — either internal (your own fleet) or external (a third-party service).
- When a task is assigned via an internal courier, the system selects an agent from your organization's pool to fulfill it.
- When a task is routed to an external courier, it is dispatched through the third-party courier's API and may not involve your agents at all.