Integrate Ollama for heartbeats and routine tasks - local LLM for zero cost

This commit is contained in:
Jarvis
2026-02-05 10:29:35 -07:00
parent 6d30ab62d1
commit dc40242efc
5 changed files with 109 additions and 16 deletions

View File

@@ -14,7 +14,7 @@
"anthropic:default": { "anthropic:default": {
"errorCount": 0, "errorCount": 0,
"lastFailureAt": 1770267656945, "lastFailureAt": 1770267656945,
"lastUsed": 1770305809732 "lastUsed": 1770312475734
} }
} }
} }

File diff suppressed because one or more lines are too long

View File

@@ -1,4 +1,4 @@
{ {
"pid": 11415, "pid": 20989,
"createdAt": "2026-02-05T15:37:20.890Z" "createdAt": "2026-02-05T17:29:15.892Z"
} }

View File

@@ -1,7 +1,7 @@
{ {
"agent:main:main": { "agent:main:main": {
"sessionId": "bd8ce668-8db7-49eb-8dfa-67aac370286a", "sessionId": "bd8ce668-8db7-49eb-8dfa-67aac370286a",
"updatedAt": 1770305840548, "updatedAt": 1770312555587,
"systemSent": true, "systemSent": true,
"abortedLastRun": false, "abortedLastRun": false,
"chatType": "direct", "chatType": "direct",
@@ -78,15 +78,15 @@
"authProfileOverrideSource": "auto", "authProfileOverrideSource": "auto",
"authProfileOverrideCompactionCount": 0, "authProfileOverrideCompactionCount": 0,
"modelProvider": "anthropic", "modelProvider": "anthropic",
"model": "claude-sonnet-4-5", "model": "claude-haiku-4-5",
"contextTokens": 1000000, "contextTokens": 200000,
"systemPromptReport": { "systemPromptReport": {
"source": "run", "source": "run",
"generatedAt": 1770305797277, "generatedAt": 1770312467960,
"sessionId": "bd8ce668-8db7-49eb-8dfa-67aac370286a", "sessionId": "bd8ce668-8db7-49eb-8dfa-67aac370286a",
"sessionKey": "agent:main:main", "sessionKey": "agent:main:main",
"provider": "anthropic", "provider": "anthropic",
"model": "claude-sonnet-4-5", "model": "claude-haiku-4-5",
"workspaceDir": "/home/jramos/.openclaw/workspace", "workspaceDir": "/home/jramos/.openclaw/workspace",
"bootstrapMaxChars": 20000, "bootstrapMaxChars": 20000,
"sandbox": { "sandbox": {
@@ -94,9 +94,9 @@
"sandboxed": false "sandboxed": false
}, },
"systemPrompt": { "systemPrompt": {
"chars": 21966, "chars": 22183,
"projectContextChars": 11836, "projectContextChars": 12029,
"nonProjectContextChars": 10130 "nonProjectContextChars": 10154
}, },
"injectedWorkspaceFiles": [ "injectedWorkspaceFiles": [
{ {
@@ -111,8 +111,8 @@
"name": "SOUL.md", "name": "SOUL.md",
"path": "/home/jramos/.openclaw/workspace/SOUL.md", "path": "/home/jramos/.openclaw/workspace/SOUL.md",
"missing": false, "missing": false,
"rawChars": 1664, "rawChars": 1857,
"injectedChars": 1664, "injectedChars": 1857,
"truncated": false "truncated": false
}, },
{ {
@@ -324,8 +324,8 @@
}, },
"lastTo": "channel:1468718506835972127", "lastTo": "channel:1468718506835972127",
"lastAccountId": "default", "lastAccountId": "default",
"inputTokens": 10, "inputTokens": 13,
"outputTokens": 572, "outputTokens": 391,
"totalTokens": 42201 "totalTokens": 57505
} }
} }

View File

@@ -0,0 +1,25 @@
# HEARTBEAT.md - Periodic Checks
These tasks run when you send a heartbeat. Use Ollama for routine work.
## File Organization
- Check workspace for new files that need categorizing
- Review memory/ directory — any logs that should be consolidated into MEMORY.md?
- Verify git status — any uncommitted changes that should be tracked?
**Model:** Use ollama for this
## System Health
- Check if budget-tracker.json needs updating
- Verify cron jobs are still enabled
- Check for any error files or logs
**Model:** Use ollama for this
## When to Alert Me
- Budget spent exceeds 75% ($15)
- Cron job failed
- Uncommitted important changes in workspace
- Memory files growing too large
Otherwise reply with HEARTBEAT_OK.