Skills
Skills represent the functional capabilities that actors advertise to the network. They are the fundamental units of work in the Paranet, serving as the "discoverable arm" of the ecosystem.
Skill Matching
The Paranet operates on a request-and-match architecture. When a specific request is made, the network brokers a compatible actor and routes the work accordingly:
- Advertisement: Actors publicize the specific skills they are capable of performing.
- Matching: The Paranet matches a request to the appropriate actor.
- Handling: Once matched, the corresponding skill handler is triggered.
- Execution: The handler creates a new Goal to service the request and fulfill the required outcome.
Foundation of Distributed Work
Whether a request is direct (peer-to-peer) or brokered (via the network), the publication and invocation of skills are the mechanisms through which distributed work is accomplished.
- Scalability: A single workflow can leverage anywhere from one to thousands of unique skills across the network.
- Goal Trees: These skills interact within a deterministic goal tree to ensure that complex, multi-step outcomes are reached reliably across the federation.
Example: A Basic Skill
Below is an example of a skill definition. It demonstrates how a handler manages a lifecycle—including initialization, progress updates, and cancellation logic.
skill basic/test($case string) {
let $t = Now();
// Create a new goal to service the request
new !Test($case, $t);
} handle {
// Handle progress queries
question progress -> with !Test(case == $case, $t) {
pncp answer(message -> "working " + TimeElapsed($t, Now()));
}
// Log status notifications from the requester
status { $notice } -> log warn(`requester says $notice`);
// Handle cancellation requests
cancel -> {
log warn(`requester cancel`);
cancel !Test($case);
}
}
See Paraflow Skill Implemtation for a deeper dive.