{"slug": "adapting-fossil-scm-as-a-platform-for-ai-agentic-workflow", "title": "Adapting Fossil-scm as a platform for AI agentic workflow", "summary": "Fossil-scm, a distributed version control system used since 2007, has been adapted as a platform for AI agentic workflows, adding native support for chat and embedding backends through its settings system. The fork, maintained by BenSiv, introduces commands like `fossil agent verify`, supports providers including Ollama, Codex, Gemini, and Claude, and includes extensive documentation under `doc/ai/` for implementation, user guidance, and storage design.", "body_md": "Fossil is a distributed version control system that has been widely\nused since 2007. Fossil was originally designed to support the\n[SQLite](https://sqlite.org) project but has been adopted by many other\nprojects as well.\n\nFossil is self-hosting at [https://fossil-scm.org](https://fossil-scm.org).\n\nIf you are reading this on GitHub, then you are looking at a Git mirror of the self-hosting Fossil repository. The purpose of that mirror is to test and exercise Fossil's ability to export a Git mirror. Nobody much uses the GitHub mirror, except to verify that the mirror logic works. If you want to know more about Fossil, visit the official self-hosting site linked above.\n\nCanonical documents for this fork live under [ doc/](/BenSiv/fossil-scm/blob/master/doc):\n\n- Build Guide:\n`doc/BUILD.txt`\n\n- Licence:\n`doc/LICENCE.md`\n\n- Repository Map:\n`doc/specs/repo-map.md`\n\n- Open Knowledge Commons docs:\nThe active roadmap is`doc/ai/`\n\n. End-user workflow is documented in`doc/ai/IMPLEMENTATION_PLAN.md`\n\n. Self-hosted evaluation and rollout guidance is in`doc/ai/USER_GUIDE.md`\n\n. Knowledge capture and curation policy is in`doc/ai/ADOPTION_GUIDE.md`\n\nand`doc/ai/DATA_POOL.md`\n\n. Storage and provenance design live in`doc/ai/TIERS.md`\n\n,`doc/ai/STORAGE_MODEL.md`\n\n, and`doc/ai/PROVENANCE.md`\n\n. The browser and durable-artifact sequence lives in`doc/ai/SCHEMA.md`\n\n. Validation coverage is tracked in`doc/ai/KNOWLEDGE_BROWSER_IMPLEMENTATION_PLAN.md`\n\n. The project-level product summary for this fork lives in`doc/ai/TEST_PLAN.md`\n\n.`doc/specs/ai-management-system.md`\n\n- Clean local reinstall helper:\n`dev/tools/install-fossil-clean.sh`\n\n- Tcl test prerequisite helper:\n`dev/tools/install-tcl-test-prereqs.sh`\n\nThe local agent integration supports separate chat and embedding backends using\nFossil's normal settings system. There is no separate agent JSON config-file\nresolver: local repository settings override global settings, and settings\nmarked versionable can also be supplied through `.fossil-settings/SETTING`\n\n.\n\n```\nfossil set agent-provider ollama\nfossil set agent-model qwen3.5:0.8b\nfossil set agent-command /absolute/path/to/dev/agents/fossil-ollama-agent.sh\nfossil set agent-embedding-provider ollama\nfossil set agent-embedding-model mxbai-embed-large\nfossil set agent-embedding-command /absolute/path/to/embed-wrapper\nfossil agent verify\n```\n\nUse `--global`\n\nwith `fossil set`\n\nfor user-wide defaults. For team-shared,\nversionable values such as provider/model choices, use Fossil's standard\n`.fossil-settings/<setting-name>`\n\nfiles:\n\n```\nmkdir -p .fossil-settings\nprintf 'codex\\n' > .fossil-settings/agent-provider\nprintf 'auto\\n' > .fossil-settings/agent-model\n```\n\nSee [ doc/ai/AGENT_CONFIG_MIGRATION.md](/BenSiv/fossil-scm/blob/master/doc/ai/AGENT_CONFIG_MIGRATION.md)\nfor the migration path from old JSON agent configs.\n\nNotes:\n\n`agent-provider`\n\nselects the chat backend. Built-in compatibility values are`claude`\n\n,`codex`\n\n,`gemini`\n\n,`ollama`\n\n, and`custom`\n\n.`agent-model`\n\nis the chat model used by`/agentui`\n\nand`/agent-chat`\n\n.`agent-embedding-provider`\n\nselects the embedding backend independently from chat.`agent-embedding-model`\n\nis used by`fossil agent embed`\n\n,`semantic-index`\n\n, and`retrieve`\n\n.- Maintained helper scripts live in\n`dev/agents/fossil-ollama-agent.sh`\n\n,`dev/agents/fossil-codex-agent.sh`\n\n,`dev/agents/fossil-codex-embed.sh`\n\n, and`dev/agents/fossil-gemini-agent.sh`\n\n.`dev/agents/fossil-claude-agent.sh`\n\n- Provider metadata for validation, model suggestions, and UI capability flags is built into Fossil so provider policy is available without a parallel config file format.\n`agent-embedding-command`\n\nmay be left empty if the selected embedding provider has a configured`builtin_embedding_fallback`\n\n, such as the bundled Ollama example using`curl`\n\nagainst`/api/embed`\n\n.- Codex embeddings can be wired through the OpenAI embeddings API via\n`dev/agents/fossil-codex-embed.sh`\n\n. This requires`OPENAI_API_KEY`\n\nor`FOSSIL_AGENT_OPENAI_API_KEY`\n\n. `qwen3.5:0.8b`\n\ndoes not provide embeddings in Ollama, so a separate embedding model is required.- When\n`agent-provider`\n\nor`agent-embedding-provider`\n\nis omitted, Fossil infers it from the configured command for compatibility. - Fossil rejects obvious provider/model mismatches before launching the backend, based on the built-in provider metadata.\n`/agentui`\n\nstores the effective provider/model with each chat session and restores that pair when an existing session is reopened.`/agent-config`\n\nexposes the effective chat and embedding config as JSON for`/agentui`\n\nand tests.`/agent-config`\n\nalso reports current backend capability flags such as provider locking, streaming support, model discovery support, and whether embeddings are currently available.`/agent-config`\n\nnow also includes static provider choices and model suggestions so`/agentui`\n\ncan populate controls from server-declared data.- chat rows now persist a structured\n`kind`\n\nclassification such as`prompt`\n\n,`reply`\n\n,`error`\n\n,`progress`\n\n, or`tool`\n\n, which is the first step toward structured chat events. `/agent-history`\n\nexposes a stored chat session and its ordered messages as JSON, providing a structured read path for future UI work.`/agentui`\n\nnow uses this endpoint for browser-side history rendering.`/agent-events`\n\nexposes the ordered stored event stream for a session, with optional`after=`\n\nfiltering for incremental polling.`/agent-feedback`\n\nrecords lightweight user feedback for the latest or selected terminal agent reply and stores it in`ai_chat_eval`\n\n.- backend execution now records explicit\n`running`\n\nand`ok`\n\nprogress events so incremental clients can distinguish in-flight work from final replies. `/agentui`\n\nnow shows the newest execution state in a dedicated status line above the chat log, driven by the structured event stream.- the session list now includes a compact last-known state label such as\n`running`\n\n,`ok`\n\n,`reply`\n\n, or`error`\n\nbeside each saved conversation. `ai_chat_eval`\n\nrecords a lightweight evaluation row for each persisted final chat outcome, and now also stores simple user feedback such as`useful`\n\nor`not-useful`\n\n.`fossil state export DIRECTORY`\n\nwrites a deterministic file-tree projection of selected repository state. Current domains are documented in.`doc/STATE_PROJECTION.md`\n\n- chat rows now also support a lightweight\n`meta`\n\nfield for structured event metadata such as whether context assembly was enabled for a prompt. - For Claude-backed chat, use\n`fossil-claude-agent.sh`\n\n. By default it calls`claude`\n\nwith`-p`\n\nand`--model`\n\n, and both flags can be overridden with`FOSSIL_AGENT_CLAUDE_PROMPT_FLAG`\n\nand`FOSSIL_AGENT_CLAUDE_MODEL_FLAG`\n\n. - For Codex-backed chat, use\n`fossil-codex-agent.sh`\n\nand set`agent-model`\n\nto`auto`\n\nunless your Codex account supports an explicit model name. - For Gemini-backed chat, use\n`fossil-gemini-agent.sh`\n\n. By default it calls`gemini`\n\nwith`--prompt`\n\nand`--model`\n\n, and both flags can be overridden with`FOSSIL_AGENT_GEMINI_PROMPT_FLAG`\n\nand`FOSSIL_AGENT_GEMINI_MODEL_FLAG`\n\n.\n\n`make test`\n\nruns the Tcl regression suite through\n[ tst/tester.tcl](/BenSiv/fossil-scm/blob/master/tst/tester.tcl).\n\n- Core AI data-pool tests:\n`tst/ai.test`\n\n- Hermetic agent regression tests:\n`tst/agent.test`\n\n- Agent config migration tests:\n`tst/agent-config.test`\n\n- Focused flat-route smoke tests:\n`tst/agent-v1-smoke.test`\n\n- Fake backend fixture:\n`tst/fake-agent-backend.sh`\n\nThe agent regression tests are deterministic and do not require Ollama, Codex, or network access. They cover:\n\n- AI schema initialization and self-test review loop\n`agent note`\n\n,`agent embed`\n\n,`semantic-index`\n\n,`retrieve`\n\n, and`eval-report`\n\n- Fossil\n`agent-*`\n\nsettings, including versionable settings overrides - first-use\n`/agentui`\n\nrendering `/agent-config`\n\nJSON for effective provider/model/config state`/agent-config`\n\ncapability flags for the active backend`/agent-config`\n\nprovider choices and model suggestions`/agent-history`\n\nJSON for stored sessions and ordered messages- flat\n`agent-api-v1-*`\n\nsession/chat/event smoke coverage - structured chat event kinds in\n`agentchat`\n\n- lightweight structured\n`meta`\n\non`agentchat`\n\nrows - first-use\n`/agent-chat`\n\nsession creation and message persistence - effective chat and embedding model display in\n`/agentui`\n\n- provider/model persistence across reopened chat sessions\n\nSome Tcl tests are intentionally feature-gated and will report as skipped instead of failed when their prerequisites are unavailable.\n\nCommon skip prerequisites:\n\n`json`\n\n: Fossil must be built with JSON support and Tcl must have the`json`\n\npackage from Tcllib installed.`set-manifest`\n\nand`unversioned`\n\n: Tcl must have the`sha1`\n\npackage from Tcllib installed.`th1-docs`\n\n: Fossil must be built with TH1 docs support and Tcl support.`th1-hooks`\n\n: Fossil must be built with TH1 hooks support.`th1-tcl`\n\n: Fossil must be built with Tcl support.`merge5`\n\n: intentionally disabled until its legacy fixture is repaired for current`fossil sqlite3 --no-repository`\n\nbehavior.\n\nThe Tcl runner prints skip reasons in the final summary so a developer can distinguish optional-environment skips from real regressions.\n\nTo check or install the optional Tcllib packages used by the skipped tests:\n\n```\ndev/tools/install-tcl-test-prereqs.sh --check\ndev/tools/install-tcl-test-prereqs.sh --print\n```\n\n", "url": "https://wpnews.pro/news/adapting-fossil-scm-as-a-platform-for-ai-agentic-workflow", "canonical_source": "https://github.com/BenSiv/fossil-scm", "published_at": "2026-08-23 00:36:50+00:00", "updated_at": "2026-08-23 01:14:03.750095+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools"], "entities": ["Fossil", "SQLite", "Ollama", "Codex", "Gemini", "Claude", "BenSiv"], "alternates": {"html": "https://wpnews.pro/news/adapting-fossil-scm-as-a-platform-for-ai-agentic-workflow", "markdown": "https://wpnews.pro/news/adapting-fossil-scm-as-a-platform-for-ai-agentic-workflow.md", "text": "https://wpnews.pro/news/adapting-fossil-scm-as-a-platform-for-ai-agentic-workflow.txt", "jsonld": "https://wpnews.pro/news/adapting-fossil-scm-as-a-platform-for-ai-agentic-workflow.jsonld"}}