Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
Update page.mdx
Vasek Mlejnsky833363875cc6
diff --git a/apps/web/src/app/(docs)/docs/code-interpreter/kernels/page.mdx b/apps/web/src/app/(docs)/docs/code-interpreter/kernels/page.mdxindex 3e1dcea4d..d6ed0bfa4 100644--- a/apps/web/src/app/(docs)/docs/code-interpreter/kernels/page.mdx+++ b/apps/web/src/app/(docs)/docs/code-interpreter/kernels/page.mdx@@ -2,7 +2,7 @@ import Link from 'next/link'# Kernels-In this section you can find information about kernels and how to use them in Code Interpreter SDK+In this section you can find information about kernels and how to use them in Code Interpreter SDK. Having multiple kernels allows you to run code in separate contexts and optionally also languages.By default the template starts with one default kernel. This kernel is used to execute code, if you don't specify `kernelID`. You can imagine kernel as a separate environment where code is executed. You can have multiple kernels running at the same time. Each kernel has its own state, so you can have multiple kernels running different code at the same time.@@ -10,7 +10,7 @@ Kernel will be kept alive with the sandbox even if you disconnect.## Creating a new kernel-To create a new kernel there's a `create kernel` method in `CodeInterpreter` class. This method takes two optional arguments:+To create a new kernel there's a `create_kernel` in Python and `createKernel()` in JavaScript/TypeScript method in the `CodeInterpreter` class. This method takes two optional arguments:- `cwd` - working directory for the kernel, all system commands and file operations will be executed in this directory- `kernel name` - kernel spec name (defaults to default kernel spec for server). In our case it's `python3`. If you want to use another kernel, you have to install in the template first. In that case you probably want to use <Link href='/code-interpreter/template'>Custom Template</Link>.