{"id":44517532,"url":"https://github.com/sofish/agemily","last_synced_at":"2026-02-18T22:00:29.156Z","repository":{"id":338102238,"uuid":"1156301650","full_name":"sofish/agemily","owner":"sofish","description":"家庭小助手","archived":false,"fork":false,"pushed_at":"2026-02-12T21:21:48.000Z","size":4215,"stargazers_count":73,"open_issues_count":0,"forks_count":16,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-18T00:32:51.025Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sofish.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-12T13:51:50.000Z","updated_at":"2026-02-17T11:46:56.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sofish/agemily","commit_stats":null,"previous_names":["sofish/agemily"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sofish/agemily","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sofish%2Fagemily","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sofish%2Fagemily/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sofish%2Fagemily/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sofish%2Fagemily/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sofish","download_url":"https://codeload.github.com/sofish/agemily/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sofish%2Fagemily/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29596327,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T20:59:56.587Z","status":"ssl_error","status_checked_at":"2026-02-18T20:58:41.434Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-13T17:24:45.145Z","updated_at":"2026-02-18T22:00:29.138Z","avatar_url":"https://github.com/sofish.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"[**中文文档**](./README.zh-CN.md)\n\n# Agemily\n\nA cross-platform AI chat app built for elderly family members and children. Powered by Claude and Gemini with automatic memory, voice readback, web search, and intelligent model routing.\n\n## Features\n\n- **AI Chat** — Streaming responses with Markdown rendering, extended thinking display, and image input\n- **Web Search** — Real-time web search via the Anthropic `web_search` tool; togglable in settings\n- **Auto Memory** — Automatically extracts key facts from conversations, scores and ranks them, then injects relevant context into future turns\n- **Smart Model Routing** — Everyday questions use Claude Sonnet 4.5; complex topics (medical, legal, analytical) automatically switch to Gemini 3 Pro\n- **Voice Readback** — Tap any assistant message to hear it read aloud (auto-detects Chinese / English)\n- **Context Management** — Token tracking, message truncation, and automatic compaction to stay within the context window\n- **Multi-Session** — Parallel conversations with auto-generated titles\n- **Offline Recovery** — Detects connectivity changes and auto-retries after reconnection\n\n## Quick Start\n\n### Prerequisites\n\n- Flutter SDK \u003e= 3.10.8\n- Xcode (for iOS)\n- Android SDK (for Android)\n\n### Install\n\n```bash\ngit clone https://github.com/sofish/agemily.git\ncd agemily\nflutter pub get\n```\n\n#### Local Development\n\nCreate a `.env` file from the template:\n\n```bash\ncp .env.example .env\n# Edit .env with your API key and base URL\n```\n\nThe `.env` file is **only loaded in debug mode** (`flutter run`). Credentials stay local and are never bundled into release builds.\n\n```bash\nflutter run\n```\n\n#### Release Build\n\nRelease builds do **not** read `.env`. Users enter their API key through the in-app onboarding screen on first launch.\n\n```bash\n# iOS\nflutter build ios --release\n\n# Android APK (with obfuscation)\nflutter build apk --release --obfuscate --split-debug-info=build/debug-info\n```\n\n## Project Structure\n\n```\nlib/\n├── main.dart                  # Bootstrap, splash, debug-mode .env loading\n├── app.dart                   # GoRouter routes, app lifecycle (background memory extraction)\n├── core/\n│   ├── models/                # Message, Session, MemoryNote, LlmConfig, Usage\n│   └── services/              # LLM client, AgentRunner, MemoryManager, ContextManager\n├── data/\n│   ├── database/              # Drift ORM — table definitions, DAOs, migrations\n│   └── api/\n├── providers/                 # Riverpod state management (chat, session, settings, agent)\n└── ui/\n    ├── chat/                  # Chat screen, message bubbles, input bar, model selector\n    ├── settings/              # API config, system prompt, memory management\n    ├── sessions/              # Session list\n    └── shared/                # Theme, localization\n```\n\n## Tech Stack\n\n- **Flutter** + **Riverpod** for state management\n- **Drift** (SQLite) for local persistence\n- **FlutterSecureStorage** for API key storage\n- **Dio** for streaming HTTP\n- **flutter_tts** for text-to-speech\n- **GoRouter** for navigation\n\n## Configuration\n\n### `.env` (debug mode only)\n\n| Variable | Description |\n|---|---|\n| `LLM_API_KEY` | API key (auto-loaded in debug mode) |\n| `LLM_API_BASE` | API base URL (auto-loaded in debug mode) |\n\n### In-App Settings\n\nAPI key, base URL, system prompt, model selection, and web search toggle can all be changed under **Settings \u003e API Config**. In release builds this is the only way to configure credentials.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsofish%2Fagemily","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsofish%2Fagemily","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsofish%2Fagemily/lists"}