Kernel
A kernel is the sandboxed Linux environment an agent runs Python and shell commands in; the Kernel page reads "Create and manage the execution environments your agents use." Read this if your agents run code (a specialist cannot be activated without a kernel) or if you build the custom image a kernel runs.
Before you start: "Execution is sandboxed on AWS Lambda in your account", so kernels count against that account's AWS Lambda quotas; a new account starts with reduced quotas, so request an increase if provisioning fails on one. "Kernels carry no variables or secrets. Use Data Bridge for credentials and connections." To build a custom image, see Build a custom kernel image.
Prebuilt or custom image
Two prebuilt images ship with Studio. Choose one unless you need something neither has.
- AlphaAgent Python: "Python 3.12 with numpy, pandas, pyarrow, scipy, scikit-learn, statsmodels, matplotlib, seaborn, plotly, yfinance, sqlalchemy, psycopg2 (PostgreSQL), pymysql (MySQL), snowflake-connector-python (Snowflake), httpx, requests, pytz, boto3, and fastmcp (MCP client)."
- AlphaAgent Python and Java: "Everything in AlphaAgent Python, plus a Java 21 runtime and JPype so Python code can call Java libraries. A sample JAR is at /opt/alphaagent/java/alphaagent-sample.jar." Choose it when your agents call Java libraries, such as a pricing library, from Python. Your own JARs are not in it: build a custom image on top of it (Add Java libraries). It has the same limits as AlphaAgent Python, including the 900-second execution limit.
Choose a Custom image when agents need a Python package, a Java library or a tool neither prebuilt image has: agents cannot install packages while they run. You build it on top of AlphaAgent Python or AlphaAgent Python and Java, adding only your own libraries, and push it to your deployment's environment repository in Amazon Elastic Container Registry (ECR), alphaagent-envs. The steps, the AWS permissions and the checks are on Build a custom kernel image. The form says "Use a Linux Python image with the AlphaAgent execution handler, then push it to your deployment’s ECR repository." and "Windows, PowerShell-only and non-Python images are not supported."; its Build and push instructions opens this page.
The server refuses an image, with the reason shown under the form, when it is outside the deployment's repository; when it is not Linux amd64 with Python ("Linux-based (Python) images only."); when it is a multi-platform or attestation manifest ("Build with --platform linux/amd64 --provenance=false --sbom=false."); or when it is over 4.0 GB compressed, as ECR reports it ("environments accept images up to 4.0 GB"). Studio pins the image by digest when it provisions (Image digest (pinned at provision)), so moving a tag afterwards changes nothing.
Create a kernel
- Open Kernel in the Dock and click Create kernel in the Action Bar. The form is headed Create kernel.
- Under Identity, enter a Name (required, up to 80 characters) and a Description (up to 500).
- Under Container image, choose the Image source. Prebuilt offers Prebuilt kernel, with the chosen image's description below. Custom image lists the repository's images in Image URI as
repository:tag (size MB), with a count such as "3 images available."; when none are listed the field takes a tag,repository:tagorrepository@sha256:<digest>from that repository. Refresh images reads the repository again. - Under Resource budget, set Memory (MB) (1,769 to 3,008, default 2,048) and read vCPU (derived) ("Calculated from memory: 1 vCPU per 1769 MB."). Set Execution timeout (seconds) (1 to 900, default 900) and Workspace storage (MB) (512 to 3,008, default 512). A value out of range moves to the nearest limit when you leave the field. "Runs that exceed the timeout fail with the limit named."
- Click Create kernel (Creating kernel…). The Kernel list opens, the new row reading Creating….
- Wait for Active, then set the kernel on an agent version (Agents: configure and activate).
For example: "Risk Analytics Python" on AlphaAgent Python with 3,008 MB of memory, for agents that compute realised volatility and value at risk (VaR) for the daily risk pack.
Status and provisioning
| Status | Meaning |
|---|---|
| Creating… | Studio is provisioning the function from the image and running the handler contract probe; up to 15 minutes. The list and the kernel's page refresh every 30 seconds while the tab is visible. |
| Active | The probe passed; agents can use it. |
| Needs attention | Provisioning failed. The banner names the reason ("This kernel needs attention before it can run." when there is none): "Fix anything named above, then provision it. Provision also retries a failed attempt." Click Provision. |
| Needs provisioning | "This kernel has not been provisioned yet.", for example a copy taken from an Organisation Library without provisioning. Click Provision. |
| Inactive | Switched off. |
In a governed deployment the banner adds "Anyone assigned to this governed deployment can provision it; the kernel is shared by everyone here."
The probe runs the image once and asks it to describe its capabilities. Reasons the banner can name: "The image does not implement the AlphaAgent handler contract: <error>." (check awslambdaric and boto3 in the image); "Contract probe timed out" and "Provisioning did not finish within 15 minutes" (both end "Provision to retry"); "Handler delivery update failed: <reason>" (usually a missing permission in your account).
Studio delivers the execution handler at run time rather than relying on the copy in the image. Every Studio upgrade points every kernel at the release's handler and probes it again, so each kernel shows Creating… and returns to Active on its own, prebuilt and custom alike, and a custom image is not rebuilt for a handler fix. An agent that runs code before its kernel is Active stops with an error naming the state; there is no fallback kernel.
Timeouts, working directory and storage
- Execution timeout applies to each run of code. A quarter of the remaining time, at least 5 and at most 60 seconds, is kept back for saving results; at the limit the code is stopped and the agent reports "(the code was stopped after
<budget>s;<reserve>s of the limit is reserved for saving results)" with what was printed. Long work is not lost: the checkpoint helperaa_env.pylets an analysis write its progress to the workspace and stop, and the agent resumes from it in a fresh run, on any image. - One piece of analysis the coder carries out for an agent has its own budget of working time (the clock stops while it waits for your approval), tokens and code executions (Limits and quotas). At any of them the coder stops and the analysis ends partial; the agent is told which limit was reached and reports the work as partial.
- Every run gets a fresh working directory under
/tmp: the project files it needs are copied in from the workspace, changed files are uploaded back, and the directory is removed. Nothing left on local disk is seen by a later run, another agent or another user, and each agent has its own home directory. Agents do not install packages at run time: what the code can import is what the kernel's image carries, so a missing package means a custom image. - Workspace storage is that scratch disk: you enter 512 to 3,008 MB and Studio provisions at least 2,048 MB whatever you enter, because the toolkit and a real workspace need it.
- Outbound network from the sandbox is TCP 443, through the deployment's egress (AlphaAgent's NAT gateway or your firewall). On a private deployment the sandbox also reaches the internal service ranges an administrator approved, on port 443 and on the approved ports (for example 5432 for PostgreSQL), and nothing else on your network (Data Bridge).
- When an administrator adds your own certificate authorities to the deployment, code in every kernel trusts them for HTTPS, PostgreSQL, MySQL, Node and curl, as well as the public ones. A custom image needs the
opensslcommand line for PostgreSQL, Node and curl to trust an issuing CA added without its root.
The kernel page
Click a row on the Kernel list (/kernel/view/<kernel id>). The Action Bar offers Refresh kernel, Share, Provision (when the kernel needs it) and Delete.
| Section | Shows |
|---|---|
| Kernel details | Kernel name, Kernel ID, Status, Default kernel (Yes or No), Description. |
| Container image | Image source, Image URI, Image digest (pinned at provision), Resolved runtime image, and Handler contract probe: Passed or Failed with the toolkit version and time. "The image’s toolkit is behind the current handler. Rebuild from the guide’s handler.py to pick up fixes." means a custom image is due a rebuild. |
| Resource budget | Memory (MB), vCPU, Timeout (seconds), Max workspace storage (MB). |
| Record details | Created, Last updated, Network policy. |
| Kernel map | Once Active: "Agents using this kernel. Disassociate them before deletion; re-associate to restore their access." Each agent card shows its ID and Associated or Disassociated. With none: "No agents currently use this kernel." |
Disassociate and re-associate agents
- On the Kernel map, click Disassociate all. Disassociate all agents lists them: "Every agent using Risk Analytics Python stops using it until you re-associate them. If an active Flow uses one of these agents, the change is blocked and the reason is shown."
- Click Disassociate all. The cards read Disassociated.
- To bring them back, click Re-associate all.
While an active Flow version runs one of those agents, the server refuses and nothing changes: deactivate that Flow, or activate a Flow version that does not use the agent, then try again. A refusal shows the server's reason, or "Disassociate All did not go through. Nothing was changed."
Change a kernel's image
A kernel cannot be edited: it keeps the image it was provisioned with, pinned by digest. To move agents to a new image, create a new kernel from it, then for each agent create a new version, set the new kernel on it and activate it (Agents: configure and activate). Delete the old kernel once its Kernel map shows no agents. The steps for a custom image are in Update the image.
Delete a kernel
- Click Delete. It reads Checking… while Studio looks for agents that use the kernel.
- If any do, Cannot delete kernel lists them: "Disassociate them from the Kernel map first. If an active Flow uses one of these agents, deactivate that Flow or activate a version without that agent before retrying." Click Close.
- Otherwise Delete kernel asks for the name: type it in Kernel name and click Delete kernel. The Kernel list opens.
If Studio cannot check, it stops with "Couldn’t check which agents use this kernel. Try again." The server checks again and refuses with its own reason under "Couldn’t delete kernel": "<kernel> is used by 3 agents: A, B, C. Move them to another environment first." or, for the deployment's default kernel, "This is the deployment's default environment and cannot be deleted." Deleting a kernel also removes its function.
Share a kernel
Share opens Share to Organisation Library with no version to choose: pick an Organisation Library and click Share to Org Library. The copy carries the image reference and the resource budget, nothing else. Whoever takes it can tick Provision now ("Provisioning builds and starts the runtime image after the copy arrives. If you leave this off, provision it later from Kernel."); a copy taken without it reads Needs provisioning (Libraries and sharing).
When someone takes the copy into another Studio of your organisation, a custom image comes with it: Organisations copies the image from this deployment's environment repository into the other deployment's, so your JARs and packages arrive inside it. A custom image over 4 GB cannot be shared. A kernel on a prebuilt image uses the other Studio's own copy of that image.
Notes
- "Couldn’t load container images. Try again." or "Images unavailable": type the image's tag instead. "No images found. Push an image, then choose Refresh images."
- Image refusals, before Studio sends anything: "Choose or enter an image.", "That is not a valid tag or digest for
<repository>." and "Custom images must be in this deployment’s environment repository (<repository>). Push your image there and choose it from the list." - A refusal from the server appears under "Couldn’t create kernel" in the server's words; what you entered stays in the form.
- A standard deployment allows 256 kernels per user; at the limit Create kernel is disabled and a "Kernel limit" warning reads "You've reached the limit of 256 environments." In a governed deployment the server checks when you create.
- Bookmarks to old
/environmentsaddresses open under/kernel. - "Couldn’t load kernel": the kernel may have been deleted; click Back to Kernel.
- The image build fails installing
awslambdaricwith a source build that asks for cmake: pinawslambdaric==4.0.4(How agents run code). - A document comes back without its PDF, or a diagram as source: the image lacks a toolkit tool (the agent says which); install the toolkit and rebuild (Document and media toolkit).
- Dates show in your browser's local time.
- Some of Studio's messages call a kernel an environment, for example "You've reached the limit of 256 environments."
- A Studio upgraded to a release that includes the Python and Java image receives it with the upgrade, after Organisations 1.1.2 or later has mirrored it. Until then the picker offers it, but creating the kernel fails with a "not found in the repository" message.