mirror of
https://github.com/open-jarvis/OpenJarvis.git
synced 2026-07-27 21:05:34 +00:00
feat: add 4 starter configs + jarvis init --preset command
New example configs: - deep-research.toml — multi-hop research with citations - code-assistant.toml — orchestrator with code execution + file I/O - scheduled-monitor.toml — persistent operative on cron schedule - chat-simple.toml — lightweight chat, no tools CLI: - `jarvis init --preset <name>` installs any starter config in one command - Presets: morning-digest-mac, morning-digest-linux, morning-digest-minimal, deep-research, code-assistant, scheduled-monitor, chat-simple All configs tested live on M2 Max with Ollama + Qwen3.5 9B. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
6ee2665fc7
commit
e466b54881
@@ -79,19 +79,32 @@ uv run jarvis ask "What is the capital of France?"
|
||||
|
||||
## Starter Configs
|
||||
|
||||
Copy a config to `~/.openjarvis/config.toml` to get started with a pre-built use case. Each config includes the model, agent, tools, and connectors you need.
|
||||
|
||||
| Use Case | Config | What it does |
|
||||
|----------|--------|-------------|
|
||||
| **Morning Digest** | [`morning-digest-mac.toml`](configs/openjarvis/examples/morning-digest-mac.toml) | Daily spoken briefing from your email, calendar, health tracker, and news — delivered by a Jarvis-style AI voice |
|
||||
| **Morning Digest (minimal)** | [`morning-digest-minimal.toml`](configs/openjarvis/examples/morning-digest-minimal.toml) | Just Gmail + Calendar, runs on any machine |
|
||||
| **Morning Digest (Linux)** | [`morning-digest-linux.toml`](configs/openjarvis/examples/morning-digest-linux.toml) | For Linux servers with GPU |
|
||||
Install any preset with one command:
|
||||
|
||||
```bash
|
||||
# Example: set up Morning Digest on Mac
|
||||
cp configs/openjarvis/examples/morning-digest-mac.toml ~/.openjarvis/config.toml
|
||||
jarvis init --preset morning-digest-mac # or any preset below
|
||||
```
|
||||
|
||||
| Preset | Use Case | What it does |
|
||||
|--------|----------|-------------|
|
||||
| `morning-digest-mac` | Daily Briefing (Mac) | Spoken briefing from email, calendar, health, news with Jarvis voice |
|
||||
| `morning-digest-linux` | Daily Briefing (Linux) | Same, with vLLM support for GPU servers |
|
||||
| `morning-digest-minimal` | Daily Briefing (minimal) | Just Gmail + Calendar, runs on any machine |
|
||||
| `deep-research` | Research Assistant | Multi-hop research across indexed docs with citations |
|
||||
| `code-assistant` | Code Companion | Agent with code execution, file I/O, and shell access |
|
||||
| `scheduled-monitor` | Persistent Monitor | Stateful agent that runs on a schedule with memory |
|
||||
| `chat-simple` | Simple Chat | Lightweight conversation, no tools needed |
|
||||
|
||||
```bash
|
||||
# Example: Morning Digest on Mac
|
||||
jarvis init --preset morning-digest-mac
|
||||
jarvis connect gdrive # one OAuth flow covers Gmail, Calendar, Tasks
|
||||
jarvis digest --fresh # generate and play your first briefing
|
||||
|
||||
# Example: Deep Research
|
||||
jarvis init --preset deep-research
|
||||
jarvis memory index ./docs/ # index your documents
|
||||
jarvis ask "Summarize all emails about Project X"
|
||||
```
|
||||
|
||||
### Built-in Agents
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
# Simple Chat — lightweight conversational AI, no tools
|
||||
# Copy to ~/.openjarvis/config.toml
|
||||
#
|
||||
# The fastest setup: just Ollama + a model.
|
||||
#
|
||||
# Usage:
|
||||
# jarvis ask "What is quantum computing?"
|
||||
# jarvis chat # interactive chat session
|
||||
# jarvis serve # start API server for browser/desktop app
|
||||
|
||||
[engine]
|
||||
default = "ollama"
|
||||
|
||||
[intelligence]
|
||||
default_model = "qwen3.5:4b" # Fast and lightweight
|
||||
# default_model = "qwen3.5:9b" # Better quality
|
||||
# default_model = "llama3.1:8b" # Alternative model
|
||||
|
||||
[agent]
|
||||
default_agent = "simple" # Single-turn, no tools
|
||||
|
||||
[server]
|
||||
host = "0.0.0.0"
|
||||
port = 8000
|
||||
@@ -0,0 +1,21 @@
|
||||
# Code Assistant — agent with code execution, file I/O, and shell access
|
||||
# Copy to ~/.openjarvis/config.toml
|
||||
#
|
||||
# Usage:
|
||||
# jarvis ask "Write a Python script that parses CSV files"
|
||||
# jarvis ask "Read main.py and explain the architecture"
|
||||
# jarvis ask --agent orchestrator "Find and fix the bug in test_utils.py"
|
||||
|
||||
[engine]
|
||||
default = "ollama"
|
||||
|
||||
[intelligence]
|
||||
default_model = "qwen3.5:9b"
|
||||
# default_model = "qwen3.5:35b" # Better for complex code tasks
|
||||
|
||||
[agent]
|
||||
default_agent = "orchestrator" # Multi-turn with tool selection
|
||||
max_turns = 10
|
||||
|
||||
[tools]
|
||||
enabled = ["code_interpreter", "file_read", "file_write", "shell_exec", "web_search", "think", "calculator"]
|
||||
@@ -0,0 +1,27 @@
|
||||
# Deep Research Agent — multi-hop research across your indexed documents
|
||||
# Copy to ~/.openjarvis/config.toml
|
||||
#
|
||||
# First index your documents:
|
||||
# jarvis memory index ./docs/
|
||||
# jarvis memory index ~/Documents/papers/
|
||||
#
|
||||
# Then ask complex questions:
|
||||
# jarvis ask --agent deep_research "Summarize all emails about Project X"
|
||||
# jarvis ask --agent deep_research "What meetings did I have with Alice last month?"
|
||||
|
||||
[engine]
|
||||
default = "ollama"
|
||||
|
||||
[intelligence]
|
||||
default_model = "qwen3.5:9b"
|
||||
temperature = 0.3 # Low temperature for factual research
|
||||
|
||||
[agent]
|
||||
default_agent = "deep_research"
|
||||
max_turns = 8 # Multi-hop reasoning steps
|
||||
|
||||
[tools]
|
||||
enabled = ["knowledge_search", "knowledge_sql", "scan_chunks", "think", "web_search"]
|
||||
|
||||
[tools.storage]
|
||||
default_backend = "sqlite"
|
||||
@@ -0,0 +1,35 @@
|
||||
# Scheduled Monitor — persistent agent that runs on a schedule
|
||||
# Copy to ~/.openjarvis/config.toml
|
||||
#
|
||||
# The operative agent maintains state across runs, making it ideal for:
|
||||
# - Daily email/inbox monitoring
|
||||
# - Recurring status checks
|
||||
# - Long-running research projects
|
||||
#
|
||||
# Setup:
|
||||
# 1. Index your data: jarvis memory index ~/Documents/
|
||||
# 2. Start the scheduler: jarvis scheduler start
|
||||
# 3. Create a task:
|
||||
# jarvis scheduler create \
|
||||
# --prompt "Check for new emails about Project X and update your notes" \
|
||||
# --schedule "0 9 * * 1-5" \
|
||||
# --agent operative \
|
||||
# --tools "knowledge_search,knowledge_sql,memory_store,think"
|
||||
|
||||
[engine]
|
||||
default = "ollama"
|
||||
|
||||
[intelligence]
|
||||
default_model = "qwen3.5:9b"
|
||||
temperature = 0.3
|
||||
|
||||
[agent]
|
||||
default_agent = "operative"
|
||||
max_turns = 20
|
||||
context_from_memory = true # Inject relevant memory into context
|
||||
|
||||
[tools]
|
||||
enabled = ["knowledge_search", "knowledge_sql", "scan_chunks", "memory_store", "memory_search", "think", "web_search"]
|
||||
|
||||
[tools.storage]
|
||||
default_backend = "sqlite"
|
||||
@@ -264,6 +264,23 @@ def _do_download(engine: str, model: str, spec, console: Console) -> None:
|
||||
default=False,
|
||||
help="Include Morning Digest config section.",
|
||||
)
|
||||
@click.option(
|
||||
"--preset",
|
||||
type=click.Choice(
|
||||
[
|
||||
"morning-digest-mac",
|
||||
"morning-digest-linux",
|
||||
"morning-digest-minimal",
|
||||
"deep-research",
|
||||
"code-assistant",
|
||||
"scheduled-monitor",
|
||||
"chat-simple",
|
||||
],
|
||||
case_sensitive=False,
|
||||
),
|
||||
default=None,
|
||||
help="Use a pre-built starter config instead of generating one.",
|
||||
)
|
||||
def init(
|
||||
force: bool,
|
||||
config: Optional[Path],
|
||||
@@ -273,6 +290,7 @@ def init(
|
||||
skip_scan: bool = False,
|
||||
host: Optional[str] = None,
|
||||
enable_digest: bool = False,
|
||||
preset: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Detect hardware and generate ~/.openjarvis/config.toml."""
|
||||
console = Console()
|
||||
@@ -284,6 +302,42 @@ def init(
|
||||
console.print("Use [bold]--force[/bold] to overwrite.")
|
||||
raise SystemExit(1)
|
||||
|
||||
# Handle --preset: copy a starter config and return early
|
||||
if preset:
|
||||
|
||||
examples_dir = (
|
||||
Path(__file__).resolve().parents[2]
|
||||
/ "configs"
|
||||
/ "openjarvis"
|
||||
/ "examples"
|
||||
)
|
||||
# Also check installed package location
|
||||
if not examples_dir.exists():
|
||||
examples_dir = (
|
||||
Path(__file__).resolve().parents[3]
|
||||
/ "configs"
|
||||
/ "openjarvis"
|
||||
/ "examples"
|
||||
)
|
||||
preset_path = examples_dir / f"{preset}.toml"
|
||||
if not preset_path.exists():
|
||||
console.print(f"[red]Preset '{preset}' not found.[/red]")
|
||||
console.print(
|
||||
f" Looked in: {examples_dir}"
|
||||
)
|
||||
raise SystemExit(1)
|
||||
DEFAULT_CONFIG_DIR.mkdir(parents=True, exist_ok=True)
|
||||
DEFAULT_CONFIG_PATH.write_text(preset_path.read_text())
|
||||
console.print(
|
||||
f"[green]Preset '{preset}' installed to "
|
||||
f"{DEFAULT_CONFIG_PATH}[/green]"
|
||||
)
|
||||
console.print(
|
||||
"\n Edit the config to customize, then run "
|
||||
"[bold]jarvis doctor[/bold] to verify."
|
||||
)
|
||||
return
|
||||
|
||||
console.print("[bold]Detecting hardware...[/bold]")
|
||||
hw = detect_hardware()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user