> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ns.rocks/llms.txt
> Use this file to discover all available pages before exploring further.

# TypeScript Agent Service

> Deploy a Node/TypeScript HTTP service on Nullspace.

This example uses
`examples/node/agent_deployments/typescript_service/nullspace.agent.toml` to
package a TypeScript service, build it with `npm run build`, and expose it
through a Nullspace service URL.

## Setup

```bash theme={"theme":{"light":"one-light","dark":"one-dark-pro"}}
python -m pip install "nullspace-sdk[cli]==1.0.0"
export NULLSPACE_API_KEY=ns_live_...
export NULLSPACE_API_URL=https://api.your-nullspace-domain
cd examples/node/agent_deployments/typescript_service
```

## CLI

```bash theme={"theme":{"light":"one-light","dark":"one-dark-pro"}}
nullspace agent deploy .

nullspace agent url typescript-agent-service

nullspace agent status typescript-agent-service --service adsvc_123
nullspace agent logs typescript-agent-service --service adsvc_123
nullspace agent stop typescript-agent-service
```

The service exposes `/health` and `/invoke`.

## Config

```toml theme={"theme":{"light":"one-light","dark":"one-dark-pro"}}
name = "typescript-agent-service"
mode = "service"
install = "npm install"
entrypoint = "npm run start"

[service]
port = 8000
readiness = { type = "http", path = "/health", timeout_seconds = 30 }

[permissions]
public_url = true
```

## Project Files

```text theme={"theme":{"light":"one-light","dark":"one-dark-pro"}}
examples/node/agent_deployments/typescript_service/
  README.md
  package.json
  tsconfig.json
  nullspace.agent.toml
  src/server.ts
```

Related: [Agent Deployments](../agents/deployments) and
[Preview URLs](../networking/preview-urls).
