Swarmauri notebook-orchestration tool for starting Jupyter kernels programmatically with jupyter_client.
Project description
Swarmauri Tool Jupyter Start Kernel
swarmauri_tool_jupyterstartkernel is a Swarmauri notebook-orchestration tool
for starting a Jupyter kernel programmatically through jupyter_client. It is
useful for notebook automation, code-execution workflows, agent-controlled
kernel sessions, and CI flows that need a fresh kernel before running cells.
Why Use Swarmauri Tool Jupyter Start Kernel
- Start isolated Jupyter kernels inside Swarmauri workflows.
- Acquire a kernel ID programmatically for downstream notebook tooling.
- Prepare execution environments for cell-running and notebook-conversion tools.
- Keep kernel lifecycle control behind a reusable Swarmauri tool interface.
FAQ
What inputs does the tool accept?
kernel_nameand an optionalkernel_specdictionary.
What does the tool return on success?
A dictionary containingkernel_nameandkernel_id.
Does the tool expose the running
KernelManager?
Yes. The instance stores the active manager and exposes it throughget_kernel_manager().
How are startup failures reported?
The tool returns{"error": ...}if the kernel cannot be started.
Features
- Swarmauri
ToolBaseimplementation registered asJupyterStartKernelTool. - Starts Jupyter kernels by kernel name, defaulting to
python3. - Stores the active
KernelManagerfor follow-on interactions. - Returns simple, orchestration-friendly kernel identity metadata.
- Supports Python 3.10, 3.11, 3.12, 3.13, and 3.14.
Installation
uv add swarmauri_tool_jupyterstartkernel
pip install swarmauri_tool_jupyterstartkernel
Usage
from swarmauri_tool_jupyterstartkernel import JupyterStartKernelTool
tool = JupyterStartKernelTool()
result = tool(kernel_name="python3")
print(result)
Examples
Start a default Python kernel
from swarmauri_tool_jupyterstartkernel import JupyterStartKernelTool
tool = JupyterStartKernelTool()
result = tool()
print(result["kernel_id"])
Start a kernel and keep the manager reference
from swarmauri_tool_jupyterstartkernel import JupyterStartKernelTool
tool = JupyterStartKernelTool()
result = tool("python3")
manager = tool.get_kernel_manager()
print(result, manager)
Register the tool in a Swarmauri collection
from swarmauri_standard.tools.ToolCollection import ToolCollection
from swarmauri_tool_jupyterstartkernel import JupyterStartKernelTool
tools = ToolCollection(tools=[JupyterStartKernelTool()])
print(tools)
Related Packages
- swarmauri_tool_jupytershutdownkernel
- swarmauri_tool_jupyterexecutecell
- swarmauri_tool_jupyterruncell
- swarmauri_tool_jupyterclearoutput
Swarmauri Foundations
More Documentation
Best Practices
- Ensure the requested kernelspec exists before starting automation flows.
- Shut down kernels explicitly after use to avoid orphaned processes.
- Keep per-task kernels isolated when multiple workflows run concurrently.
- Store the returned kernel ID if other tools need to interact with the same session later.
License
This project is licensed under the Apache-2.0 License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file swarmauri_tool_jupyterstartkernel-0.11.0.dev1.tar.gz.
File metadata
- Download URL: swarmauri_tool_jupyterstartkernel-0.11.0.dev1.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26316c491f20cf47ab32476b5480df4d6b0045ee3e3d5cb15cca90471fe5f26d
|
|
| MD5 |
a5567f872c10bb7ac3d8b797e577eb43
|
|
| BLAKE2b-256 |
eeb7a446ee68f75a3c62b4ca58a9ac7d5043d46ff7ebf95359f4063a7f525ab7
|
File details
Details for the file swarmauri_tool_jupyterstartkernel-0.11.0.dev1-py3-none-any.whl.
File metadata
- Download URL: swarmauri_tool_jupyterstartkernel-0.11.0.dev1-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a7c596026f6b9f97dd85ad47ff3f321aabdb032ea9d3f7b3770094efef71eaa
|
|
| MD5 |
e0bab983ab770e39d4419929394bb6ca
|
|
| BLAKE2b-256 |
a40ad9c8d7fb0e36c1684d8661d8405ac139bac61bcf92b33128e0c228ae0e7d
|