The Oda SDK lets a program of yours drive DataMind Oda from outside the app: its client starts an Oda runtime and talks to it over standard input and output, so the work runs out of process. Use it when a script or an internal tool of yours, rather than a person in the app, should start the work and follow it.
The SDK comes in three parts. A common reading order is: this page, then the client guide, then the wire protocol, then the runtime server page.
| Part | What it is |
|---|---|
| Wire protocol | The newline-delimited JSON-RPC connection between a client and a runtime: every message, its payload, the error codes and the limits. |
| Client library | The TypeScript package that starts the runtime for you and drives its turns from your program. |
| Runtime server | The serving side: it serves one client over standard input and output and keeps one agent per session id. |
Where to go next depends on your side of the connection:
sdk profile and applies your configuration patch files in the order you list them. The profiles Oda ships are listed on Oda profiles and launchers.The two sides exchange one JSON-RPC 2.0 message per line. Three requests and four notifications:
| Message | Kind | What it does |
|---|---|---|
initialize | Request | Sets up the connection and resolves the model route. |
session/ | Request | Queues one user message and returns its receipt (messageId) immediately. |
shutdown | Request | Flushes what the runtime has written, winds its work down and exits. |
session. | Notification | A session event, as it is appended. |
session. | Notification | The whole agent's status: running or idle. |
subagent. | Notification | A sub-agent session started, with its parent lineage. |
subagent. | Notification | A sub-agent run finished; sent only for runs in the same process. |
The full list is on The Oda SDK wire protocol.
It depends on your side of the connection. To drive Oda from a TypeScript program, use The Oda SDK client. To build a client of your own or read the messages, use The Oda SDK wire protocol. To serve clients from a runtime you run yourself, read Running an Oda runtime server.
Yes. The connection is newline-delimited JSON-RPC over standard input and output, and nothing about it is specific to TypeScript: implement the messages and you have a client. The Oda SDK wire protocol documents every message, and the TypeScript client is one implementation of it.
The client does. It starts the runtime for you, the first time it is needed, and keeps it for later runs; you never launch the runtime by hand.
No. The runtime is a process of its own and the client talks to it over standard input and output. The app window is not involved.
The runtime a client starts is a complete Oda runtime, so an SDK session works like any other Oda session. The connection changes how the work is started and followed, not what Oda can do.
No. The client speaks it for you: you send prompts and follow the events. Read The Oda SDK wire protocol when you build a client of your own, read a trace, or debug a message.
Start where it failed. Failures on the client side, such as a timeout or a client that is closed, are on The Oda SDK client. Message-level failures, such as an unknown method or a route that could not be resolved, are on The Oda SDK wire protocol. Refusals the runtime itself reports are on Running an Oda runtime server.