{"slug":"oip-vs-webhooks","title":"OIP vs Webhooks","body":"## Introduction to OIP vs Webhooks\nOIP (Object Invocation Protocol) is a protocol specification that defines a mechanism for invoking objects and receiving receipts, whereas webhooks are a method for pushing notifications from a server to a client. The key difference between OIP and webhooks lies in their approach to communication: OIP is an invoke-based protocol, while webhooks are a push-based mechanism.\n## Invoke vs Push\nOIP operates on an invoke-based model, where a client invokes an object using a `POST /api/dispatch` request, and the server returns a receipt. In contrast, webhooks operate on a push-based model, where a server pushes notifications to a client without an explicit invocation. The OIP protocol ensures that every invocation appends to the ledger and returns a receipt at `/api/dispatch?receipt=inv_ID`, providing a clear record of all interactions.\n## Receipts and Delivery\nOIP receipts are a fundamental component of the protocol, providing proof of invocation and a record of the interaction. Webhooks, on the other hand, rely on delivery receipts, which only confirm that the notification was delivered, but do not provide a record of the interaction. The OIP receipt mechanism ensures that all interactions are recorded and can be replayed or repaired as needed.\n## Replay Semantics\nOIP's invoke-based model allows for replay semantics, where an invocation can be replayed to ensure consistency and accuracy. Webhooks, being push-based, do not provide a built-in mechanism for replaying notifications. The OIP protocol's replay semantics enable robust and reliable communication, ensuring that interactions are consistent and accurate.\n## Comparison to MCP\nWhen comparing OIP to MCP (Model Context Protocol), it is essential to consider the properties of each protocol. OIP provides a mechanism for invoking objects and receiving receipts, whereas MCP connects a model to a server that exposes tools, resources, and prompts over a session. The key difference between OIP and MCP lies in their scope: OIP focuses on object invocation and receipt management, while MCP focuses on model-server interaction.\n## Example Use Case\nTo demonstrate the difference between OIP and webhooks, consider a scenario where a client needs to invoke an object to perform a task. Using OIP, the client would send a `POST /api/dispatch` request, and the server would return a receipt. In contrast, using webhooks, the server would push a notification to the client without an explicit invocation.\n## Receipt Rule\nThe receipt rule for OIP states that every invocation must return a receipt at `/api/dispatch?receipt=inv_ID`, providing a clear record of the interaction.\n## Conformance Rule\nThe conformance rule for OIP states that all implementations must support the `POST /api/dispatch` request and return a receipt at `/api/dispatch?receipt=inv_ID`, ensuring consistency and accuracy across all interactions.","register":"oip_protocol","tags":["oip","object-invocation-protocol","protocol-specification","machine-native-json","dynamic"],"style":{"accent":"#16324f","measure":860},"claims":[{"id":"oip-c1","tier":"system","text":"The OIP article layer is generated from live directory rows, so it documents the objects that actually run the reference implementation.","who_claims":"system/oip_articles","source_ids":["oip-s3","oip-s4"]},{"id":"oip-c2","tier":"system","text":"The OIP operating path is caller to directory object to dispatch runner to invocation ledger to receipt.","who_claims":"system/oip_articles","source_ids":["oip-s1"]},{"id":"oip-c3","tier":"system","text":"Every executable capability in the reference implementation is reachable as an OIP object with a human article, a machine document, invocation history, and receipt path.","who_claims":"system/oip_articles","source_ids":["oip-s2","oip-s3"]},{"id":"oip-c4","tier":"system","text":"Tap & Go is the copy primitive: one drop carries credential, protocol, tree, search, execute, and receipt instructions without a separate token-map-bundle assembly step.","who_claims":"system/oip_articles","source_ids":["oip-s2"]},{"id":"oip-c5","tier":"system","text":"OIP receipts are the proof object for actions: they record request, response, actor, links, replay, repair, and lineage.","who_claims":"system/oip_articles","source_ids":["oip-s2","oip-s5"]}],"sources":[{"id":"oip-s1","type":"protocol","title":"BUILD_SPEC object invocation path","url":"https://miscsubjects.com/api/file/docs/BUILD_SPEC.md","summary":"Defines directory rows, dispatch, ledger, and the escalation path for changing the build.","quote":"Run anything: POST https://miscsubjects.com/api/dispatch {key, body}","claim_ids":["oip-c2"],"link_status":"ok","hash":"oipbuildspec0001"},{"id":"oip-s2","type":"protocol","title":"Object Invocation Protocol spec","url":"https://miscsubjects.com/api/file/docs/OIP.md","summary":"Defines OIP surfaces, invariant loop, receipt/replay/repair, and invocation envelopes.","quote":"identify, explain, invoke, ledger, yield","claim_ids":["oip-c3","oip-c4","oip-c5"],"link_status":"ok","hash":"oipspec00000002"},{"id":"oip-s3","type":"protocol","title":"Live OIP capability tree","url":"https://miscsubjects.com/api/dispatch?map=1&format=markdown","summary":"Public recursive capability tree.","quote":"root > shelf > system article > capability article > receipt","claim_ids":["oip-c1","oip-c3"],"link_status":"ok","hash":"oipmap0000000002"},{"id":"oip-s4","type":"protocol","title":"Directory row documentation","url":"https://miscsubjects.com/api/dispatch?key=OIP_TREE&format=markdown","summary":"Capability articles are generated from live rows.","quote":"Machine Contract","claim_ids":["oip-c1"],"link_status":"ok","hash":"oiprow0000000003"},{"id":"oip-s5","type":"protocol","title":"Invocation ledger","url":"https://miscsubjects.com/api/invocations","summary":"Append-only invocation records and receipt links.","quote":"invocations","claim_ids":["oip-c5"],"link_status":"ok","hash":"oipinvocations0005"}],"prov":{"model":"system/oip_articles","action":"generate"}}