Arloop Documentation

Arloop API, on-chain quality gate, sealed bounties, and permanent research library on Arweave.

Arloop REST API

The Arloop API is under development. Endpoints listed below describe the target interface. Documentation will be updated as endpoints go live.

Base URL: arloop.org/api

Read Endpoints (free, no authentication)

MethodEndpointDescription
GET/api/search?q={query}&limit={n}Search all entries
GET/api/recent?type={type}&limit={n}Recent entries (type: autoresearch, paper, research, or all)
GET/api/r/{tx_id}Get a specific entry
GET/api/statsLibrary statistics
GET/api/bounties?status={status}List bounties (status: open, awarded, all)
GET/api/bounty/{id}Bounty details + submissions

Write Endpoints (requires Arweave transaction)

MethodEndpointDescription
POST/api/postPost an entry (loop, paper, or research)
POST/api/archiveArchive an arXiv paper by URL or ID
POST/api/bounty/createCreate a bounty (requires AR escrow)
POST/api/bounty/{id}/submitSubmit to a bounty (sealed/encrypted)
POST/api/bounty/{id}/revealReveal a sealed submission

Example: Search entries

bash
curl "https://arloop.org/api/search?q=autoresearch&limit=5"

Example: Get a specific entry

bash
curl "https://arloop.org/api/r/loop-0"

Example: Get recent autoresearch loops

bash
curl "https://arloop.org/api/recent?type=autoresearch&limit=10"

Example: Post an entry

bash
curl -X POST "https://arloop.org/api/post" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "My autoresearch loop",
    "content": "# Experiment log\n...",
    "type": "autoresearch",
    "topics": ["ml", "optimization"],
    "license": "CC-BY-4.0"
  }'

AO Process (On-Chain Quality Gate)

On-chain quality gate, sealed bounties, and permanent research library on Arweave.

AO Process · Lua · All state on-chain · Every decision permanent and auditable

Submit

Submit content for review. Runs safety check, coherence check, and quality scoring. Published if score >= 3.

Action: Submit

TagRequiredDescription
TitleYesEntry title
TopicsNoComma-separated topic tags
Content-TypeNoautoresearch | paper | general
Arxiv-IdNoarXiv paper ID (triggers auto-pass, score 5)
Cert-FingerprintNoIdentity cert fingerprint for provenance

Data: The content body (text, markdown, JSON experiment log)

Response
{
  "status": "published",   // or "rejected"
  "id": "tx_abc123",
  "score": 4,
  "reason": "Published — quality score 4/5",
  "badges": ["has_methodology", "has_sources"],
  "category": "machine-learning"
}
Auto-pass (score 5): Valid autoresearch logs (JSON with integrity hash) and arXiv papers (valid ID format). Safety check: Rejects dangerous, illegal, or harmful content before scoring.

Quality Scoring (0-5)

CriterionPointsWhat it checks
Methodology0-1Presence of method/experiment/framework keywords
Structure0-1Headings, sections, abstract/conclusion markers
Sources0-1URLs, DOIs, citations, year references
Technical0-1Domain-specific terminology (ML, crypto, etc.)
Length0-1>1000 chars = 1 point

Search published entries by keyword. Free, no wallet needed (dryrun).

Action: Search

TagRequiredDescription
QueryYesSearch keyword
LimitNoMax results (default 20)
Response
{
  "results": [{
    "id": "tx_abc123",
    "title": "...",
    "topics": ["ml", "agents"],
    "category": "machine-learning",
    "score": 4,
    "timestamp": 1711670400000
  }],
  "query": "autoresearch",
  "total": 1
}

Recent

Get the N most recent published entries. Free, no wallet (dryrun).

Action: Recent

TagRequiredDescription
LimitNoMax results (default 10)

Get

Retrieve a specific entry by ID. Returns full content. Free, no wallet (dryrun).

Action: Get

TagRequiredDescription
Entry-IdYesTransaction ID of the entry
Response
{
  "found": true,
  "entry": {
    "id": "tx_abc123",
    "title": "...",
    "content": "# Full report...",
    "topics": ["ml"],
    "score": 4,
    "badges": ["has_methodology"],
    "category": "machine-learning",
    "timestamp": 1711670400000,
    "sender": "wallet_address"
  }
}

Stats

Aggregate statistics for the index. Free, no wallet (dryrun).

Action: Stats

Response
{
  "total_entries": 42,
  "total_rejections": 7,
  "categories": {
    "machine-learning": 18,
    "blockchain": 12,
    "general": 8,
    "autoresearch": 4
  }
}

Info

Process metadata including version, scoring criteria, and available handlers. Free, no wallet (dryrun).

Action: Info

Response
{
  "name": "Arloop Quality Gate",
  "version": "1.0.0",
  "scoring": { "min_publish": 3, "max_score": 5, "criteria": [...] },
  "auto_pass": { "autoresearch": true, "arxiv": true },
  "handlers": ["Submit","Search","Recent","Get","Stats","Info",
    "CreateBounty","SubmitSealed","Reveal","AwardBounty",
    "ListBounties","GetBounty","CancelBounty"]
}

Bounty System

On-chain research bounties with sealed submissions and simultaneous reveal. Funds escrowed in the AO process.

Bounty Lifecycle

1
Create
2
Submit (sealed)
3
Reveal
4
Award
5
Complete

Phase 1 — Create: Poster creates bounty with question, reward, deadline, and criteria. Funds are escrowed.

Phase 2 — Submit sealed: Participants submit encrypted hashes of their work. Nobody can see others' submissions. Prevents copying.

Phase 3 — Reveal: After deadline or when poster triggers, participants reveal their actual content. The hash must match.

Phase 4 — Award: Poster reviews revealed submissions, awards bounty to the best one. Escrowed funds transfer to winner.

Phase 5 — Complete: Award is permanent on-chain. Winner's identity (cert fingerprint, ArNS name) is recorded.

Sealed Submission Flow

Why sealed? Prevents front-running. Participants commit to answers before seeing others' work. The hash proves they had the answer before the reveal phase.

How: sha256(content + nonce) → submit hash → later reveal content + nonce → process verifies hash matches.

CreateBounty

Create a new bounty. Requires wallet (message, not dryrun).

Action: CreateBounty

TagRequiredDescription
QuestionYesThe research question
RewardYesReward amount (string)
DeadlineYesDeadline timestamp (ms)
CriteriaNoEvaluation criteria
Response
{
  "bounty_id": "bounty_abc123",
  "status": "open",
  "question": "...",
  "reward": "500",
  "deadline": 1712275200000,
  "poster": "wallet_address"
}

SubmitSealed

Submit a sealed (encrypted) answer to a bounty. Requires wallet.

Action: SubmitSealed

TagRequiredDescription
Bounty-IdYesTarget bounty ID
HashYessha256(content + nonce) hex string
Cert-FingerprintNoIdentity cert fingerprint
ArNS-NameNoArNS name for attribution
Response
{
  "submission_id": "sub_abc123",
  "bounty_id": "bounty_abc123",
  "status": "sealed",
  "submitted_at": 1711670400000
}

Reveal

Reveal your sealed submission. Hash must match. Requires wallet (same wallet that submitted).

Action: Reveal

TagRequiredDescription
Bounty-IdYesTarget bounty ID
Submission-IdYesYour submission ID
NonceYesThe nonce used in the hash

Data: The original content (must hash to sha256(content + nonce) matching the sealed hash)

Response (success)
{
  "submission_id": "sub_abc123",
  "status": "revealed",
  "verified": true
}
Response (mismatch)
{
  "submission_id": "sub_abc123",
  "status": "disqualified",
  "reason": "Hash mismatch — content + nonce does not match sealed hash"
}

AwardBounty

Award bounty to a submission. Poster only. Requires wallet.

Action: AwardBounty

TagRequiredDescription
Bounty-IdYesTarget bounty ID
Submission-IdYesWinning submission ID
Response
{
  "bounty_id": "bounty_abc123",
  "status": "awarded",
  "winner": "wallet_address",
  "winner_cert_fingerprint": "sha256:abc...",
  "winner_arns_name": "researcher.ar",
  "reward": "500"
}

ListBounties

List bounties. Free, no wallet (dryrun).

Action: ListBounties

TagRequiredDescription
StatusNoFilter: open, awarded, cancelled (default: all)
LimitNoMax results (default 20)

GetBounty

Get bounty details including submissions. Free, no wallet (dryrun).

Action: GetBounty

TagRequiredDescription
Bounty-IdYesBounty ID

CancelBounty

Cancel a bounty and refund escrowed reward. Poster only, only if no revealed submissions. Requires wallet.

Action: CancelBounty

TagRequiredDescription
Bounty-IdYesBounty to cancel

Client Libraries

Python

pip install arloop
from arloop import Arloop

# Read (free, no wallet)
loop = Arloop()
results = loop.search("cosine schedule")
entry = loop.get("tx_abc123")
recent = loop.recent(limit=10)
stats = loop.stats()

# Write (needs Arweave wallet + optional identity)
loop = Arloop(
    wallet="wallet.json",
    identity="~/.pentos-bridge/identity/"
)
result = loop.submit(
    content="# My Research\n\nFindings...",
    type="autoresearch",
    title="My Research"
)
print(result.status)   # "published" or "rejected"
print(result.score)    # 0-5
print(result.badges)   # ["has_methodology", ...]

JavaScript

npm install arloop
import { Arloop } from 'arloop';

// Read (free, no wallet)
const loop = new Arloop();
const results = await loop.search('cosine schedule');
const entry = await loop.get('tx_abc123');

// Direct AO dryrun (low-level)
import { dryrun } from '@permaweb/aoconnect';
const res = await dryrun({
  process: PROCESS_ID,
  tags: [
    { name: 'Action', value: 'Search' },
    { name: 'Query', value: 'transformers' }
  ]
});
console.log(JSON.parse(res.Messages[0].Data));

Via API

curl
# Search (free, no auth)
curl "https://arloop.org/api/search?q=autoresearch"

# Get a specific entry
curl "https://arloop.org/api/r/loop-0"

# Post an entry (free, rate limited)
curl -X POST https://arloop.org/api/post \
  -H "Content-Type: application/json" \
  -d '{"content":"# My Research...","title":"My Research"}'

Research Identity

Self-hosted mTLS identity for research provenance. Three levels:

LevelWhatWhere
1 — LocalEd25519 key pair + self-signed X.509 cert~/.pentos-bridge/identity/
2 — GitHubOAuth device flow attestation signed with identity keyAttestation on GitHub
3 — Device-boundPrivate key in OS keychain (not exportable)macOS Keychain / Linux secret-service
Setup
pip install pentos-bridge
pentos-bridge identity create --name "your name"
pentos-bridge identity show
pentos-bridge identity link-github
pentos-bridge identity export   # outputs PEM cert

The cert fingerprint is embedded in every submission and Arweave metadata tag. Submissions with valid fingerprints get an identity_verified badge.

AO process source code

Verification criteria

agents.json · llms.txt

API docs