{"_id":"@avasis-ai/agent-runtime","name":"@avasis-ai/agent-runtime","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@avasis-ai/agent-runtime","version":"1.0.0","description":"Runtime engine for Avasis terminal agents. Loop scheduler, daemon mode, multi-agent orchestration, tool system.","type":"module","bin":{"avasis-agent":"dist/bin.js"},"main":"dist/index.js","scripts":{"build":"tsc","dev":"tsx src/bin.ts","start":"node dist/bin.js"},"keywords":["avasis","agent","runtime","cli","daemon","ollama","terminal"],"license":"MIT","engines":{"node":">=18"},"dependencies":{"chalk":"^5.4.1","commander":"^13.1.0","zod":"^3.23.0"},"devDependencies":{"@types/node":"^22.0.0","typescript":"^5.7.0"},"publishConfig":{"access":"public"},"types":"./dist/index.d.ts","_id":"@avasis-ai/agent-runtime@1.0.0","_nodeVersion":"25.4.0","_npmVersion":"11.7.0","dist":{"integrity":"sha512-2a/AQ804nSV/LOPUwiMoYr13xLe/a331IVynC3yll1vR2e+v0THwcQ+9Aj6MhY2L6LcUFZ7R5wWBJct92PBq6g==","shasum":"2eb90e676cccb4244426a7f9db81cc55b2ba57db","tarball":"https://registry.npmjs.org/@avasis-ai/agent-runtime/-/agent-runtime-1.0.0.tgz","fileCount":16,"unpackedSize":62751,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCTeuxN5lM0+SWjp4yHUiW7pOLAwG9PjJsTRYorYspnIQIgAfsZ5elwwrEsKoJzDr+qSRXn2hCVoGLhl6nBPZ+RhxU="}]},"_npmUser":{"name":"avasis","email":"abhay@avasis.ai"},"directories":{},"maintainers":[{"name":"avasis","email":"abhay@avasis.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/agent-runtime_1.0.0_1775680030578_0.8109568040123334"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-08T20:27:10.463Z","1.0.0":"2026-04-08T20:27:10.732Z","modified":"2026-04-08T20:27:10.975Z"},"maintainers":[{"name":"avasis","email":"abhay@avasis.ai"}],"description":"Runtime engine for Avasis terminal agents. Loop scheduler, daemon mode, multi-agent orchestration, tool system.","keywords":["avasis","agent","runtime","cli","daemon","ollama","terminal"],"license":"MIT","readme":"# @avasis-ai/agent-runtime\n\nRuntime engine for Avasis terminal agents. Run persistent background agents locally with small models via Ollama.\n\n## Install\n\n```bash\nnpm install -g @avasis-ai/agent-runtime\n```\n\n## Quick Start\n\n```bash\n# 1. Install Ollama and pull a model\nollama pull phi4-mini:3.8b\n\n# 2. Create an agent config (or use https://avasis.ai/builder)\navasis-agent run avasis.config.json\n\n# 3. Run in background\navasis-agent run avasis.config.json --daemon\n\n# 4. Check status\navasis-agent status\n```\n\n## Commands\n\n| Command | Description |\n|---------|-------------|\n| `run [config]` | Run an agent from a JSON config file |\n| `status` | Show agent state and recent runs |\n| `validate [config]` | Validate a config file without running |\n| `list-models` | List available Ollama models |\n| `pull <model>` | Pull a model from Ollama |\n\n## Flags\n\n| Flag | Description |\n|------|-------------|\n| `--verbose` | Show tool calls and internal logs |\n| `--daemon` | Run in background (detached process) |\n| `--ollama-url <url>` | Custom Ollama base URL |\n\n## Config Format\n\n```json\n{\n  \"id\": \"my-agent\",\n  \"version\": \"1.0.0\",\n  \"type\": \"single\",\n  \"ollamaBaseUrl\": \"http://localhost:11434\",\n  \"agent\": {\n    \"name\": \"file-organizer\",\n    \"model\": \"phi4-mini:3.8b\",\n    \"systemPrompt\": \"Organize files by type into subdirectories.\",\n    \"tasks\": [\n      {\n        \"name\": \"organize\",\n        \"prompt\": \"List files in /tmp/workspace and sort them into images/, docs/, code/ subdirectories.\",\n        \"tools\": [\"fs_list\", \"fs_move\"],\n        \"maxTokens\": 2048\n      }\n    ],\n    \"trigger\": { \"type\": \"interval\", \"value\": \"300000\" }\n  }\n}\n```\n\n## Built-in Tools\n\n| Tool | Description |\n|------|-------------|\n| `fs_read` | Read file contents |\n| `fs_write` | Write content to a file |\n| `fs_list` | List directory contents (supports recursive) |\n| `fs_move` | Move or rename files |\n| `fs_delete` | Delete a file |\n| `shell_exec` | Execute shell commands |\n| `git_status` | Get git repository status |\n| `git_diff` | Get git diff of changes |\n| `git_commit` | Stage all changes and commit |\n\n## How It Works\n\n1. Loads agent config (JSON file)\n2. Connects to local Ollama instance\n3. Runs tasks with native tool calling (model decides which tools to use)\n4. Tool results are fed back to the model for reasoning\n5. State is persisted to `.avasis/state.json` across runs\n6. For interval/daemon mode: runs the task loop forever in the background\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-c1186ecd60830bab13b23333b96afec5"}