{"slug":"oip-example","title":"OIP Example Use Cases","body":"## What OIP Example Use Cases Are\n\nOIP stands for Object Invocation Protocol. It is a way to call specific actions or services. These actions are called \"objects.\" An object is like a small program or function. You can call these objects using a simple Uniform Resource Locator (URL). A URL is a web address that points to a resource on the internet. OIP makes it easy for any program to use these objects. It does not require a complex setup. Each time an object is called, OIP records it. This record is called an invocation. You get a receipt for every invocation. This article shows concrete examples of how OIP works.\n\n## Why This Build Cares About OIP Example Use Cases\n\nThe miscsubjects.com build uses OIP to make its internal functions available. These functions are the \"objects.\" They are stored as rows in a directory. This directory acts like a list of available services. By using OIP, miscsubjects.com allows different parts of its system to talk to each other. It also lets external systems interact with its services. This interaction happens through simple web calls. Every call is tracked. This tracking creates a clear history of all actions. This helps with auditing and understanding system behavior. For more details on how objects are structured, see /a/oip-object-model. For how dispatch works, see /a/oip-directory-dispatch.\n\n## How to See or Use It Live with curl\n\nYou can invoke OIP objects using `curl`. `curl` is a command-line tool for transferring data with URLs. The main way to invoke an object is through the `/api/dispatch` endpoint. An endpoint is a specific URL where an Application Programming Interface (API) can be accessed. An API is a set of rules that lets different software programs talk to each other. The miscsubjects.com server hosts these objects. A server is a computer program that provides data or services to other computer programs.\n\n### Example 1: Echoing a Message\n\nThis example invokes an object that simply returns the text you send it. This is like a \"hello world\" for OIP.\n\n```bash\ncurl -X POST https://miscsubjects.com/api/dispatch \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"key\":\"echo-message\", \"body\":\"Hello, OIP!\"}'\n```\n\nIn this command:\n*   `key` is the name of the object you want to invoke. Here, it's `echo-message`.\n*   `body` is the input data for the object. Here, it's the text `Hello, OIP!`.\n\nThe server will respond with a JSON (JavaScript Object Notation) object. JSON is a standard format for sending data. This response will include an `invocation_id`. This ID is your receipt number.\n\n```json\n{\n  \"invocation_id\": \"inv_xxxxxxxxxxxxxxxxxxxx\"\n}\n```\n\n### Example 2: Generating a Short Summary\n\nThis example invokes an object that takes a longer text and returns a summary. This shows OIP handling a more complex task.\n\n```bash\ncurl -X POST https://miscsubjects.com/api/dispatch \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"key\":\"generate-summary\", \"body\":\"The quick brown fox jumps over the lazy dog. This is a classic pangram used to display all letters of the alphabet. It is often used for typing tests and font demonstrations.\"}'\n```\n\nAgain, the server responds with an `invocation_id`.\n\n### Retrieving the Result (Receipt)\n\nAfter an invocation, you can check its status and result using the `invocation_id`. This is how you get your receipt.\n\n```bash\ncurl 'https://miscsubjects.com/api/dispatch?receipt=inv_xxxxxxxxxxxxxxxxxxxx'\n```\n\nReplace `inv_xxxxxxxxxxxxxxxxxxxx` with the actual `invocation_id` you received. The response will be a JSON object containing details of the invocation, including its output.\n\n## How It Relates to MCP\n\nOIP differs from the Model Context Protocol (MCP). MCP is an open standard. It lets an Artificial Intelligence (AI) model connect to an MCP server. This connection happens over a persistent session. The server then gives the model tools, resources, and prompts. The model can call these. MCP is NOT a content-management system. It focuses on a rich, session-based interaction for AI models.\n\nOIP, on the other hand, uses plain URLs and receipts. It has no persistent session. Any program that can open a URL can act using OIP. This makes OIP very simple and stateless. You make a call, you get a receipt, and the interaction is complete. There is no ongoing connection. This design makes OIP highly flexible and easy to integrate into many systems. For a deeper comparison, see /a/oip-mcp-comparison.\n\n## Where the Proof Lives\n\nEvery OIP invocation creates a record. These records are stored in an append-only ledger. An append-only ledger means new records are added to the end. Existing records cannot be changed or deleted. This creates an immutable history of all actions. Each record in the ledger has a unique `invocation_id`. This ID serves as your receipt. You can retrieve the full details of any invocation using its receipt ID. This ensures transparency and verifiability for every action taken through OIP. You can query the ledger for a specific receipt using the `/api/dispatch?receipt=inv_ID` route. For more information on the ledger and receipts, see /a/oip-ledger-receipts.\n## Latest clarity reviews (live)\n\nFresh models are sent this article's bundle and asked two separate questions: how clear is the machine JSON, and how clear is the English body. Scores are 0 to 10. The full history is in the append-only ledger.\n\n- 2026-07-03 03:11 · model `gemini/gemini-2.5-flash` · PASS · JSON 8/10 · English 9/10 · zero-context human 8/10\n\nHow the loop self-corrects: a failing review queues a model revision of this article (a new append-only version). A missing concept named by a reviewer queues a brand-new machine-written article, which then enters the same review cycle.","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"}}