Use a Function service for long-running HTTP processes: a LangGraph API, chat backend, preview server, framework coordinator, or custom service that should stay online until stopped or replaced.
frontend -> your backend -> Function service URL -> service process
Your application still owns product sessions, authorization, and durable state. Nullspace owns the isolated process, endpoint routing, logs, lifecycle records, and backing machine access.

Define A Service

Bind the process to 0.0.0.0 and configure the service port and readiness check in function.py.
function.py
import nullspace

function = nullspace.Function(
    "repo-review-service",
    mode="service",
    template="base",
    workdir="/workspace/project",
    install="python -m pip install -e .",
    entrypoint="python -m uvicorn app:app --host 0.0.0.0 --port 8000",
    service=nullspace.Service(
        port=8000,
        readiness={"type": "http", "path": "/health", "timeout_seconds": 30},
    ),
    policy=nullspace.Policy(public_url=True),
)

Start And Operate

nullspace functions deploy

nullspace functions url repo-review-service \
  --env EXAMPLE_FUNCTION_GREETING=hello

nullspace functions url repo-review-service --service fnsvc_123
nullspace functions status repo-review-service --service fnsvc_123
nullspace functions logs repo-review-service --service fnsvc_123
nullspace functions logs repo-review-service --service fnsvc_123 --follow
nullspace functions restart repo-review-service --service fnsvc_123 --reason deploy-refresh
nullspace functions stop repo-review-service --service fnsvc_123 --retain-machine
functions url starts a service instance when one is not already available and returns the URL for the ready endpoint. Use proxy-auth tokens when your application wants a revocable credential for a Function endpoint instead of exposing a platform API key to clients.
nullspace functions proxy-auth create repo-review-service \
  --name nbits-preview \
  --route / \
  --json

nullspace functions proxy-auth list repo-review-service
nullspace functions proxy-auth revoke repo-review-service fnpauth_123
from pathlib import Path

from nullspace import Function

project = Path("examples/python/functions/minimal_service")
function, version, manifest = Function.deploy(path=project)
service = function.start_service(
    envs={"EXAMPLE_FUNCTION_GREETING": "hello"},
)
url = function.service_url(service.id)
print(url.public_url)
Related examples: Function Service, TypeScript Function Service, and LangGraph Service.