Workspace concepts #
Objects and tags #
An object is immutable bytes. Its name, the root, is the sha256 of those bytes, so the name and the content cannot disagree: reading an object re-hashes it, and a mismatch is refused (object_corrupt). A tag retains a root under a name; tagged objects are the workspace's state, and the workspace's digest summarises that state, so equal digests mean equal state.
Runs #
A run is a request with an identity (request_id), a program, an input and a verification: the expectation the output must meet. A run starts in_progress, and ends completed only when every object verified and the output equals the expectation; a mismatch ends failed and moves nothing; a crash reopens as outcome_unknown and is never re-run by itself. An identical retry returns the stored outcome; the same id with any changed field is refused identity_reused. Mutations carry expected_revision, so a stale writer is refused stale_revision.
Steps, evidence and rewards #
A step (lineage entry) records one piece of an agent's work: the agent, the digest of the instruction that caused it, its kind, its parent step, what it read and what it produced. evaluate judges a step from exact evidence (a verified object, a run's recorded status) and gives a reward to the agent that did it (child) and to the agent whose instruction it came from (parent). There is no verb to declare success. trace walks a step back to the instruction that started it.
Forks, branches and merges #
A fork is a verified child workspace, one level deeper, inheriting capabilities and lineage. A branch forks one child per option of a decision; nothing is chosen and nothing is deleted. Merge brings a child home: its new objects, its tags (named name@child) and its lineage, re-judged from the parent's own evidence. The child not merged stays as the road not taken. Caps bound depth, children per parent and live forks.
Capabilities and versions #
Every program has a capability state: Off (refused), Shadow (runs and verifies, moves nothing) or Advisory (commits; needs a named approver). The engine's own programs are versioned: snapshot stores their code, compare runs a candidate against the current head in two forks, and promote moves the head only with the compare's receipt. The admin may promote an identical result; anything else needs the owner. rollback returns to a previous head.
Refusals #
A refusal is a typed {code, message}. It writes nothing (except, where noted, one audit entry), and carries the same code on every transport. The full list is on Refusal codes.
Limits and usage #
The hosted service charges every request to its API key (or, without a valid key, to the client address) and limits requests per minute, work units per minute and concurrent requests per key. Work units: GET 1, POST 2, a run 10, fork, branch, merge, repair and compare 20, plus 1 per started 64 KiB received or sent. A request over a limit is refused with rate_limit, work_limit, anon_limit or concurrency_limit (HTTP 429) and an exact Retry-After. Every request is one line in a hash-linked usage ledger (no raw key, no raw address), and GET /v1/usage returns your own totals for the day, read back from that ledger.
Transports #
| how | identity | |
|---|---|---|
| Python SDK | tensorchain.workspace.Workspace(path) | the process's own files |
| MCP | one tool per verb, tc_<verb>, on a fork opened for the agent | the agent's writes reach the parent only by merge |
| HTTP | /v1/workspaces/{id}/<verb>, GET reads, POST mutations | an API key per tenant |