The self-hosted agent requires a TEAM plan.
Usage
Flags
Optional
| Flag | Default | Description |
|---|---|---|
--api-key <key> | $BASECUT_API_KEY | Basecut API key used to authenticate with the platform. |
--agent-id <id> | Auto-generated | Unique identifier for this agent instance. |
--poll-interval <dur> | 5s | How often the agent checks for new jobs. |
--heartbeat-interval <dur> | 1m | How often the agent sends a status heartbeat to the API. |
--run-once | false | If true, the agent exits after processing a single job. |
--profile <name> | default | Credential profile to use. |
Examples
Basic Agent Operation
Start an agent and let it poll for jobs indefinitely:- The agent registers itself with the Basecut API.
- It starts polling for jobs every 5 seconds.
- Every minute, it sends a “heartbeat” to let the platform know it’s healthy.
- When a job is received, it executes the extraction based on the provided configuration.
Run-Once (CI/CD or Job-Based)
In some environments, you might want to start an agent only when you know a job is waiting (e.g., in a transient CI container):- The agent will poll for a job.
- Once a job is completed (or fails), the agent process terminates immediately.
Custom Polling Interval
For high-priority environments or to reduce API overhead, adjust the polling frequency:Required Environment Variables
The agent requires access to the database it will be extracting data from:| Variable | Description |
|---|---|
BASECUT_DATABASE_URL | PostgreSQL connection string for the source database. |
BASECUT_API_KEY | API Key (if not provided via flag). |
Output
Normal Startup
Processing a Job
Error Handling
Authentication Failure
- Verify your
BASECUT_API_KEYis correct and active. - Check that your plan supports self-hosted agents.
Database Connection Loss
- Ensure the agent has network access to the database.
- Verify the
BASECUT_DATABASE_URLis correct.
Next Steps
Deployment Guide
Deploy agents using Docker and Kubernetes
Execution Modes
Understand how agents process jobs