@avasis-ai/agent-runtime
v1.0.0
Published
Runtime engine for Avasis terminal agents. Loop scheduler, daemon mode, multi-agent orchestration, tool system.
Downloads
53
Maintainers
Readme
@avasis-ai/agent-runtime
Runtime engine for Avasis terminal agents. Run persistent background agents locally with small models via Ollama.
Install
npm install -g @avasis-ai/agent-runtimeQuick Start
# 1. Install Ollama and pull a model
ollama pull phi4-mini:3.8b
# 2. Create an agent config (or use https://avasis.ai/builder)
avasis-agent run avasis.config.json
# 3. Run in background
avasis-agent run avasis.config.json --daemon
# 4. Check status
avasis-agent statusCommands
| Command | Description |
|---------|-------------|
| run [config] | Run an agent from a JSON config file |
| status | Show agent state and recent runs |
| validate [config] | Validate a config file without running |
| list-models | List available Ollama models |
| pull <model> | Pull a model from Ollama |
Flags
| Flag | Description |
|------|-------------|
| --verbose | Show tool calls and internal logs |
| --daemon | Run in background (detached process) |
| --ollama-url <url> | Custom Ollama base URL |
Config Format
{
"id": "my-agent",
"version": "1.0.0",
"type": "single",
"ollamaBaseUrl": "http://localhost:11434",
"agent": {
"name": "file-organizer",
"model": "phi4-mini:3.8b",
"systemPrompt": "Organize files by type into subdirectories.",
"tasks": [
{
"name": "organize",
"prompt": "List files in /tmp/workspace and sort them into images/, docs/, code/ subdirectories.",
"tools": ["fs_list", "fs_move"],
"maxTokens": 2048
}
],
"trigger": { "type": "interval", "value": "300000" }
}
}Built-in Tools
| Tool | Description |
|------|-------------|
| fs_read | Read file contents |
| fs_write | Write content to a file |
| fs_list | List directory contents (supports recursive) |
| fs_move | Move or rename files |
| fs_delete | Delete a file |
| shell_exec | Execute shell commands |
| git_status | Get git repository status |
| git_diff | Get git diff of changes |
| git_commit | Stage all changes and commit |
How It Works
- Loads agent config (JSON file)
- Connects to local Ollama instance
- Runs tasks with native tool calling (model decides which tools to use)
- Tool results are fed back to the model for reasoning
- State is persisted to
.avasis/state.jsonacross runs - For interval/daemon mode: runs the task loop forever in the background
License
MIT
