{"slug": "fuji-a-minimal-harness-to-deploy-agents-at-scale", "title": "Fuji: A minimal harness to deploy agents at scale", "summary": "Fuji, a minimal agent harness written in Go, provides an embeddable, headless runtime with bundled tools for deploying agents at scale, supporting one-shot CLI mode and cron scheduling. The tool, which integrates with Anthropic and OpenAI-compatible providers, enables deterministic tool execution and session continuity, with exit codes for automation. Fuji's design eliminates the need for a daemon or process manager, allowing simple cron entries to run agent tasks such as nightly repo-health checks.", "body_md": "`fuji`\n\nis a pure, naked core for agentic work at scale. Written in Go, it delivers an embeddable, headless agent runtime with bundled tools for a guaranteed agentic experience across fleet deployments.\n\n**Pure Naked Core**: Lightweight, single-threaded execution engine without heavy framework dependencies, dynamic plugin runtimes, or interactive TUI overhead.**Guaranteed Bundled Tools**: Standardized, deterministic tool implementations (`read`\n\n,`write`\n\n,`edit`\n\n,`bash`\n\n,`grep`\n\n,`find`\n\n,`ls`\n\n,`git`\n\n) with embedded tool support to eliminate host environment drift.**Embeddable & Headless**: Usable as a Go library or as a one-shot CLI designed for automation, batch pipelines, and fleet orchestrators.** Provider Agnostic**: Direct HTTP/SSE streaming integrations for Anthropic and OpenAI-compatible providers with custom base URL support.** Session Continuity**: Full JSONL v3 session compatibility (compatible with standard session logs) supporting branching, compaction, and resumes.\n\nBuild the static binary:\n\n```\ngo build -o fuji ./cmd/fuji\n```\n\nConfigure your model provider API key via environment variables:\n\n```\n# Anthropic\nexport ANTHROPIC_API_KEY=\"your-anthropic-key\"\n\n# Or OpenAI\nexport OPENAI_API_KEY=\"your-openai-key\"\n```\n\nRun `fuji`\n\nin one-shot mode:\n\n```\n# Direct prompt string\nfuji run --prompt \"Fix failing tests in pkg/session\"\n\n# Prompt from a file\nfuji run --prompt @task.md --cwd /path/to/repo --model claude-sonnet-4-5\n```\n\nBecause `fuji`\n\nruns headless and exits cleanly with a predictable exit code, dropping a job into `cron`\n\nis trivial — there is no daemon or TUI to keep running. Here's a `crontab`\n\nentry that runs a nightly repo-health check:\n\n```\n# m h dom mon dow command\n0 3 * * * cd /path/to/repo && /opt/fuji/fuji run --prompt @task.md --cwd /path/to/repo --model claude-sonnet-4-5 >> /var/log/fuji.log 2>&1\n```\n\nJust one line. The one-shot `fuji run`\n\nruns the entire agent task to completion, exits with a code you can act on (`0`\n\nsuccess, `2`\n\nruntime failure), and logs are simply appended to a file. No supervisor, no process manager — plain cron is enough.\n\nFor finer scheduling control within a single day (e.g. every 15 minutes), cron's step syntax works the same way:\n\n```\n*/15 * * * * /opt/fuji/fuji run --prompt \"Commit any staged changes\" --cwd /path/to/repo >> /var/log/fuji.log 2>&1\n```\n\nTo install it interactively as your current user:\n\n```\ncrontab -e\n# paste a line above, save, and exit\n```\n\nAnd confirm your job is scheduled:\n\n```\ncrontab -l\n```\n\nThat's all there is to it — a full agentic job, scheduled and running with the tools your system already ships.\n\n```\nUsage:\n  fuji run --prompt <text|@file> [flags...]   Run one agent task\n  fuji version                                Print version\n  fuji help                                   Show help\n\nFlags:\n  --prompt <text|@file>   Prompt text, or @path to a prompt file (required)\n  --cwd <dir>             Working directory (default: current directory)\n  --session <path>        Resume an existing session file\n  --skills <dir>          Path to custom skills directory (.fuji/skills)\n  --model <id>            Model identifier (e.g. claude-3-7-sonnet-20250219, gpt-4o)\n  --provider <id>         Provider: anthropic (default) or openai\n  --base-url <url>        Custom provider API base URL\n  --thinking <level>      Thinking level: off | minimal | low | medium | high | xhigh | max\n  --timeout <secs>        Per-turn timeout in seconds\n  --app-url <url>         App attribution URL (OpenRouter HTTP-Referer, required for rankings);\n                          auto-set when --base-url is OpenRouter\n  --app-title <name>      App display name (OpenRouter X-OpenRouter-Title);\n                          auto-set to \"fuji\" when --base-url is OpenRouter\n  --app-categories <list> App marketplace categories, comma-separated (OpenRouter X-OpenRouter-Categories)\n  --tools <list>          Comma-separated allowlist of tools\n  --no-tools              Disable all tools\n  --log-level <level>     Log level: debug | info | warn | error (emits JSONL to stderr)\n```\n\n`0`\n\n: Success (task completed normally)`1`\n\n: Configuration or authentication error`2`\n\n: Runtime failure`3`\n\n: Aborted (SIGINT / cancellation)\n\n`fuji`\n\nguarantees the following standard tools across all environments:\n\n| Tool | Description |\n|---|---|\n`read` |\nRead file contents (text or images) with offset/limit pagination |\n`write` |\nCreate or overwrite files (auto-creates directories) |\n`edit` |\nAtomic search-and-replace edits with mutation serialization |\n`bash` |\nExecute shell commands with configurable timeouts and streaming output |\n`grep` |\nFast regex and literal file search (powered by ripgrep) |\n`find` |\nLocate files matching glob patterns |\n`ls` |\nDirectory listing with file metadata |\n`git` |\nExecute Git operations |\n\nEmbed `fuji`\n\ndirectly into your Go services:\n\n```\npackage main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\t\"fuji/pkg/config\"\n\t\"fuji/pkg/session\"\n)\n\nfunc main() {\n\tcfg := config.Config{\n\t\tCwd:      \".\",\n\t\tProvider: \"anthropic\",\n\t\tModel:    \"claude-3-7-sonnet-20250219\",\n\t\tApiKey:   \"your-api-key\",\n\t}\n\n\tsess, err := session.New(cfg)\n\tif err != nil {\n\t\tlog.Fatalf(\"failed to create session: %v\", err)\n\t}\n\tdefer sess.Close()\n\n\tif err := sess.Prompt(context.Background(), \"Analyze this repo and summarize it\"); err != nil {\n\t\tlog.Fatalf(\"agent loop error: %v\", err)\n\t}\n}\n```\n\n`fuji`\n\nmerges configuration in order of increasing precedence:\n\n- Defaults\n- User config (\n`~/.fuji/config.json`\n\n) - Project config (\n`<cwd>/.fuji/config.json`\n\n) - Environment variables (\n`ANTHROPIC_API_KEY`\n\n,`OPENAI_API_KEY`\n\n,`FUJI_*`\n\n) - CLI flags (\n`--model`\n\n,`--provider`\n\n, etc.)\n\nFor architectural deep-dives, specs, and decision records, explore the [ docs/](/paradise-runner/fuji/blob/main/docs) directory:\n\n— Architecture, module contracts, and data flow`docs/core-spec.md`\n\n— Core decisions and trade-offs`docs/decisions.md`\n\n— Architecture Decision Records`docs/adr/`", "url": "https://wpnews.pro/news/fuji-a-minimal-harness-to-deploy-agents-at-scale", "canonical_source": "https://github.com/paradise-runner/fuji", "published_at": "2026-08-19 13:00:24+00:00", "updated_at": "2026-08-19 13:14:47.134065+00:00", "lang": "en", "topics": ["ai-agents", "developer-tools", "ai-infrastructure"], "entities": ["Fuji", "Anthropic", "OpenAI", "OpenRouter"], "alternates": {"html": "https://wpnews.pro/news/fuji-a-minimal-harness-to-deploy-agents-at-scale", "markdown": "https://wpnews.pro/news/fuji-a-minimal-harness-to-deploy-agents-at-scale.md", "text": "https://wpnews.pro/news/fuji-a-minimal-harness-to-deploy-agents-at-scale.txt", "jsonld": "https://wpnews.pro/news/fuji-a-minimal-harness-to-deploy-agents-at-scale.jsonld"}}