Skip to content

linux4life1/front-porch-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

369 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Front Porch AI

License: AGPL v3 Flutter Platform Stable

A privacy-first, fully offline AI companion for Windows, Linux, and macOS. Chat with AI characters using local LLMs, manage your character library, and keep everything running on your own hardware β€” no subscriptions, no cloud, no one pulling the rug out from under you.

πŸ’¬ Join the Discord β€” questions, feedback, and hanging out welcome. Also on Matrix.

Front Porch AI β€” Character Library


✨ Features

πŸ’¬ Chat

  • Immersive roleplay with V2-spec character cards β€” full SillyTavern / Backyard AI compatibility
  • Smooth output buffer β€” text drips at your reading pace, not your GPU's pace
  • Rich text styling β€” dialogue highlighted in amber, actions in grey
  • Regenerate, Continue, Impersonate, Edit β€” full message control
  • Persistent sessions β€” chat history auto-saved and restored per character
  • Inline image rendering β€” ![alt](url) markdown renders in-chat
  • Chat branching β€” fork from any message to explore alternate storylines

🧠 Realism Engine

  • Emotion tracking β€” character mood evolves naturally across the conversation, carrying inertia between turns
  • Relationship & Trust system β€” earn a character's trust over time; it shifts how open and vulnerable they allow themselves to be
  • Autonomous time progression β€” scene time advances deterministically every 6 turns; OOC time-skips ((OOC: we drive for several hours)) are auto-detected and applied
  • Manual time nudge β€” step time forward or back with sidebar chevrons
  • Character Objectives β€” autonomous goals the character pursues independently based on story events
  • Fixation Engine β€” active emotional obsessions that subtly color every response
  • Character Evolution β€” characters organically develop new traits as your story progresses
  • RAG Memory β€” local semantic memory powered by a lightweight ONNX embedding engine; the AI recalls past conversations without any cloud

🎭 Character Management

  • V2 spec support β€” fully compatible with the V2 character card specification (PNG & JSON)
  • One-click import from aicharactercards.com and chub.ai via a built-in browser
  • Backyard AI (.byaf) importer β€” rescue your characters from the archive format Backyard AI left behind when they killed their desktop app
  • Folder organization, global search, tag editor, bulk PNG import
  • One-click duplication β€” clone any character card for risk-free experiments

πŸ§™ AI Character Creator

  • Quick Create β€” type a name and concept, the AI builds a complete V2 card from scratch
  • World Lore (RAG-Lite) β€” paste a Fandom wiki URL or attach a local .txt/.pdf and the generator embeds that lore into the character
  • Editor passes β€” Anti-Puppet, Consistency Check, Quality Polish, Truncation Completion
  • Alternate greetings β€” generate up to 5 unique first messages with configurable tone
  • Lorebook auto-generation β€” world-building entries generated alongside the character

πŸ‘₯ Group Chat & Director Mode

  • Multi-character conversations β€” 2+ characters interacting with each other and with you
  • Director Mode β€” manually choose who speaks next
  • Fork any 1:1 chat into a group, preserving full message history

πŸ—£οΈ Text-to-Speech

  • Four engines: Kokoro (local, 50+ voices, 9 languages), ElevenLabs (cloud, expressive), OpenAI (cloud, premium), Piper (lightweight fallback)
  • Parallel generation β€” sentences generated concurrently for fast audio output
  • Narration filters β€” dialogue-only or skip action blocks (SillyTavern-style)
  • Per-character voices in group chats

πŸ–ΌοΈ Local Image Generation

  • Natively connects to A1111, Forge, SDNext, and Draw Things
  • Live model switching, LoRA injection, dedicated unload controls
  • Natural Language or Danbooru Tags prompt mode depending on your model

πŸ“– Porch Stories β€” Novel Generator

  • Distill character chats into a coherent storyline timeline
  • 5-stage autonomous pipeline: concept β†’ outline β†’ draft β†’ edit β†’ publish
  • Skeuomorphic page-flip reader with audiobook TTS read-along

☁️ Cloud Sync

  • Sync your entire database and character PNGs via Google Drive or Nextcloud/WebDAV
  • Row-level merge engine with UUID primary keys β€” no ID collisions across devices
  • Automatic backups before every sync, one-click restore
  • Privacy-first: syncs only to accounts you own, no data touches our servers

βš™οΈ KoboldCpp Integration

  • Automated download and update of the KoboldCpp backend
  • Hardware detection β€” Vulkan on PC, Metal on Apple Silicon, Intel ARC support
  • Model Hub: search and download GGUF models directly from HuggingFace
  • Start/Stop KoboldCpp from inside the Character Creator

πŸ†• What's New in V0.9.7.5

This release delivers a complete character editor redesign, brings editable Realism Engine settings to the card editor, and fixes several stability and data integrity bugs.

🎨 Character Editor β€” Full Redesign

  • New 4-tab layout: Details, Dialogue, Lorebook, and Worlds β€” dialogue fields (first message, alternate greetings, example conversations) are no longer crammed into the Details tab.
  • Glassmorphic section cards with icon headers for visual grouping (Identity, Personality & World, Advanced Prompts).
  • 160px avatar display with rounded corners and camera overlay β€” tap to change.
  • Collapsible Advanced Prompts β€” system prompt and post-history instructions hidden by default to reduce visual clutter.
  • Restyled lorebook cards showing keyword chips, trigger depth badges, and always-active indicators.
  • Restyled worlds tab with toggle-based linking, visual feedback, and entry count badges.
  • Consistent input styling and token counter matching the manual character creator.

🧠 Realism Engine β€” Editable in Character Editor

  • Characters can now have their Realism Engine settings configured directly in the character editor β€” no longer limited to the character creator.
  • Characters without V2.5 extensions can have them created from scratch via the editor.
  • Full access to all Realism Engine parameters: bond scores, trust level, time of day, starting emotion, recovery mechanics, and Chaos Mode toggle.
  • Includes a friendly note reminding users that changes only affect new conversations β€” existing chats keep their live state.

πŸ› Bug Fixes

  • Fixed character creator crash on Linux: The back button was calling Navigator.pop() on a tab-embedded page, popping the root navigator and leaving a black screen. Now correctly returns to the Home tab.
  • Fixed V2.5 metadata loss on avatar change: When editing a character and changing the avatar, the save flow was creating a redundant card copy that omitted Realism Engine extensions. The throwaway card has been eliminated β€” the editor now passes the live character object directly.
  • Fixed Realism Engine level 10 prompt: Refined the peak desire state prompt to describe emotional intensity without dictating deterministic narrative outcomes or causing behavioral leakage into subsequent turns.

βš™οΈ CI/CD

  • Converted release.yml from CRLF to LF line endings.
  • Added defensive carriage-return stripping to AUR package generation to prevent future regressions.
πŸ“¦ Previous Releases

V0.9.7.4

  • Documentation update: supplemented missing changelog entries from the v0.9.7.3 release.

V0.9.7.3

This release overhauls the Learned Facts system, adds full Web UI parity for the character creator, and delivers phased Realism Engine improvements for more natural character behavior.

🧠 Learned Facts β€” Quality Overhaul

  • RP-aware extraction prompt: The system now distinguishes between roleplay actions and real user information β€” no more "walked to the door" or "kissed the character" polluting your fact list.
  • Quality gate filter: Every extracted fact passes through a multi-pattern validation gate that rejects action verbs, vague generics, narrator voice, JSON artifacts, and encoding garbage before saving.
  • 50-fact cap with smart consolidation: When your fact list grows beyond 50 entries, the LLM merges related facts into denser statements (e.g., "Has a cat" + "Cat's name is Luna" β†’ "Has a cat named Luna") while preserving all specific details.
  • Semantic dedup tightened: Near-duplicate detection threshold lowered from 0.85 β†’ 0.75, catching more "same fact, different words" entries.
  • Startup garbage cleanup: Existing fact lists are automatically filtered on every app launch, removing historically accumulated junk entries.
  • GBNF grammar constraint: Local KoboldCpp models now output guaranteed-valid JSON arrays, eliminating most parse failures.

🧠 Realism Engine β€” Phased Recovery

  • Dynamic recovery phases: The post-climax recovery prompt now phases through three stages β€” immediate, settling, and late recovery β€” based on the ratio of remaining to total recovery turns. Characters with short recovery windows move through phases quickly; characters with longer windows linger naturally.
  • Per-character pacing: Recovery duration varies from 1–8 turns based on personality traits, and the prompt now reflects exactly where in that window the character is.

πŸ”„ Unified Periodic Evaluations

  • Synchronized cadence: Learned Facts extraction and Character Evolution now fire on the same timer (every 10 user messages), running sequentially instead of on separate, overlapping intervals.
  • Reduced LLM contention: Both evaluations share one window, preventing back-to-back queued requests on local backends.

πŸ–₯️ Web UI β€” Character Creator Parity

  • Manual Creator Wizard: The web UI's manual character creator is now a full 6-step wizard matching the desktop app β€” Identity β†’ Personality β†’ Dialogue β†’ Lorebook β†’ Realism Engine β†’ Review & Save.
  • AI Creator Realism Step: The AI character creator now includes a dedicated Realism Engine configuration step with bond/trust sliders, time-of-day selector, and feature toggles.
  • V2.5 character card extensions: Both creators embed Realism Engine configuration in exported character cards.
πŸ“¦ Older Releases

V0.9.7.2

This release brings community-contributed fixes and features alongside Realism Engine tuning β€” primarily focused on API compatibility, macOS packaging, and UI polish.

🀝 Community Contributions β€” thanks to @willie

  • System prompt role fix (#12): The system prompt is now sent with the proper "system" role when using chat-completion APIs (OpenRouter, LM Studio, OpenAI-compatible backends). Previously it was incorrectly sent as a "user" turn, which caused some models to behave unexpectedly.
  • LM Studio streaming fix (#11): Fixed SSE streaming compatibility with LM Studio and added support for the reasoning_content field returned by reasoning-capable models.
  • macOS RAG embedding server bundling (#10): The RAG embedding server (embed_server) was not being copied into the macOS app bundle during CI builds. RAG Memory now works out of the box on macOS without requiring a manual source build.
  • Settings tab bar styling (#13): Fixed a dark overlay appearing behind the settings tab bar and corrected low-contrast text on the selected tab label.
  • BYAF importer cache directory (#7): Fixed a crash when importing .byaf character archives if the image cache directory did not yet exist on first launch.
  • pubspec.yaml version format (#8): Corrected an invalid semver string in pubspec.yaml that caused flutter pub get to warn on strict tooling setups.

🧠 Realism Engine β€” Evaluation Tuning

  • Expanded the short-term emotional delta ranges so the engine can reflect larger mood and relationship shifts in a single turn when the narrative warrants it.
  • Strengthened the justification guidance in evaluation prompts, requiring the model to ground large deltas in concrete story evidence rather than general sentiment.

βš™οΈ Stability

  • Hardened the realism evaluation pipeline against race conditions during hot restarts and rapid message sequences.
  • Improved KoboldCpp process lifecycle management to prevent orphaned processes on app restart.
πŸ“¦ Older Releases

V0.9.7.1

🧠 Realism Engine β€” Prompt Overhaul

  • Personality-aware evaluations: All eval prompts now receive the character's personality traits, relationship tension, and trust level β€” eliminating "generic NPC" responses.
  • Emotion vocabulary guidance: Steered away from flat labels toward nuanced textures filtered through the character's personality.
  • Spatial continuity: Posture evals now receive the character's current position, preventing teleportation between turns.
  • Dramatic event inertia: Emotions now linger after high-impact narrative events instead of snapping back to neutral.
  • Trust system rebalanced: Positive trust range expanded from +10 to +50, with guidance for extraordinary trustworthiness. Catastrophic betrayals are now balanced by the ability to earn trust through genuinely remarkable actions.
  • Fixation injection rewritten: Fixations manifest as subconscious coloring (stray thoughts, loaded pauses) rather than the character awkwardly raising the topic.
  • Relationship delta reframed: Changed from "tension shift" (negatively primed) to "warmth shift" (neutral framing) to reduce false negatives.
  • Objective/fixation spam reduced: 90% of turns should produce "none" for proposed objectives; fixations now require persistent intrusive thoughts, not temporary reactions.

🎰 Chaos Mode β€” Timing Rework

  • Integrated event flow: Chance Time now triggers before the character's response so they react to both the user's message and the chaos event in a single cohesive reply.
  • Regen persistence: Chaos events persist through regenerations and swipes; cleared only when the user sends their next message.
  • Stacking prevention: SPIN NOW button disables (shows ⏳ EVENT PENDING) while an event is queued.

βš™οΈ KoboldCpp Stability

  • Thinking model support: Injected ban_eos_token and trim_stop into generation payloads for stable streaming with reasoning models.
  • Server idle detection: Eval pipeline now calls /api/extra/abort and waits for server idle before each request, eliminating dropped requests during heavy generation.
  • One-shot eval fix: Renumbered eval fields sequentially (1–10) to fix field-ordering confusion in local models.

πŸ› Bug Fixes

  • Fixed "Looking up a deactivated widget's ancestor" errors with a 150ms debounce on eval stream rebuilds.
  • Fixed trust being penalized when the character (not the user) does something guilt-inducing.
  • Fixed broken one-shot eval field numbering (fields 2 and 6 were skipped).

V0.9.7

🎰 Chance Time β€” Chaos Mode

  • Spinning wheel overlay β€” full animated roulette with emoji-themed segments, smooth easing curves, and a haptic-style bounce on landing.
  • 175+ era-agnostic events across four categories: 🟒 Fortune, πŸ”΄ Misfortune, πŸ’› Chaos, πŸ’œ Wild Card β€” plus 35 slapstick events.
  • Escalating pressure β€” 5% base chance per turn, growing +5% each turn without a trigger. Caps at 100%. After ~19 turns, Chance Time is guaranteed.
  • No escape β€” once the overlay fires there is no X button, no back button, no tapping outside. The only exit is Accept Your Fate 🎲.
  • Category-specific reveal animations β€” confetti burst (Fortune), red skull pulse (Misfortune), lightning strobe (Chaos), purple shimmer (Wild Card).
  • Manual spin β€” SPIN NOW button in the sidebar for on-demand chaos.

🎨 Chance Time UI

  • Gold-themed narration banners in chat history (🎰 centered card, distinct from normal messages).
  • Animated wheel shrinks after landing to reveal the full result card without overflow.
  • Pressure bar and percentage visible in both the sidebar and the overlay.

V0.9.6.6

⏰ Deterministic Time Progression

  • Fixed: time never moves / time jumps wildly. Time now advances on a fixed cadence: every 6 AI turns, the clock moves forward exactly one period.
  • LLM veto only. The model is asked one binary question: is the scene mid-action right now? Hold or advance.

πŸ’¬ OOC Time-Skip Detection

  • Writing (OOC: we drive for several hours) instantly moves the narrative clock before the AI responds.
  • The next AI response shows ⏩ Time skip: Evening in the delta row alongside Bond/Trust/Mood chips.

πŸ• Manual Time Nudge

  • β€Ή and β€Ί chevrons flank the Mon Β· Day 1 sidebar label when Realism is enabled.

πŸ› Bug Fixes

  • Fixed GUI overflow when a cooldown badge appeared in the Enhancements header.
  • Fixed realism baseline never being captured when enabling Realism after loading a character.

V0.9.6.5

🧠 Realism Engine 2.1

  • Emotion Inertia: Moods carry over between turns β€” small moments produce small drift, big moments require genuine cause.
  • Trust-Based Behavioral Calibration: Surfaces more of the character's inner self as trust grows, filtered through their unique persona.
  • Narrative Day-of-Week Tracking: Scene time reads Wednesday Evening (Day 3). Anchored to the real-world day Realism was first enabled.
  • Post-Greeting Baseline Eval: Engine evaluates emotion and bond from the opening message before the user types anything.

πŸ–₯️ Realism Processing Overlay β€” Redesigned

  • Animated pulsing orb, spinning halo, eval pill badges, smooth fade-in. Greeting evals use a purple "Reading the room..." mode.

πŸ“Š Sidebar

  • Day-of-week visible (Sun Β· Day 1). Active Fixation promoted above Realism. Smarter section expand defaults.

V0.9.6.4

πŸ–₯️ Realism Engine Streaming UI

  • Live glassmorphic overlay streams LLM eval tokens in real-time during emotional evaluations.
  • Fixation Engine prompt priority lowered β€” active fixations feel ambient, not overriding.

✍️ Native Desktop Spell Checking

  • macOS: NSSpellChecker via native method channel. Windows: ISpellChecker via custom C++ plugin. Fixed a plugin registration crash reported by the community.

V0.9.6.3

βš™οΈ Realism Engine 2.0

  • Long-Term Relationship Scaling, Dynamic Trust Mechanics, Character Level-Up System.
  • Collapsible sidebar modules, one-click character duplication, fault-tolerant AI generator with auto-retry.

V0.9.6.2

🎭 Realism Engine 1.0

  • Relationship & Tension System with visual tracking bars. Nuanced emotion wheel. Autonomous time progression with temporal guardrails.

V0.9.6.1

  • Context-grounded image prompts generated as the final creator step. Avatar art style selector in Quick Create. Linux CI build fixes.

V0.9.6

  • Local image generation (A1111, Forge, SDNext, Draw Things). Easy Mode Quick Create. World Lore RAG. Settings UI overhaul. Natural Language vs Danbooru Tags prompt mode. Avatar crop tool with canvas padding.

V0.9.5

  • Group chat fork from 1:1 conversations. Database power-failure protection (SQLite FULL sync + integrity check). Automatic rolling backups every 10 minutes.

V0.9.3

  • Platform-agnostic image paths. macOS auto-update fix. Cloud sync upgrade dialog fix. macOS Gatekeeper re-signing fix.

V0.9.2

  • RAG Memory β€” local semantic memory, Data Bank UI, RAG-grounded summaries. Character Evolution. User Persona Awareness. Objectives/Goals. Content toggle. Lorebook world-building focus.

V0.9.1

  • ElevenLabs TTS with configurable voice controls. Inline image rendering with security consent. WebUI mobile UX improvements.

V0.9.0

  • Database hard-delete optimization (334MB β†’ 2MB). Cloud Sync overhaul. Database Reunification migration. Full-featured Web UI. Voice Call Mode. Chat Summary. AI Character Creator. Push-to-Talk (Whisper STT). AGPL-3.0 license.

V0.8.x

  • SQLite database backend (migrated from JSON). Row-level cloud sync merge engine with UUID primary keys. Backup management. Backyard AI (.byaf) importer. Director Mode. Cloud sync via Google Drive and Nextcloud/WebDAV.

V0.7.x and earlier

  • Group chat, TTS multi-engine support (Kokoro/OpenAI/Piper), grid scale slider, bulk PNG import, chat branching, per-character system prompts, Author's Note, context/token budget viewer, external API support (OpenRouter, Nano-GPT).

πŸ“₯ Install

Linux β€” Package Manager

Debian / Ubuntu / Mint / Pop!_OS

curl -fsSL https://apt.dreamersai.art/install.sh | bash
sudo apt install front-porch-ai

Or manually:

curl -fsSL https://apt.dreamersai.art/front-porch-ai.gpg | sudo gpg --dearmor -o /etc/apt/keyrings/front-porch-ai.gpg
echo "deb [signed-by=/etc/apt/keyrings/front-porch-ai.gpg] https://apt.dreamersai.art stable main" | sudo tee /etc/apt/sources.list.d/front-porch-ai.list
sudo apt update && sudo apt install front-porch-ai

Fedora / RHEL / openSUSE

sudo dnf config-manager --add-repo https://rpm.dreamersai.art/front-porch-ai.repo
sudo dnf install front-porch-ai

Arch Linux (AUR)

yay -S front-porch-ai-bin        # Stable
yay -S front-porch-ai-beta-bin   # Beta / Pre-release

Future updates arrive through your normal system updates (apt upgrade, dnf upgrade, yay -Syu).

All Platforms β€” Manual Download

Head to the Releases page:

  • Stable: .exe installer (Windows), .dmg (macOS), .AppImage / .deb / .rpm (Linux)
  • Beta: Standalone .zip (Windows/macOS), .AppImage / .tar.gz (Linux) β€” no installer, just extract and run

πŸ› οΈ Build from Source

Prerequisites

Linux Extra Dependencies

Ubuntu/Debian

sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev libwpewebkit-1.0-dev

Arch Linux

sudo pacman -S clang cmake ninja pkgconf gtk3 xz wpewebkit

Fedora

sudo dnf install clang cmake ninja-build pkgconf-pkg-config gtk3-devel xz-devel libstdc++-devel wpewebkit-devel

wpewebkit is required for the built-in browser (Chub.ai / aicharactercards.com import). Pre-built AppImages bundle it automatically.

Build & Run

git clone https://github.com/linux4life1/front-porch-ai.git
cd front-porch-ai
flutter pub get
flutter run

macOS release build (includes RAG embedding server):

./scripts/build-macos.sh

Linux / Windows release build:

cargo build --release --manifest-path tools/embed_server/Cargo.toml
flutter build linux    # or windows

On Linux/Windows, copy tools/embed_server/target/release/embed_server next to the built executable under embed_server/embed_server.


βš™οΈ Configuration

  1. Backend β€” go to Settings β†’ Download Backend to fetch KoboldCpp, or point it at an existing binary.
  2. Model β€” go to Manage Models β†’ HuggingFace Search, find a GGUF model (recommended: Q4_K_M or Q5_K_M), download.
  3. Optimize β€” hit Auto-Configure to let the app pick the best GPU layer split and thread count for your hardware.

πŸ”“ Why Does This Exist?

Backyard AI built a genuinely good local LLM companion app. Then they killed it β€” no warning, pivoted to a cloud subscription, and left users with characters stuck in a proprietary .byaf archive format with nowhere to go.

Front Porch AI was built directly in response to that. The goal: an open-source, local-first alternative that cannot be yanked out from under you by a pivot to SaaS. We even support importing directly from .byaf files so your characters can escape.

Starting with v0.9.0, this project is licensed under AGPL-3.0 β€” meaning anyone who hosts a modified version as a service must open-source their changes too. It stays open, even in a world of cloud-hosted forks.

Note: v0.8.x and earlier are licensed under GPLv3.

🎩 Hat tip to the Backyard AI team for at least open-sourcing the .byaf format on their way out.


πŸ’¬ Community


πŸ“ Note from the Dev

To everyone who has shown up with kind words, bug reports, feature ideas, and genuine enthusiasm β€” thank you. You've turned what started as a "screw it, I'll build my own" into something worth building every day.

β€” SosukeAizen on Discord


πŸ™ Credits

Front Porch AI stands on the shoulders of these incredible open-source projects:

Project What It Does Link
KoboldCpp The local LLM backend. Single-file, GGUF-native, GPU-accelerated. GitHub
Faster Whisper Speech-to-text for push-to-talk and voice call mode. GitHub
Kokoro Default TTS engine. Beautiful offline voices via ONNX. GitHub
Piper Fallback TTS engine. Fast, lightweight, privacy-respecting. GitHub

If Front Porch AI is useful to you, please consider starring these projects too β€” they're the foundation everything is built on.

🌟 Contributors

Contributor Role
Hakko504 Bug Testing, UI/Feature Suggestions
PacmanIncarnate Bug Testing, UI/Feature Suggestions
SunTzucious Beta Testing

🀝 Contributing

Pull requests are welcome.

  1. Fork the project
  2. Create a feature branch (git checkout -b feature/my-feature)
  3. Commit your changes (git commit -m 'Add my feature')
  4. Push and open a PR

πŸ”’ Privacy

Front Porch AI does not collect, store, or transmit any personal data. Full details: Privacy Policy

πŸ“„ License

v0.9.0+ β€” AGPL-3.0
v0.8.x and earlier β€” GPL-3.0


Built with πŸ’™ using Flutter