Skip to content

Repository files navigation

BushfireReadyGPT: Local-First Multi-Agent AI for Australian Bushfire Preparedness

Tests Release Python Streamlit Ollama License

Turn Australian location and community context into auditable bushfire preparedness drafts through a local Ollama-powered multi-agent workflow.

Local-first AI | Multi-agent evidence trail | ABS / ASGS context | Human-in-the-loop review | Markdown / PDF / DOCX exports

BushfireReadyGPT is an Australia-focused bushfire preparedness planning MVP. It helps councils, schools and community resilience teams generate structured draft preparedness reports from a selected location, audience, scenario and planning focus.

The project runs locally through Ollama, exposes a deterministic multi-agent evidence trail, uses ABS / ASGS-derived Australian data context, and exports reviewable reports with human sign-off and audit records.

中文简介: 本项目是一个面向澳洲山火应急准备场景的多智能体报告生成系统原型。系统支持本地 Ollama 大模型推理、结构化表单输入、澳洲地区数据上下文、多 Agent 分析证据链、报告质量检查以及 Markdown / PDF / DOCX 导出。项目当前定位为 MVP / Prototype,适用于学习展示、作品集和受控试点讨论,不用于真实火情判断、撤离命令或生命安全决策。

This project was adapted from the Apache-2.0-licensed project-araia/WildfireGPT / MARSHA project. Original United States wildfire data, experiments and inactive tools are treated as local legacy reference material only; the active application is now positioned around Australian bushfire preparedness. See UPSTREAM.md for provenance and modification notes.

Current Status

Stage: Government-pilot MVP

Current release: v0.1.0

Ready for:

  • Internship demonstration
  • Coursework or portfolio showcase
  • Controlled stakeholder discussion
  • Early school, council or community pilot scoping

Not ready for:

  • Operational emergency management
  • Public life-safety decision support
  • Government procurement
  • Commercial deployment without legal, security, privacy and licence review

What It Does

  • Generates formal English bushfire preparedness draft reports.
  • Supports council, school, community, household, care facility and land management scenarios.
  • Uses a form-first workflow rather than a generic chatbot flow.
  • Runs a local Australia-focused multi-agent analysis pipeline.
  • Shows an Evidence Trail with profile, official source, community vulnerability, risk and planning outputs.
  • Labels report provenance as O1 official reference, P2 processed data, R3 rule inference, A4 AI draft or U0 unverified input.
  • Uses local ABS / ASGS-derived geography and community context.
  • Provides official source, data and licence registers.
  • Adds draft notices, evidence tables, safety disclaimers and human review sign-off.
  • Treats follow-up edits as governed report revisions with a new report ID, version, quality result and audit record.
  • Exports Markdown, PDF, DOCX and pilot export packages.
  • Runs locally with Ollama, so no OpenAI API key is required.

Technical Highlights

  • Refactored the original chatbot-style interaction into a form-driven report generation workflow.
  • Designed a deterministic multi-agent pipeline covering profile parsing, Australian data context, community vulnerability, risk context, planning and report quality checks.
  • Replaced cloud-only OpenAI usage with local Ollama inference for offline-friendly demonstrations and no-cloud-key environments.
  • Built a reviewable evidence trail, governance notice, human sign-off section and audit-ready pilot export package.
  • Added deterministic evidence-confidence labels so official references, processed data, rule inference and AI prose are not presented as equivalent evidence.
  • Added report versioning, approval validation and review-checklist reset so revised content cannot silently inherit an earlier approval.
  • Isolated browser sessions in memory by default and replaced optional pickle persistence with explicitly enabled JSON persistence for single-user installations.
  • Added Australia-specific official source, licence, data status and safety-boundary registries for more transparent outputs.

Example Output

For a quick view of the type of report this project produces, see:

The sample is a static demonstration output. It is not a live emergency plan and should not be used for real operational decisions.

Safety Boundary

BushfireReadyGPT does not provide live fire conditions, fire bans, evacuation orders, official safe routes, confirmed safe assembly points or life-safety decisions.

It is a preparedness planning and draft reporting tool. In an emergency, follow official emergency services and call 000 if life is at risk.

Quick Start

These commands assume Windows PowerShell from the project root.

Create and activate a virtual environment:

python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip

Install Python dependencies:

pip install -r requirements.txt

Install Ollama, then download the configured local model:

ollama pull qwen2.5:7b

The project launcher starts the local Ollama service automatically when needed. To run or troubleshoot Ollama manually, open a separate PowerShell terminal and run:

ollama serve

Keep that Ollama terminal open when using the manual command. The automated launcher runs the service in the background instead.

Create .env in the project root:

LLM_PROVIDER=ollama
OLLAMA_BASE_URL=http://localhost:11434/v1
OLLAMA_MODEL=qwen2.5:7b

Browser sessions are isolated in memory by default. For an explicitly single-user local installation, optional JSON session persistence can be enabled with BUSHFIRE_SESSION_STATE_PATH=chat_history/session_state.json. Do not use one shared state file for a multi-user deployment.

Windows double-click startup:

Double-click Start BushfireReadyGPT.bat

Recommended VSCode startup:

Ctrl + Shift + P
Tasks: Run Task
Start BushfireReadyGPT

Or run from PowerShell:

powershell -ExecutionPolicy Bypass -File .\start_app.ps1

The startup script reads the configured provider from .env. For local Ollama, it starts the service when needed, waits up to 30 seconds for the API, verifies that the configured model is installed, and only then launches Streamlit. It records the active project port locally, avoids launching a duplicate instance, and automatically selects an available port from 8501 to 8505. Keep the terminal open while using the app. Press Ctrl + C or close this terminal to stop Streamlit and release the port.

Demo Path

For the cleanest demonstration:

  1. Open the app.
  2. Go to Create Report.
  3. Select Cairns Council pilot.
  4. Click Load example.
  5. Click Generate report.
  6. Show Latest Report Preview.
  7. Open Review & Export and show the Evidence Trail, Structural Report Check and Human Review Checklist.
  8. Open Data & Map and show official sources, data status, licence register and map context.
  9. Download the pilot export package.
  10. Explain the safety boundary and current commercial limitations.

See docs/demo_walkthrough.md for a full presentation script.

Documentation

Start with:

Project and commercial context:

Sample output:

Architecture Summary

Streamlit UI
  -> Report form and workspace tabs
  -> Deterministic multi-agent pipeline
      -> Profile Agent
      -> Australian Data Agent
      -> Community Vulnerability Agent
      -> Risk Context Agent
      -> Planner Agent
      -> Report Agent
      -> Evidence confidence classification
      -> Report Quality Agent
  -> Local Ollama generation
  -> Evidence tables, sign-off and audit JSON
  -> Markdown / PDF / DOCX / pilot package export
flowchart LR
    A[User report form] --> B[Profile Agent]
    B --> C[Australian Data Agent]
    C --> D[Community Vulnerability Agent]
    D --> E[Risk Context Agent]
    E --> F[Planner Agent]
    F --> G[Ollama-backed Report Generation]
    G --> H[Report Quality Agent]
    H --> I[Evidence Trail and Human Review]
    I --> J[Markdown / PDF / DOCX / Pilot Package]
Loading

Project Structure

src/wildfireChat.py                 Streamlit application entry
src/app_state.py                    Shared Streamlit state helpers
src/session_store.py                Session persistence and conversation reset
src/report_workflow.py              Report generation, audit and human-review workflow
src/ui/                             Streamlit UI modules
src/app_catalog.py                  Official sources, form options and pilot examples
src/report_template.py              Fixed English report prompt and report structure
src/evidence_confidence.py          Shared O1 / P2 / R3 / A4 / U0 provenance rules
src/agents/                         Australia-focused multi-agent pipeline
src/assistants/                     Model client and conversation assistant layer
src/coverage_map.py                 SA2 / SA3 / SA4 map and community profile loading
src/data_register.py                Data source register
src/licence_register.py             Licence register loader and export helpers
src/data_status.py                  Data status and source checks
src/audit.py                        Audit JSON saving
src/pdf_export.py                   PDF report export
src/docx_export.py                  DOCX report export
data_australia/                     Australian metadata, rules and lightweight processed data
scripts/                            Data download / rebuild scripts
docs/                               Project, demo, governance and commercial-readiness docs
tests/                              Deterministic regression tests
start_app.ps1                       VSCode / PowerShell startup entry

Data Notes

The active data layer is under data_australia/.

  • data_australia/raw/ stores raw official downloads or API responses for traceability and is ignored by Git.
  • data_australia/processed/ stores cleaned files used by the agents.
  • Lightweight processed reference files may be committed for reproducible demos.
  • Large raw and geospatial files are intentionally ignored by Git.
  • Original-project legacy material is not part of the active Australian evidence layer.

The committed data is intended for demonstration, traceability and planning context only. It does not provide live incident status, fire danger ratings, evacuation orders, safe routes or confirmed assembly points.

To rebuild all-Australia SA2 / SA3 / SA4 selection data:

.\.venv\Scripts\python.exe scripts\download_abs_sa2_all.py

To rebuild ASGS allocation and correspondence reference data:

.\.venv\Scripts\python.exe scripts\download_abs_asgs_allocations.py

Tests

Run the fast unit, integration, Streamlit smoke and AppTest workflow suite:

.\.venv\Scripts\python.exe -m pytest -m "not e2e" -q

Expected fast-suite result:

28 passed

Install the browser-test dependencies and matching Chromium build once:

.\.venv\Scripts\python.exe -m pip install -r requirements-e2e.txt
.\.venv\Scripts\python.exe -m playwright install chromium

Run the real-browser workflow or the complete suite:

.\.venv\Scripts\python.exe -m pytest -m e2e -q
.\.venv\Scripts\python.exe -m pytest -q

The complete expected result is 29 passed.

GitHub Actions runs the same suite automatically on Python 3.11 and 3.13 for pushes to main, pull requests targeting main, and manual workflow runs. The workflow also checks installed dependency consistency and does not require an Ollama service because model-service failure paths are tested with controlled mocks. The suite also renders the Streamlit app, starts a headless server, and verifies both the health endpoint and the root web page. UI workflow tests cover required-field validation, pilot-example loading, governed report generation and versioned revision with a controlled model response. A separate Chromium job exercises pilot loading, report generation through a local mock model endpoint, Markdown and ZIP downloads, reviewer sign-off, audit updates, package-manifest verification, Cairns-to-Brisbane map filtering, controlled official-source reachability and data-status rendering.

Git And Repository Hygiene

Before publishing or sharing the repository, review the current Git status and commit the intended changes:

git status
git log --oneline -8

Ignored local files include .env, .venv/, .claude/, .agents/, runtime chat history and large raw/geospatial data.

Next Improvement Areas

Without expanding the feature set, the next polishing work is:

  • Keep README and docs aligned as the project changes.
  • Validate evidence labels and confidence boundaries with data, GIS and emergency-management reviewers.
  • Prepare a polished sample report package for one scenario.
  • Review licence and disclaimer language with a legal/risk advisor before any commercial positioning.

About

Local-first multi-agent AI for Australian bushfire preparedness. Ollama, Streamlit, ABS/ASGS context, evidence provenance, human review and audit-ready reports.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages