@agentium/edge connects core Agents to device tools and provides resource monitoring, device presets, Ollama helpers, and a cloud-sync client. Start with a measured system reading, then add only the hardware and model capabilities your device needs.
Your application owns the work loop and its response to unhealthy resources. The edge runtime reports degradation and watchdog timeouts; it does not automatically throttle, restart an Agent, or remove tools.
Why edge?
- Local inference: use Ollama when requests and model processing should stay on the device.
- Device tools: read system information or connect GPIO, I2C, cameras, BLE, and servos.
- Observable operation: report resource usage and host-controlled health decisions.
- Optional synchronization: queue bounded event batches and fetch configuration from your own cloud endpoints.
Quick start
This first program reads system resources and prints the available system-tool names. It does not call a model or write to hardware. Linux-specific readings may be unavailable on other platforms.inspect.ts:
null, and system_info, system_process_list, and system_network_info. No monitoring timer is started. The monitor uses OS readings and probes nvidia-smi when available; a missing GPU does not prevent system inspection.
Choose a toolkit
Read-only system inspection is a useful first step before connecting actuators. Choose allowed pins, device access, tool approvals, and application limits for the specific hardware operation.
Connect a local model
Install and start Ollama separately, then download the model you intend to use. The package’s Ollama helpers can check availability or request a model download; they do not bundle Ollama or model weights. Preset recommendations are starting points, so measure latency and memory on your target workload. Install the core adapter’s optional dependency:assistant.ts:
Supported devices
These are the built-in preset recommendations, not validated capacity guarantees:
A preset does not configure every Agent or enforce process limits by itself. The example explicitly applies
maxTokens; implement other limits in the host and model configuration where supported.
Package structure
Hardware dependencies
Install native npm dependencies only for the selected toolkit:CameraToolkit has no native npm dependency but still requires the external camera commands and working hardware. Review each toolkit’s OS requirements before deployment.