Skip to content

About

Team Dusk: HOA payment accountability chain on Flower Agent (Flower hackathon, Stanford 2026)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

HOA Payment Accountability Chain (Team Dusk)

Flower agents review a vendor payment on SuperGrid: one extracts the invoice fields, others check vendor, budget and reserve rules, and an arbiter recommends PAY or HOLD. Two board members approve the exact review hash. Every handoff is recorded as a hash-chained event, the evidence bundle is signed, and event hashes can be anchored to a Bitcoin Core regtest node. An Auditor refuses to finalize a run whose record does not verify.

Responsibilities are deliberately small:

  • Git/GitHub is the source-control and collaboration layer.
  • Flower is the agent runtime/federation layer (AgentApp at hackathon.flower_app:app).
  • Pydantic validates every object crossing the trust boundary.
  • Named humans must confirm the SHA-256 of the exact review package before an evidence manifest can be finalized.

Not in scope: Neo4j lineage, NFC, custody hardware, Sigstore/Cosign, per-agent keys.

Setup

uv sync --python 3.12
cp .env.example .env

Populate .env only on the machine that will call the model endpoint. Never commit .env or paste its key into chat. Required values: an API key, an endpoint, and a model name (SPONSOR_API_KEY / SPONSOR_BASE_URL / AGENT_MODEL, or FLWR_MODEL_API_KEY / FLWR_MODEL_API_ENDPOINT / SPONSOR_MODEL). On SuperGrid the runtime supplies the key and endpoint automatically and only the model name is needed.

Verify the core

uv run ruff check .
uv run pytest
uv run flwr build
uv run hackathon config
uv run hackathon smoke

The smoke test is deterministic and does not spend sponsor API quota. It creates one transaction, runs the collector/policy/red-team review logic, confirms the exact review hash as a simulated human, then emits and verifies a canonical evidence manifest and its SHA-256.

Flower runtime

The Flower AgentApp lives at hackathon.flower_app:app. The same app runs as the orchestrator (SuperLink side) or a specialist (SuperNode side). Configuration is read from the variables above; the application never prints a secret value. Each SuperGrid task has a 5-minute timeout once running, so the chain must finish inside it. The offline smoke path should pass before attempting a live model call.

Orchestration mode (AGENT_ORCHESTRATION, default auto):

  • auto: the orchestrator's model plans the delegation. If that model does not answer its first call (25 s) or returns a provider error before anything was delegated, a scripted orchestrator takes over: fixed invoice, vendor and budget subtasks go to the SuperNodes, and one SuperNode acts as arbiter for PAY or HOLD. Every model call then runs on the SuperNodes. The run's result and its RESULT_PRODUCED event state that scripted delegation was used and why.
  • scripted: skip the orchestrator model entirely.
  • model: never fall back; a model failure fails the run.

On SuperGrid the environment cannot be set per run, so runs use auto. When SuperGrid's model service is unresponsive, auto costs the 25 s first-call wait.

Specialists that answer in plain text without calling push_reply_message still reply: the harness forwards the final text, and the reply's attestation records delivery: harness_fallback (otherwise model_tool_call). Specialists retry transient provider errors twice; the orchestrator does not retry.

Publishing to Flower Hub (public, cannot be removed once published): sign in as the account named in publisher in pyproject.toml, then uv run flwr build, uv run flwr login supergrid, uv run flwr app publish .. Publish uploads every eligible file, tracked or not, after .gitignore is applied.

Accountability chain demo (HOA vendor payment)

Offline demos (no keys or network needed):

uv run hackathon keygen            # once; keys/ is gitignored
uv run hackathon demo              # signed golden / tampered / tampered-rehashed bundles
uv run hackathon verify demo/golden --pubkey demo/keys/demo-signer.pub
uv run hackathon chain-demo        # hash-chained events on a SIMULATED ledger (not Bitcoin)
uv run hackathon audit-chain demo/chain/golden
uv run hackathon approve-ui --approvers 2   # two board members approve the exact hash

Bitcoin Core regtest (private test chain you run yourself): see ansible/ and scripts/regtest_up.sh (copy ansible/inventory.example.ini to inventory.ini, which is gitignored), then uv run hackathon chain-demo --ledger bitcoin. The Bitcoin adapter has been exercised against a fake RPC; a live-node run is not yet confirmed. Use the simulated ledger otherwise and say so.

More: docs/DEMO_SCRIPT.md, docs/SUBMISSION.md, docs/TEAM_GIT.md, HANDOFF.md.

Claim boundaries

  • Makes unapproved or altered payments detectable; it does not prevent fraud and covers only payments routed through it.
  • Regtest is a private chain controlled by whoever runs the node: the record is tamper-evident against edits to the off-chain log, not neutral or independently verifiable.
  • Signing is local Ed25519 (not Sigstore/Cosign, no transparency log). Cryptographic behavior is internally tested; there is no third-party cryptographic verification, and the cryptography library used is not a FIPS 140-3 validated implementation.
  • The Auditor is an agent inside the system, not a third-party verifier.
  • Integrity proofs show origin, integrity and chronology of the record, not that an invoice or an agent's recommendation was correct.
  • Approver names are self-typed; policy limits and vendor lists are demo values.

Model choice and Endeavor

Set AGENT_MODEL to any model the endpoint serves. Flower's Endeavor 1.0 model is supported by configuration only (set AGENT_MODEL to its model string); it is not claimed in any demo until a live run on SuperGrid has confirmed it works with this app's tool-calling loop.

Team

Team Dusk, Flower Collaborative Agent Hackathon, Stanford, 29 Sep 2026: Louys Henderson (SenseBeen Technologies), Flavia Sparacino, Sid Senthilkumar.

License

Apache-2.0. See LICENSE.

About

Team Dusk: HOA payment accountability chain on Flower Agent (Flower hackathon, Stanford 2026)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages