Skip to main content
Building reliable agentic applications is harder than deploying web applications. Agents can run for minutes to hours and need durable execution, sandboxed code execution, and access to files and data from APIs. Tensorlake’s Agentic Runtime provides serverless compute, durable execution, sandboxed code execution, and other foundational infrastructure to ship high-throughput data-centric agents.

HTTP Endpoints for Agents and AI Workflows

Tensorlake automatically creates an HTTP endpoint when you deploy your agents and workflows. This makes it easy to integrate them with applications and other systems.
from tensorlake.applications import application, function

@application()
@function()
def deep_research(query: str) -> str:
   ...
This application is deployed as an HTTP endpoint at https://api.tensorlake.ai/applications/deep_research. Your code is going to start running whenever a new request is received on that endpoint.

Autoscaling for High Throughput Agents

Agents often run much longer than a typical web request. Tensorlake scales function containers based on concurrent requests, so you can run many agent sessions in parallel without operating queues or orchestrators.

Built-in Durable Execution for Recovering from Failures

A single agent request can incur many calls to tools and LLMs. Failures are common at scale. Durable execution means retries can resume from the point of failure instead of starting over, which reduces cost and time to complete the task.

Sandboxes for Running Untrusted Code

Code generation is often the most reliable way to get deterministic results from LLMs, like answering questions to mathematical problems, or when information is behind an HTTP API. Running untrusted code requires sandbox infrastructure to ensure the code is safe to run. Tensorlake functions run in sandboxes automatically, so you have sandbox infrastructure built into the platform.
from typing import Any

@function()
def run_code(code: str) -> Any:
  # eval(code) 
  # Execute untrusted code in a sandboxed environment
  # Your implementation can restrict libraries, filesystem access, network, and runtime limits
  ...

Tracing and Observability

Understanding the path of a request through the agentic application is crucial for debugging and observability. Every function is automatically traced in your application. You can observe logs, exceptions, timing information, and cold starts by looking at the execution timeline.

Distributed Execution for Complex Applications

Applications can be composed of multiple functions with different compute requirements and dependencies. Tensorlake builds function images and runs functions in separate containers while serving requests transparently, without you wiring RPC calls or queues. Function-to-function calls are durable by default, so if a step fails, the request can resume from the last successful step.
@function()
def call_weather_api(city: str) -> str:
    ...

@function()
def convert_celsius_to_fahrenheit(celsius: float) -> float:
    return (celsius * 9/5) + 32

@application()
@function()
def get_weather(city: str) -> str:
    weather = call_weather_api(city)
    fahrenheit = convert_celsius_to_fahrenheit(weather)
    return fahrenheit

Declarative Concurrency Control

Tensorlake functions processes one request at a time by default. But, in some cases you may want to process multiple requests concurrently in the same container. Use the max_concurrency setting to allow up to N concurrent requests per container. This is useful when your agent loop is I O bound and you want to reuse a warm container across multiple sessions.
@function(max_concurrency=8)
def deep_research(req) -> str:
   ...

File Systems for Context Offloading

State-of-the-art agents use the filesystem to offload context and to download and inspect large files without loading them fully into memory. You can attach ephemeral disk to your functions by specifying the disk size.
@function(ephemeral_disk=2)
def deep_research(req) -> str:
   options = ClaudeAgentOptions(
        system_prompt="You are an expert Python developer",
        permission_mode='acceptEdits',
        cwd="/tmp"
    )
  ...

Declarative Dependency Management

Tensorlake uses real containers to run your functions, so you can configure the base image and install any dependencies you need.
from tensorlake.applications import Image, function

image = (Image(base_image="python:3.11-slim", name="my-custom-image")
            .run("pip install google-genai")
        )

@function(image=image)
def my_function(req) -> str:
   ...

Map-Reduce for On-demand Large-scale Data Processing

Use Map-Reduce for on-demand processing of large volumes of data. Fan out work across a list in parallel, then aggregate the results.
from pydantic import BaseModel
from tensorlake.applications import application, function

class TotalSum(BaseModel):
    value: int = 0

@application()
@function()
def sum_squares(total_numbers: int) -> TotalSum:
    squares = square.map([i for i in range(total_numbers)])
    return sum_total.reduce(squares, TotalSum(value=0))

@function()
def square(number: int) -> int:
    return number ** 2

@function()
def sum_total(total: TotalSum, number: int) -> TotalSum:
    total.value += number
    return total
See Map-Reduce for blocking and non-blocking patterns.

Next Steps

Jump straight into building a serverless agentic code interpreter in under 5 minutes.