Getting started with Tanvrit Compute
> Install the agent, submit your first job, stream logs in the portal.
1. Install the agent on a machine you own
curl -fsSL https://compute.tanvrit.com/install.sh | sh
This drops tanvrit-agent into ~/.tanvrit/bin/ and prints instructions. On macOS you can also brew install it:
brew tap tanvrit/compute
brew install tanvrit-agent
2. Register the agent
Sign in at compute.tanvrit.com and open Settings → Agent API keys → Generate key. Copy the raw key (it is shown once).
Run the agent with the key:
TANVRIT_SERVER_URL=https://api.tanvrit.com \
TANVRIT_API_KEY=<your-key> \
tanvrit-agent
You should see the agent print:
┌──────────────────────────────────────────────────────┐
│ Tanvrit Compute Agent v0.2.0 │
├──────────────────────────────────────────────────────┤
│ Server: https://api.tanvrit.com │
│ Node: <hostname>-macos │
│ CPU: 8 │
│ Memory: 16384MB │
│ Labels: macos, arm64, docker, metal, gpu, xcode │
└──────────────────────────────────────────────────────┘
✓ Registered as node: cn-<uuid>
The node now appears in the portal's Nodes tab as ONLINE.
3. Submit a job from the CLI
tanvrit-compute login
tanvrit-compute submit "echo hello from compute" --label macos
Output:
Job submitted: cj-<uuid>
Streaming logs (ctrl-C to detach):
hello from compute
✓ Completed in 42ms (exit=0)
4. Submit a job from Kotlin (SDK)
import com.tanvrit.compute.di.computeModule
import com.tanvrit.compute.engine.dsl.computeJob
import com.tanvrit.compute.feature.job.handler.ComputeJobHandler
// one-time: start Koin with the compute module
startKoin { modules(computeModule) }
// submit a job
val request = computeJob {
shell("python train.py --epochs 10")
gpu("cuda")
memory(16384)
priority(8)
tag("experiment-42")
}
ComputeJobHandler.shared().repository // use the repository / viewModel to watch progress
5. Schedule a recurring job
From the portal Schedules → New schedule, pick a cron expression and a template (or a raw command). The control plane dispatches the schedule every minute.
From Kotlin:
import com.tanvrit.market.compute.TanvritMarketComputeIntegration
TanvritMarketComputeIntegration.install()
TanvritMarketComputeIntegration.scheduleWeeklyCampaignRefresh(
businessId = "biz-123",
campaignId = "cmp-spring-sale",
viewModel = computeScheduleViewModel,
) { schedule ->
println("Scheduled: ${schedule?.scheduleId}")
}
6. What to do next
- Read sdk.md for the full
com.tanvrit:computeAPI. - Read templates.md to customize the built-in job templates.
- Read self-hosting.md to run your own agent fleet at scale.
- Read architecture.md for the control-plane internals.