agentsclimarketplace

Pilot consensus

Skill TeoSlayer/pilot-skills/skills/pilot-consensus

80+ agent skills for Pilot Protocol — communication, file transfer, trust, task routing, swarm coordination, and more

Install
npx -y skills add TeoSlayer/pilot-skills --skill pilot-consensus

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 7 stars7 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Distributed voting and agreement protocols for multi-agent decision making. Use this skill when: 1. Multiple agents need to agree on a value or decision 2. You need Byzantine fault-tolerant consensus in a swarm 3. You want to coordinate distributed transactions or state changes Do NOT use this skill when: - A single leader can make decisions (use pilot-leader-election) - You only need eventual consistency (use pilot-gossip)

The file declares its own license as AGPL-3.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

2.7 KB, 540 tokens by cl100k_base, as published. Nobody here has run it

pilot-consensus

Implement distributed consensus protocols for multi-agent coordination.

Commands

Propose a value

PROPOSAL_ID=$(uuidgen)
pilotctl --json publish "registry-hostname" "consensus:$CONSENSUS_GROUP" \
  --data "{\"type\":\"proposal\",\"id\":\"$PROPOSAL_ID\",\"proposer\":\"$AGENT_ID\",\"value\":$PROPOSAL_VALUE,\"term\":$CURRENT_TERM}"

Vote on a proposal

pilotctl --json send-message "$PROPOSER_ADDRESS" \
  --data "{\"type\":\"vote\",\"proposal_id\":\"$PROPOSAL_ID\",\"voter\":\"$AGENT_ID\",\"approve\":true,\"term\":$CURRENT_TERM}"

Collect votes and check quorum

VOTES=$(pilotctl --json received | jq '[.messages[] | select(.payload.type == "vote" and .payload.proposal_id == "'$PROPOSAL_ID'")]')
APPROVALS=$(echo "$VOTES" | jq '[.[] | select(.payload.approve == true)] | length')
QUORUM=$(( ($TOTAL_VOTERS / 2) + 1 ))

if [ "$APPROVALS" -ge "$QUORUM" ]; then
  echo "Consensus reached"
fi

Workflow Example

Three-phase consensus protocol:

#!/bin/bash
CONSENSUS_GROUP="config-update"
PROPOSAL_VALUE='{"max_workers":10}'
REGISTRY_HOST="registry.example.com"

# Phase 1: Prepare
PROPOSAL_ID=$(uuidgen)
pilotctl --json publish "$REGISTRY_HOST" "consensus:$CONSENSUS_GROUP" \
  --data "{\"type\":\"prepare\",\"id\":\"$PROPOSAL_ID\",\"value\":$PROPOSAL_VALUE,\"term\":$CURRENT_TERM}"

# Phase 2: Vote
sleep 3
VOTES=$(pilotctl --json received | jq '[.messages[] | select(.payload.type == "vote")]')
APPROVALS=$(echo "$VOTES" | jq '[.[] | select(.payload.approve == true)] | length')

# Phase 3: Commit
if [ "$APPROVALS" -ge "$QUORUM" ]; then
  pilotctl --json publish "$REGISTRY_HOST" "consensus:$CONSENSUS_GROUP" \
    --data "{\"type\":\"commit\",\"proposal_id\":\"$PROPOSAL_ID\",\"value\":$PROPOSAL_VALUE}"
fi

Dependencies

Requires pilot-protocol skill, jq, and uuidgen.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.