Function Management

This document covers the administrative lifecycle of a function. It explains how to provision new function identities, list your existing inventory, and update metadata such as environment variables or scaling parameters.

Listing Functions

To view all functions available in your current context, use the list command. This provides an overview of function names, IDs, and their current configurations.

fathom intelligence function list

Creating a Function

The create command initializes a new serverless function entry on the platform. This step sets the “blueprint” for your function, defining its runtime environment and hardware requirements before you upload any code.

fathom intelligence function create <NAME> [OPTIONS]

Key Arguments & Options

Argument/OptionRequirementDescription
<NAME>RequiredThe name of the function.
–description, -dRequiredA brief description of the function’s purpose.
–kind, -kRequiredBuild environment kind. Values: rust189, rust186, python310, go124.
–serving-sizeRequiredComputational resources: small, large, or extra-large.
–auto-createOptionalAutomatically creates a sample application structure for you.

Advanced Configuration Options

OptionTypeDescription
–build-envKEY=VALUEEnvironment variables used strictly during the build process.
–serving-envKEY=VALUEEnvironment variables available to the running service.
–serving-gpuEnumGPU variant to attach: nvidia-l4 or nvidia-l4-2x.
–serving-timeoutSecondsMaximum execution time before the function times out.
–schema-inputJSONJSON schema to validate incoming request data.
–schema-outputJSONJSON schema to validate outgoing response data.

Example: Simple Python Function

To create a simple python function with sample application code type:

fathom intelligence function create test1 --description 'Just testing' --kind python310 --serving-size small

Updating a Function

Use the update command to modify an existing function’s configuration. This is commonly used to adjust scaling, update secrets via environment variables, or rename the resource.

fathom intelligence function update <FUNCTION_ID> [OPTIONS]
OptionRequirementDescription
<FUNCTION_ID>RequiredThe unique ID of the function you wish to update.
–name, -nOptionalUpdate the display name of the function.
–description, -dOptionalUpdate the function’s description.
–serving-size, -sOptionalChange the hardware tier (small, large, extra-large).
–serving-envOptionalUpdate or add new runtime environment variables (KEY=VALUE).
–serving-gpuOptionalChange the GPU variant or attach one to the service.
–serving-timeoutOptionalAdjust the execution timeout in seconds.

Example: Scaling an Existing Function

If your function requires more memory or a longer execution time, you can update it as follows:

fathom intelligence function update 1fc6c0ba-2ab6-4c0d-8a32-3a6374956aa3 --serving-size extra-large --serving-timeout 600