| url4.ai | Spec GitHub OpenMined |
The url4 ProtocolA url4 encodes sources and a prompt in a single URL. Any AI that can fetch a URL can use it. No plugins, no integrations, no SDK. The protocol has three layers. The URL describes the query, services provide the data, and the synthesizer orchestrates everything. The only required parts are a ?q= parameter, sources and/or a prompt, and a ! between them. Everything else (weights, privacy budgets, nesting, timeouts, encoding, verification, async) is optional. A valid url4 can be as simple as url4.ai/v1/?q=react.dev!explain+hooks. |
AI client → fetches a URL, gets text back Services → thin wrappers around existing platforms, just answer questions Synthesizer → orchestrates map-reduce, enforces structured transparency |
|
Contents Part 1: The URL (MapReduce Query Language)
Part 2: Services (Mappers)
Part 3: Synthesizers (Reducers)
Part 1: The URL (MapReduce Query Language)Everything the AI needs is in the URL. Sources on the left, prompt on the right, separated by a bang. Anatomy |
| url4.ai/v1/?q=source1|source2!prompt+goes+here |
| url4.ai/v1/?q=react.dev|mdn.io!explain+useEffect |
| url4.ai/v1/?q=0.7*react.dev|0.3*stackoverflow.com!best+practices |
| url4.ai/v1/?q=!generate+a+random+number+between+1+and+100 |
| url4.ai/v1/?q=[site-a.com!ingredients]|[site-b.com!ingredients]!combine |
| url4.ai/v1/?q=0.5*alice.url4.ai~0.1|0.5*bob.url4.ai~0.1!best+movie+of+2025 |
|
This asks Alice and Bob equally (0.5*) but limits the unique information each can leak to epsilon 0.1 (~0.1). The weight says how much to rely on each. The epsilon says how much each is exposed. Epsilon also applies to bracketed groups. A bracket resolves into a single output, and that output becomes one source in the outer query. The ~ after a bracket caps how much unique information that group's output contributes to the outer aggregation. |
| url4.ai/v1/?q=[alice|bob|carol!movies]~0.1|imdb.com!recommend |
friends.list!best+movie+of+2025 → 667269656e64732e6c69737421626573742b6d6f7669652b6f662b32303235 |
| url4.ai/v1/?q=slack.url4.ai/key123/general|gmail.url4.ai/key456/inbox!summarize+this+week |
| slack.url4.ai/your-key/channel-name |
GET slack.url4.ai/key123/general?q=best+movie+of+2025
→ { "job": "s-789", "status": "pending", "poll": "slack.url4.ai/key123/jobs/s-789" }
|
GET url4.ai/v1/?q=friends.list!best+movies&wait=5s&collect=7d
→ { "result": "Based on 2 of 5 friends...",
"job": "abc123",
"poll": "url4.ai/v1/jobs/abc123",
"sources": { "resolved": 2, "pending": 3 } }
|
|
The first call waited 5 seconds, got 2 responses, and returned a partial result. The synthesizer keeps collecting in the background for up to 7 days. Calling the same URL again (or polling the job) returns an updated result as more friends respond. This means the same url4 can be called repeatedly and improve over time. The first fetch gives you what's available now. Later fetches incorporate sources that responded since. Job metadata can be transparent or opaque. In transparent mode, the caller sees which sources have responded and which are pending. In opaque mode, the caller sees only the count (2 of 5 resolved) without learning which 2. Some sources won't want to disclose that they participated at all. The synthesizer strips identifying information from job metadata when the sources or query require it. Security tiers Not all data needs the same protection. The protocol defines eight tiers, from fully open to mathematically private: 1. Public. Open web sources, no restrictions. The entire web is already here. 2. Unlisted. Secret URLs that aren't indexed or linked. Security through obscurity. Functional for many use cases. 3. Proxied. Access controlled through a relay. The relay can revoke access, throttle requests, and log usage. 4. Soft gate. Machine-readable signals (robots.txt, tdmrep.json) that request compliance. Not enforced, but respected by well-behaved agents. 5. Hard gate. A gatekeeper proxy that enforces policies before content reaches the AI. The gate checks the prompt, the co-sources, and the caller's identity, and can refuse. 6. Confidential. Multi-party computation in hardware enclaves. The data is processed but never exposed, even to the service operator. 7. End-to-end encrypted. CPU and GPU enclaves running open-source models. The query, the sources, and the result are encrypted in transit and at rest. Only the caller sees the answer. 8. Structured transparency. Differential privacy masks individual contributions. The aggregate answer is useful. The individual inputs are mathematically protected. These tiers are not mutually exclusive. A single url4 can combine sources at different tiers. The synthesizer handles the complexity. The URL stays simple. Structured transparency A protocol that touches private data needs rules that don't depend on goodwill. The url4 governance model builds on structured transparency, five properties that, taken together, make information flows governable. All five are enforced by the synthesizer, not by the services. A service just answers questions. The synthesizer guarantees the rules. Input privacy. Sources' raw data is never exposed to the querier. At basic tiers, active sources handle this themselves. They return answers, not data. At higher tiers, the synthesizer fetches passive sources inside a hardware enclave. Even the synthesizer operator can't see the raw inputs. Output privacy. Individual contributions are masked through differential privacy. The synthesizer adds calibrated noise to the aggregated result before returning it. The epsilon is specified in the URL. The answer is real. The individual inputs are mathematically protected. Input and output verification. How does the querier know the sources were real and the synthesis was honest? Verification comes in levels, and the protocol works at all of them: Level 0: No verification. The AI fetches a URL, gets text, uses it. No receipts, no proofs. This is what works today in Claude, ChatGPT, and Perplexity. The AI itself is the synthesizer, doing map-reduce in its context window. The entire public web is accessible at this level. Level 1: Self-reported receipts. The synthesizer records TLS certificate fingerprints and content hashes for each source it fetched. The receipt is a claim, auditable but not cryptographically provable. Better than nothing, costs nothing. Level 2: TLSNotary proofs. The synthesizer uses TLSNotary to produce cryptographic proof that it received specific content from a specific TLS server, without the server's cooperation. The fetch step is now provable. The processing step (aggregation, DP noise) is still trusted. Level 3: Enclave synthesis. The synthesizer runs inside a hardware enclave (TEE). Enclave attestation proves the code that fetched, aggregated, and noised the data is the published open-source code. Both fetch and processing are verified. The receipt is a full proof chain. These levels nest. A Level 3 synthesizer can call a Level 2 source that calls a Level 0 source. The receipt tree shows exactly where verification holds and where it drops to trust. Each node in the tree carries its own level of proof: |
receipt: {
synthesizer: "url4.ai" (Level 3, enclave attested)
sources: [
{ url: "alice.url4.ai" (Level 2, TLSNotary proof) }
{ url: "bob.url4.ai" (Level 2, TLSNotary proof) }
{ url: "imdb.com" (Level 0, no receipt) }
]
}
|
| url4.ai/v1/?q=react.dev|nextjs.org!you+are+a+React+expert.+review+my+code |
|
Swarm. Bracketed agents with different source sets, debating through an outer prompt. |
| url4.ai/v1/?q=[react.dev!review+as+React+expert]|[vue.org!review+as+Vue+expert]!synthesize+both+reviews |
|
Group avatar. Multiple weighted sources merged into a single voice. No one person's view dominates. The avatar represents the group. |
| url4.ai/v1/?q=0.3*alice.url4.ai|0.3*bob.url4.ai|0.4*carol.url4.ai!what+should+we+do+for+dinner |
|
Webpage. Sources grounding an AI that generates HTML. The output is a live page, synthesized from real sources. World. A generated page containing url4 links. Each link leads to another generated page. The result is a navigable space, built on-demand from real data. url4.ai GitHub · Attribution-Based Control · OpenMined |