Any library, one runtime¶
Xratu does not have a preferred agent framework, and it does not ask you to adopt one. A reusable capability block is ordinary Python written against whatever library suits the job: a retrieval library, an agent framework, a vendor SDK, a database driver, plain HTTP. Xratu runs it as it is.
This is not an integration list. No library reaches the platform's contracts, and the platform never learns which library it is running, because of four structural choices: dependencies are declared per block, each block executes in its own cell, only typed values cross a cell boundary, and framework execution is normalised inside the capsule that owns it.
flowchart LR
C1["Capsule A<br/>framework A + closure A"] --> CELL1["Cell A"]
C2["Capsule B<br/>framework B + closure B"] --> CELL2["Cell B"]
CELL1 --> ABI["typed kernel ABI<br/>values, streams, handles"]
CELL2 --> ABI
ABI --> K["one kernel runtime<br/>authority + enforcement + evidence"]
CELL1 -. "no live framework objects" .-> CELL2
Only the typed ABI is shared. Dependencies, native loaders, framework globals, and live objects remain in the cell that owns them.
Why frameworks normally leak into the platform¶
Runtimes lose neutrality in predictable ways. They install one dependency set for the whole process, so two libraries cannot disagree about a version. They pass library objects across their own internal boundaries, so the boundary inherits the library's object model. They add verbs for the framework they were built against, so that framework becomes the one that works properly. Or they serialise whatever the framework returns and call it an interface, which means the interface changes when the framework does.
One: dependencies are declared per block, not per project¶
A block declares what it needs on itself. The declaration is attached to the function or class, and it carries that block's own requirements, its operating system packages, its non-secret environment keys and, separately, the names of the secrets it must be given. Grouping blocks into a shared environment is not part of the authoring surface at all, so there is nothing to get wrong.
Two blocks in the same workflow, written against different libraries, declare independently:
from sdk import xratu, xratu_auth
import stripe
@xratu(["stripe>=8.0"])
@xratu_auth(requires=["stripe.secret_key"])
def refund(customer_id: str, amount: float) -> dict:
"""Issue a refund against a customer's most recent charge."""
return stripe.Refund.create(customer=customer_id, amount=int(amount * 100))
from sdk import xratu
from llama_index.core import VectorStoreIndex
@xratu(["llama-index-core>=0.11"])
def retrieve(query: str, k: int = 5) -> list[str]:
hits = index.as_retriever(similarity_top_k=k).retrieve(query)
return [node.get_content() for node in hits]
Each block's declared requirements are resolved into its own immutable dependency closure. Compatible component bytes are deduplicated underneath that boundary, so two blocks that happen to need the same version do not pay for it twice, but neither block inherits anything from the other and neither inherits from the runtime foundation it runs on. A block that needs an older release of a library composes in the same workflow as a block that needs a newer one. See Per-block dependency intent and Conflicting versions.
Two: each block executes in its own cell¶
A cell is a physical execution and failure domain. The production baseline is a Linux process, and lower-isolation backends exist only as certified optimisations that must prove the same semantics. Each cell gets its own import view and its own native loader view, built from the resolved closure for the block that owns it.
Two consequences follow, and both are what neutrality rests on. A library's global state, its interpreter-level configuration and its native extensions are confined to the cell that loaded them. And a library that crashes, hangs or exhausts memory takes down a failure domain rather than the runtime. See Cells, containment and placement and Dependency isolation.
Three: live objects never cross, typed values do¶
This is the choice that keeps library object models out of the platform.
Live resources stay in the cell that owns them. A caller that needs to keep using one receives a local, rights-bearing handle rather than the object itself. What actually crosses a cell boundary is a typed value, a stream, a buffer, an artifact reference or a handle. Pickled Python objects, arbitrary interpreter objects, proxy object graphs and library-native response types are explicitly not the kernel ABI.
A block therefore exports a typed interface, and that interface is not a live Python object. The cross-language source of truth is a neutral interface schema, not a Python dataclass or a Pydantic model, and language bindings are generated from the schema. This is why a caller in another language, or another library, can invoke the block without importing anything the block imports. See Typed interface, not a live object and What is not the kernel ABI.
Where a library has semantics that do not map cleanly onto typed values, the adaptation is written once as a sealed adapter inside the capsule that owns the block. The adapter is reviewed and sealed with the bytes it adapts, so library-specific behaviour is a property of the artifact rather than a special case in the runtime. See Sealed adapters and library-specific semantics.
Four: framework execution is normalised at the Run boundary¶
Blocks that run long, stream output or emit progress raise a harder version of the same problem. A framework has its own execution loop, its own event types, its own response objects and its own streaming API, and application code that consumes them is coupled to that framework for good.
Xratu puts an adapter inside the capsule. It invokes the framework-native code and translates what comes back into a fixed set of contracts: a final response, response chunks, execution events, control operations, checkpoints and faults. The kernel owns Run identity, authority, lifecycle, response delivery, stream lifecycle, event subscription, steering admission, pause and cancellation state, persistence, recovery and evidence. It does not own framework semantics, planning, graph interpretation, model behaviour, response synthesis or tool selection.
The practical effect is that the code calling a target does not import the framework that implements it and never receives its native objects. The same call works whether the target is a one-shot block, an agent, a workflow or a custom controller. See The Application Run Boundary and Run adapters.
The contracts an adapter translates into are fixed:
RunResponse the final declared response
RunResponseChunk user-visible streamed output
RunEvent declared execution events
RunControlCapability steering, pause, cancel, terminate
RunCheckpoint proposed continuation state
RunFault terminal failure
Underneath, the guest side of execution is a runtime provider, reached over a language-neutral provider protocol with an explicit capability negotiation:
text
ProviderCapabilities {
protocol_version
provider_kind
provider_version
supports_resources
supports_streams
supports_buffers
supports_cooperative_interrupt
supports_certified_interrupt
supports_quiesce
concurrency_model
supported_value_plane_versions
supported_buffer_formats
maximum_inline_value_size
} The
CPython provider runs as an untrusted process that owns interpreter
initialisation, interpreter thread state and the FFI edge; the nucleus never
loads guest-native code. Providers for other languages slot in at the same
protocol boundary. See
Runtime providers.
What "one runtime" means¶
The runtime is the part you do not author.
A runtime foundation is the execution substrate: the immutable base a project runs on, independent of every block that runs above it. The kernel image is the base every project runtime is built from, and the data plane owns composing the final project runtime image on top of it. The kernel inside that runtime is the same kernel regardless of which libraries the project's blocks use, and it dispatches through one typed ABI with no dynamic compatibility lane. See Runtime foundation and No dynamic compatibility lane in v1.
So: many libraries, each sealed in its own capsule with its own closure, running in its own cell, over one runtime and one set of contracts.
What framework neutrality is not¶
It is not a promise that framework objects are portable. They are not. A native response object is meaningful only inside the cell that produced it. What is portable is the typed value the adapter returns.
It is not framework support in the kernel. The kernel grows no verbs for any framework, and a dispatch frame carries no library name that could be used to select behaviour. If a framework needs special handling, that handling lives in a sealed adapter, not in the runtime.
It is not transparency of framework internals. A framework's internal steps, prompts and reasoning are private to the cell unless the adapter declares them as execution events. Raw hidden model reasoning is not a kernel contract. See Framework privacy.
It is not automatic interoperability of meaning. Two agent frameworks can run in the same workflow and exchange typed values, but the workflow author still declares how their outputs relate. Xratu removes the packaging problem, not the design problem. See Mixing agent frameworks in one workflow.
What you can rely on¶
- A block written against any supported library is publishable, governable and reusable on the same terms as any other block.
- Two blocks with incompatible dependency versions compose in one workflow.
- A block is invocable from a workflow, an agent, another block, an application service or the CLI without any of them importing its library. See One block, five callers.
- Replacing a block's internal library is a new version of that block, not a change to the workflow, the policy or the runtime.
Related¶
- Any Python library for the authoring view of the same guarantee.
- Beyond Python for how other languages enter the model.
- Language and framework neutrality for the kernel-internal argument.
- Cross-library composition for composing blocks from different libraries.