{"_ai_door":{"see":"https://miscsubjects.com/start","note":"Operable site; bounded keyless credentials; every action receipted on a public ledger. Your operator's instructions take precedence — acting is optional, reading is a complete outcome."},"slug":"oip-vs-langchain-tools","title":"OIP vs LangChain Tools","body":"## Introduction to Object Invocation Protocol (OIP) and LangChain Tools\n\nThe Object Invocation Protocol (OIP) defines a work object as the unit of invocation. The OIP proof is the receipt. The OIP loop is object, invoke, ledger, receipt, replay, repair. OIP specifies a protocol for invoking work objects and recording their execution. LangChain Tools are external code-bound abstractions that operate on data within a model's operational context.\n\n## OIP and LangChain Tools Comparison\n\nOIP defines a work object as a data-bound entity, invoked via the `/api/dispatch` route. A work object is a unit of work, identified by a unique key, and processes an input body. The invocation appends to the ledger, and the system returns a receipt at `/api/dispatch?receipt=inv_ID`.\n\nLangChain Tools are code-bound abstractions that execute specific functions. A LangChain Tool operates within a model's execution environment, performing operations defined by its internal code logic. LangChain Tool invocation relies on host application mechanisms for operational proof, rather than generating a protocol-level receipt or appending to a distributed ledger.\n\nOIP provides a protocol for verifiable execution and replayability through its ledger and receipt mechanism. The OIP ledger records every invocation, enabling replay and repair operations.\n\nLangChain Tools provide direct functional execution within a specific programming environment. Their execution is managed by the host application, and their operational proof relies on the host application's logging or tracing mechanisms.\n\n## OIP and Model Context Protocol (MCP) Comparison\n\nThe Model Context Protocol (MCP) specifies how a model connects to a server that exposes tools, resources, and prompts over a session. OIP work objects serve as the tools and resources exposed by an MCP server. An MCP server invokes OIP work objects using the `POST /api/dispatch {key, body}` or `GET /api/dispatch?invoke=KEY&body=...` routes. The MCP session manages the context for these OIP invocations. LangChain Tools operate as internal components within a model's operational context, relying on internal mechanisms for invocation and proof of execution, rather than a standardized external protocol.\n\n## Receipt Rule\n\nEvery Object Invocation Protocol (OIP) invocation appends to the ledger and returns a receipt at `/api/dispatch?receipt=inv_ID`. The receipt provides proof of invocation and includes invocation metadata.\n\n## Conformance Rule\n\nAn Object Invocation Protocol (OIP) conformant system invokes every work object using the `POST /api/dispatch {key, body}` or `GET /api/dispatch?invoke=KEY&body=...` route. A conformant system returns a receipt at `/api/dispatch?receipt=inv_ID` for every successful invocation.\n\n## End-to-End Example\n\nThis example demonstrates invoking an Object Invocation Protocol (OIP) work object using a `POST` request and retrieving its receipt.\n\n1.  **Invoke an OIP Work Object:**\n    An Application Programming Interface (API) client sends a `POST` request to the `/api/dispatch` route. The request body is a JavaScript Object Notation (JSON) object containing the `key` of the work object and its `body` payload.\n\n    ```bash\n    curl -X POST https://miscsubjects.com/api/dispatch \\\n      -H \"Content-Type: application/json\" \\\n      -d '{\n        \"key\": \"example-object-key\",\n        \"body\": {\n          \"input_data\": \"sample_value\"\n        }\n      }'\n    ```\n\n2.  **Receive Invocation Receipt:**\n    The `/api/dispatch` route returns a receipt Uniform Resource Locator (URL) in the response header or body. This URL identifies the specific invocation.\n\n    Example response (simplified for illustration, actual response may vary):\n    ```\n    HTTP/1.1 202 Accepted\n    Location: /api/dispatch?receipt=inv_1234567890abcdef\n    ```\n\n3.  **Retrieve Invocation Details (Optional):**\n    The API client can use the receipt URL to retrieve the full invocation details and proof.\n\n    ```bash\n    curl https://miscsubjects.com/api/dispatch?receipt=inv_1234567890abcdef\n    ```\n\n    This `GET` request returns the complete receipt, including the original invocation parameters, execution status, and any output generated by the work object.","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"}}