Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
224 commits
Select commit Hold shift + click to select a range
ab230ea
Delete .devcontainer directory
sothiss May 25, 2026
a10807e
chore: remove unused files and associated references
harleygirlu2-png May 25, 2026
dff877e
Merge branch 'master' of https://github.com/sothiss/ethopipe
harleygirlu2-png May 25, 2026
3b360b5
chore: add Visual Studio workspace configuration files and environmen…
harleygirlu2-png May 26, 2026
7731587
chore: add Visual Studio solution configuration files to workspace
harleygirlu2-png May 26, 2026
075978f
checkout: temporary commit for worktree checkout
harleygirlu2-png May 26, 2026
eab39ed
checkout: temporary commit for worktree checkout
harleygirlu2-png May 26, 2026
4545ada
checkout: temporary commit for worktree checkout
harleygirlu2-png May 26, 2026
abae896
feat: introduce EthologicalObservation Pydantic model with Darwin Cor…
harleygirlu2-png May 26, 2026
2dcba1a
checkout: temporary commit for worktree checkout
harleygirlu2-png May 26, 2026
bc382b7
Add Microsoft Defender for DevOps workflow
sothiss May 26, 2026
3c2d45c
Update .gitignore to explicitly block __pycache__/, .env, and GCP ser…
sothiss May 26, 2026
26ca53f
Potential fix for code scanning alert no. 1: Workflow does not contai…
sothiss May 26, 2026
0624297
Create SECURITY.md for security policy
sothiss May 26, 2026
b937938
Initial plan
Copilot May 26, 2026
98756bb
docs: add Gemini Code Assist setup note
Copilot May 26, 2026
59592ad
Merge pull request #4 from sothiss/copilot/fix-installation-incomplet…
sothiss May 26, 2026
8a38767
Update README.md
sothiss May 26, 2026
e23bf7e
Align defender workflow with referenced commit
Copilot May 27, 2026
4154b08
Merge pull request #6 from sothiss/copilot/da05c194-features-enhancement
sothiss May 27, 2026
a3500a9
Fix comment formatting in dependabot.yml
sothiss May 27, 2026
b035f50
feat: add system architect workflow configuration for EthoPipe develo…
harleygirlu2-png May 27, 2026
d8c89f7
checkout: temporary commit for worktree checkout
harleygirlu2-png May 27, 2026
1ea32ed
Merge branch 'master' of https://github.com/sothiss/ethopipe
harleygirlu2-png May 27, 2026
28073d4
checkout: temporary commit for worktree checkout
harleygirlu2-png May 27, 2026
c7a419d
checkout: temporary commit for worktree checkout
harleygirlu2-png May 27, 2026
c55a407
chore: add Microsoft Defender for DevOps workflow and Dependabot conf…
harleygirlu2-png May 27, 2026
2abe356
checkout: temporary commit for worktree checkout
harleygirlu2-png May 27, 2026
6be08dd
checkout: temporary commit for worktree checkout
harleygirlu2-png May 27, 2026
22ad2fd
feat: add dependabot configuration and microsoft defender for devops …
harleygirlu2-png May 27, 2026
fc84ce2
checkout: temporary commit for worktree checkout
harleygirlu2-png May 27, 2026
a1916bd
chore(deps): bump github/codeql-action
dependabot[bot] May 27, 2026
98f3ca4
chore(deps): bump microsoft/security-devops-action from 1.6.0 to 1.12.0
dependabot[bot] May 27, 2026
fae56c3
chore(deps): bump actions/checkout from 4.1.7 to 6.0.2
dependabot[bot] May 27, 2026
48b5959
Merge pull request #8 from sothiss/dependabot/github_actions/microsof…
sothiss May 27, 2026
2ed2ec5
Merge pull request #7 from sothiss/dependabot/github_actions/github/c…
sothiss May 27, 2026
7ac9776
Merge pull request #9 from sothiss/dependabot/github_actions/actions/…
sothiss May 27, 2026
1ea57bf
feat: introduce EthologicalObservation Pydantic model for Darwin Core…
harleygirlu2-png May 27, 2026
1c91627
checkout: temporary commit for worktree checkout
harleygirlu2-png May 27, 2026
b7027d5
checkout: temporary commit for worktree checkout
harleygirlu2-png May 27, 2026
e9ea10e
checkout: temporary commit for worktree checkout
harleygirlu2-png May 27, 2026
b8b3aa4
checkout: temporary commit for worktree checkout
harleygirlu2-png May 27, 2026
27f5a29
feat: add viewport meta tag to index.html for responsive scaling
harleygirlu2-png May 27, 2026
f2cfe36
checkout: temporary commit for worktree checkout
harleygirlu2-png May 27, 2026
bc4f8d7
checkout: temporary commit for worktree checkout
harleygirlu2-png May 27, 2026
ff7c4b9
checkout: temporary commit for worktree checkout
harleygirlu2-png May 27, 2026
cc8a837
chore: add MIT license file
harleygirlu2-png May 27, 2026
5845fa1
checkout: temporary commit for worktree checkout
harleygirlu2-png May 27, 2026
24c6529
docs: replace README content with comprehensive EthoPipe project docu…
harleygirlu2-png May 27, 2026
d89ee8c
checkout: temporary commit for worktree checkout
harleygirlu2-png May 27, 2026
af065e7
docs: fix markdown formatting and whitespace inconsistencies in READM…
harleygirlu2-png May 27, 2026
e3eb39e
checkout: temporary commit for worktree checkout
harleygirlu2-png May 27, 2026
b505df9
chore: update LICENSE header format
harleygirlu2-png May 27, 2026
e0a04e4
feat: initialize ethopipe project with EthologicalObservation Pydanti…
harleygirlu2-png May 27, 2026
2239ab3
checkout: temporary commit for worktree checkout
harleygirlu2-png May 27, 2026
ac5f20e
checkout: temporary commit for worktree checkout
harleygirlu2-png May 27, 2026
b681880
feat: implement ingestion engine for CSV and JSON data parsing with s…
harleygirlu2-png May 27, 2026
302c06b
checkout: temporary commit for worktree checkout
harleygirlu2-png May 27, 2026
1b2d8d8
checkout: temporary commit for worktree checkout
harleygirlu2-png May 27, 2026
e042090
Add OSSAR workflow for static analysis
sothiss May 27, 2026
3104dac
Create python-app.yml
sothiss May 27, 2026
dbc4f58
Add SLSA generic generator workflow
sothiss May 27, 2026
2d82a81
Initial plan
Copilot May 27, 2026
035c704
Merge pull request #10 from sothiss/copilot/apply-autofixes-918
sothiss May 28, 2026
b84c722
Potential fix for code scanning alert no. 2: Workflow does not contai…
sothiss May 28, 2026
7f75d7d
Merge pull request #11 from sothiss/alert-autofix-2
harleygirlu2-png May 28, 2026
bf9eb4d
Add GitHub Actions workflow for Python package with Conda
sothiss May 28, 2026
8cbfd0f
Potential fix for pull request finding 'CodeQL / Workflow does not co…
sothiss May 28, 2026
b07bab0
Fix CI dependency install step in conda workflow
Copilot May 28, 2026
d48dcd4
checkout: temporary commit for worktree checkout
harleygirlu2-png May 28, 2026
02c32e2
feat: add EthologicalObservation Pydantic model with Darwin Core mapp…
harleygirlu2-png May 28, 2026
51d26aa
feat: implement ingestion engine for parsing and validating ethologic…
harleygirlu2-png May 28, 2026
64fca91
test: add validation coverage for EthologicalObservation model parame…
harleygirlu2-png May 28, 2026
d847d85
test: add unit tests for CSV and JSON ingestion validation and quaran…
harleygirlu2-png May 28, 2026
acf50e9
test: add comprehensive unit tests for CSV and JSON ingestion validat…
harleygirlu2-png May 28, 2026
f3bd947
feat: add ingestion engine to parse, map, and validate ethological re…
harleygirlu2-png May 28, 2026
a2e7208
checkout: temporary commit for worktree checkout
harleygirlu2-png May 28, 2026
5b88fac
checkout: temporary commit for worktree checkout
harleygirlu2-png May 28, 2026
7d74047
Merge branch 'master' of https://github.com/sothiss/ethopipe
harleygirlu2-png May 28, 2026
4442c82
ci: add GitHub Actions workflow for automated testing and linting
harleygirlu2-png May 28, 2026
90b0a46
ci: add workflow files for SLSA provenance generation, OSSAR security…
harleygirlu2-png May 28, 2026
911a8fa
checkout: temporary commit for worktree checkout
harleygirlu2-png May 28, 2026
2813bc3
feat: add SLSA provenance generation workflow for release artifacts
harleygirlu2-png May 28, 2026
790c4bf
ci: add GitHub Actions workflow for linting and testing Python applic…
harleygirlu2-png May 28, 2026
a2e48a0
ci: add conda workflow for automated testing and linting on push and …
harleygirlu2-png May 28, 2026
8de0f8a
feat: add OSSAR static analysis workflow to GitHub Actions
harleygirlu2-png May 28, 2026
5888989
checkout: temporary commit for worktree checkout
harleygirlu2-png May 28, 2026
2574c14
Delete .github/workflows/python-app.yml
sothiss May 28, 2026
2d6ca54
Delete .github/workflows/python-package-conda.yml
sothiss May 28, 2026
f0137d5
Delete .github/workflows/ossar.yml
sothiss May 28, 2026
27c9977
checkout: temporary commit for worktree checkout
harleygirlu2-png May 28, 2026
3133c59
checkout: temporary commit for worktree checkout
harleygirlu2-png May 28, 2026
81d270e
feat: implement EthologicalObservation model with Darwin Core mapping…
harleygirlu2-png May 28, 2026
4f538aa
feat: implement EthologicalObservation Pydantic model and CSV/JSON in…
harleygirlu2-png May 28, 2026
315185d
checkout: temporary commit for worktree checkout
harleygirlu2-png May 28, 2026
0feedf8
checkout: temporary commit for worktree checkout
harleygirlu2-png May 28, 2026
a7c8bc0
feat: add EthologicalObservation Pydantic model with Darwin Core-mapp…
harleygirlu2-png May 28, 2026
c35c1eb
checkout: temporary commit for worktree checkout
harleygirlu2-png May 28, 2026
699e830
checkout: temporary commit for worktree checkout
harleygirlu2-png May 28, 2026
af9dcd7
feat: implement data ingestion and validation logic with CSV/JSON sup…
harleygirlu2-png May 28, 2026
14a8433
checkout: temporary commit for worktree checkout
harleygirlu2-png May 28, 2026
f28b9cc
feat: implement Firestore and CSV loaders for persisting ethological …
harleygirlu2-png May 28, 2026
5c84fb6
checkout: temporary commit for worktree checkout
harleygirlu2-png May 28, 2026
066347f
feat: implement FastAPI service layer for EthoPipe ingestion and vali…
harleygirlu2-png May 28, 2026
d300798
feat: implement FastAPI service layer with validation and batch inges…
harleygirlu2-png May 28, 2026
eb3b25a
checkout: temporary commit for worktree checkout
harleygirlu2-png May 28, 2026
1c07809
feat: implement rule-based narrative extractor for ethological observ…
harleygirlu2-png May 28, 2026
8983efe
checkout: temporary commit for worktree checkout
harleygirlu2-png May 28, 2026
8adebfe
checkout: temporary commit for worktree checkout
harleygirlu2-png May 28, 2026
16636e7
feat: add regex-based parser to extract physiological vitals and beha…
harleygirlu2-png May 28, 2026
b312439
checkout: temporary commit for worktree checkout
harleygirlu2-png May 28, 2026
1f046d5
checkout: temporary commit for worktree checkout
harleygirlu2-png May 28, 2026
a78aa5e
Merge master into main: resolve workflow conflict with permissions an…
Copilot May 28, 2026
eb291ea
Merge pull request #2 from sothiss/main
harleygirlu2-png May 28, 2026
dc2e5c0
Delete .github/workflows/defender-for-devops.yml
sothiss May 28, 2026
bf37c1a
Add Microsoft Defender For DevOps workflow
sothiss May 28, 2026
864332b
Potential fix for code scanning alert no. 1: Workflow does not contai…
sothiss May 28, 2026
2a2b779
Add GitHub Actions workflow for labeling PRs
sothiss May 28, 2026
0aa568a
checkout: temporary commit for worktree checkout
harleygirlu2-png May 31, 2026
d60ad3b
feat: add JOSS manuscript documentation and automated GitHub Actions …
harleygirlu2-png May 31, 2026
fe7ab8b
chore: add CITATION.cff and update project metadata in pyproject.toml
harleygirlu2-png May 31, 2026
6186955
checkout: temporary commit for worktree checkout
harleygirlu2-png May 31, 2026
a3f819f
checkout: temporary commit for worktree checkout
harleygirlu2-png May 31, 2026
1de8524
feat: add GitHub Actions workflow to generate JOSS draft PDF from pap…
harleygirlu2-png May 31, 2026
86618d2
checkout: temporary commit for worktree checkout
harleygirlu2-png May 31, 2026
97daaca
chore(deps): bump actions/labeler from 4 to 6
dependabot[bot] May 31, 2026
301028e
chore(deps): bump github/codeql-action from 3 to 4
dependabot[bot] May 31, 2026
7a32ca1
chore(deps): bump actions/setup-dotnet from 4 to 5
dependabot[bot] May 31, 2026
6f26254
chore(deps): bump microsoft/security-devops-action from 1.6.0 to 1.12.0
dependabot[bot] May 31, 2026
15ac576
chore(deps): bump slsa-framework/slsa-github-generator/.github/workfl…
dependabot[bot] May 31, 2026
2fa98b7
feat: add GitHub Actions workflows for automated PR labeling and Micr…
harleygirlu2-png May 31, 2026
b63c704
checkout: temporary commit for worktree checkout
harleygirlu2-png May 31, 2026
69bbc87
checkout: temporary commit for worktree checkout
harleygirlu2-png May 31, 2026
e2100e3
feat: implement EthologicalObservation model with Darwin Core mapping…
harleygirlu2-png May 31, 2026
7b8b86a
feat: implement ingestion engine with CSV/JSON parsing, pre-processin…
harleygirlu2-png May 31, 2026
90546e9
test: add extraction and model validation unit tests
harleygirlu2-png May 31, 2026
fdfe3ff
test: add ingestion validation and error handling test suite for CSV …
harleygirlu2-png May 31, 2026
630de7a
feat: implement extraction module to parse unstructured behavioral an…
harleygirlu2-png May 31, 2026
2772710
test: add unit tests for narrative-based extraction of vitals, behavi…
harleygirlu2-png May 31, 2026
1dae186
checkout: temporary commit for worktree checkout
harleygirlu2-png May 31, 2026
f4cfbd8
checkout: temporary commit for worktree checkout
harleygirlu2-png May 31, 2026
6545934
Add GitHub labeler configuration file
harleygirlu2-png May 31, 2026
c4e1a6d
Implement code changes to enhance functionality and improve performance
sothiss May 31, 2026
23e62c7
chore: update pull request labeler configuration for improved file ma…
sothiss May 31, 2026
cacbbb9
Potential fix for code scanning alert no. 8: Workflow does not contai…
harleygirlu2-png May 31, 2026
218b8f2
Potential fix for pull request finding
sothiss May 31, 2026
9e97fb5
feat: add GitHub workflows for PR labeling, Defender for DevOps, and …
harleygirlu2-png May 31, 2026
96d229b
chore: add automated PR labeling and Microsoft Defender for DevOps se…
harleygirlu2-png May 31, 2026
20e1c4a
checkout: temporary commit for worktree checkout
harleygirlu2-png May 31, 2026
a22b213
checkout: temporary commit for worktree checkout
harleygirlu2-png May 31, 2026
52d9f4f
Update Patreon username in FUNDING.yml
sothiss May 31, 2026
1c14581
Specify Patreon username in FUNDING.yml
sothiss May 31, 2026
c885795
Update Patreon username in FUNDING.yml
sothiss May 31, 2026
00a7d14
Merge branch 'master' of https://github.com/sothiss/ethopipe
harleygirlu2-png Jun 1, 2026
03add6b
checkout: temporary commit for worktree checkout
harleygirlu2-png Jun 1, 2026
073d476
ci: add GitHub Actions CI workflow and automated PR labeler configura…
harleygirlu2-png Jun 1, 2026
6dc6dd2
chore: remove unused file from codebase
harleygirlu2-png Jun 1, 2026
8ed8559
feat: add Microsoft Defender for DevOps GitHub Actions workflow
harleygirlu2-png Jun 1, 2026
b97192c
checkout: temporary commit for worktree checkout
harleygirlu2-png Jun 1, 2026
42daed3
checkout: temporary commit for worktree checkout
harleygirlu2-png Jun 1, 2026
a48456d
feat: add CI, SLSA provenance generation, and Microsoft Defender for …
harleygirlu2-png Jun 1, 2026
fe18677
feat: add automated PR path labeling workflow using GitHub Labeler ac…
harleygirlu2-png Jun 1, 2026
ef7e6f0
checkout: temporary commit for worktree checkout
harleygirlu2-png Jun 1, 2026
8d7552c
fix(ci): pin microsoft/security-devops-action to a valid commit SHA o…
harleygirlu2-png Jun 1, 2026
d771d31
checkout: temporary commit for worktree checkout
harleygirlu2-png Jun 1, 2026
10d389b
checkout: temporary commit for worktree checkout
harleygirlu2-png Jun 1, 2026
5b345d6
checkout: temporary commit for worktree checkout
harleygirlu2-png Jun 1, 2026
272f49a
feat: add SLSA provenance generation workflow for release artifacts
harleygirlu2-png Jun 1, 2026
6a0e9f6
checkout: temporary commit for worktree checkout
harleygirlu2-png Jun 1, 2026
13de9fa
Handle missing Firestore dependency gracefully
Copilot May 31, 2026
dcd7ce5
Make Firestore dependency optional at import time
Copilot May 31, 2026
52336dc
Potential fix for pull request finding
sothiss May 31, 2026
53d5cef
feat: implement Firestore and CSV loaders with deterministic document…
harleygirlu2-png Jun 1, 2026
c89e351
checkout: temporary commit for worktree checkout
harleygirlu2-png Jun 1, 2026
ca52de9
chore: add devcontainer configuration and firebase project settings
harleygirlu2-png Jun 1, 2026
b6aba9a
feat: initialize package-lock.json for dependency tracking
harleygirlu2-png Jun 1, 2026
110ad58
chore: add firebase-debug.log for environment setup tracking
harleygirlu2-png Jun 1, 2026
4177d05
feat: initialize agent skills library, Firebase configuration, and Da…
harleygirlu2-png Jun 1, 2026
7bf2010
chore: add Firebase VS Code extension debug logs
harleygirlu2-png Jun 1, 2026
b796809
chore: create Firebase VSCE debug log file
harleygirlu2-png Jun 1, 2026
09c93e5
feat: add devcontainer Dockerfile for consistent Python 3.11 developm…
harleygirlu2-png Jun 1, 2026
3447297
feat: add Dockerfile to define devcontainer environment with Python 3…
harleygirlu2-png Jun 1, 2026
6251784
feat: add devcontainer configuration for standardized development env…
harleygirlu2-png Jun 1, 2026
f554786
chore: remove unused files and associated references
harleygirlu2-png Jun 1, 2026
6700025
checkout: temporary commit for worktree checkout
harleygirlu2-png Jun 1, 2026
dbaa25c
checkout: temporary commit for worktree checkout
harleygirlu2-png Jun 1, 2026
a282e5c
chore: add Firebase extension debug log file
harleygirlu2-png Jun 1, 2026
989dc09
chore: add Firebase VSCE debug logs to repository
harleygirlu2-png Jun 1, 2026
8bb2b9d
chore: install and sync dependencies in node_modules
harleygirlu2-png Jun 1, 2026
32425eb
feat: implement EthologicalObservation Pydantic model for Darwin Core…
harleygirlu2-png Jun 1, 2026
3b9f06f
feat: implement BaseLoader interface and concrete Firestore and CSV p…
harleygirlu2-png Jun 1, 2026
719666d
feat: add Firestore and CSV loaders for persisting ethological observ…
harleygirlu2-png Jun 1, 2026
eff21be
feat: add ingestion engine to parse, map, and validate observation da…
harleygirlu2-png Jun 1, 2026
1025b63
feat: implement FastAPI service layer with observation validation and…
harleygirlu2-png Jun 1, 2026
f5ca780
feat: implement ethological observation data models with strict valid…
harleygirlu2-png Jun 1, 2026
6fca0cc
test: add integration tests for API validation and data ingestion end…
harleygirlu2-png Jun 1, 2026
9c6a36c
test: add integration tests for API validation and data ingestion end…
harleygirlu2-png Jun 1, 2026
5735d29
test: add ingestion validation and parsing test suite for CSV and JSO…
harleygirlu2-png Jun 1, 2026
0fa81fd
test: add unit tests for CSV and JSON ingestion pipelines including v…
harleygirlu2-png Jun 1, 2026
eb1b5e1
checkout: temporary commit for worktree checkout
harleygirlu2-png Jun 1, 2026
dc69e1a
checkout: temporary commit for worktree checkout
harleygirlu2-png Jun 1, 2026
f127663
checkout: temporary commit for worktree checkout
harleygirlu2-png Jun 1, 2026
49612eb
checkout: temporary commit for worktree checkout
harleygirlu2-png Jun 1, 2026
940f8a4
checkout: temporary commit for worktree checkout
harleygirlu2-png Jun 1, 2026
29c8e91
chore: add Firebase extension debug logs file
harleygirlu2-png Jun 1, 2026
8f60c73
chore: add Firebase VSCE debug logs
harleygirlu2-png Jun 1, 2026
c76d25e
chore: add Firebase extension debug logs for emulator lifecycle tracking
harleygirlu2-png Jun 1, 2026
fa006eb
chore: add Firebase extension debug logs for troubleshooting Data Con…
harleygirlu2-png Jun 1, 2026
5809075
add enterprise and standard reference guides for Firestore security r…
harleygirlu2-png Jun 1, 2026
ba3b324
add reference documentation for generating secure Firebase Firestore …
harleygirlu2-png Jun 1, 2026
24c7441
checkout: temporary commit for worktree checkout
harleygirlu2-png Jun 1, 2026
09290a4
checkout: temporary commit for worktree checkout
harleygirlu2-png Jun 1, 2026
dfde86d
checkout: temporary commit for worktree checkout
harleygirlu2-png Jun 1, 2026
13d8e55
feat: add GitHub Actions workflow to automate JOSS manuscript PDF gen…
harleygirlu2-png Jun 1, 2026
b9eba09
checkout: temporary commit for worktree checkout
harleygirlu2-png Jun 1, 2026
e0936e9
Remove unused imports causing lint failures
Copilot Jun 1, 2026
56abe1e
Apply Black formatting and clean imports
Copilot Jun 1, 2026
6fa6057
feat: enhance Firebase plugin logging for token validation and user d…
harleygirlu2-png Jun 1, 2026
4f5d1ff
checkout: temporary commit for worktree checkout
harleygirlu2-png Jun 1, 2026
9d8f47c
checkout: temporary commit for worktree checkout
harleygirlu2-png Jun 1, 2026
3ed77df
Fix invalid setup-python action pin in CI
Copilot Jun 1, 2026
104807a
fix(ci): restore correct setup-python v5.1.0 pinned SHA
Copilot Jun 1, 2026
f5934d1
Delete .github/workflows/defender-for-devops.yml
sothiss Jun 1, 2026
5cc2ef3
Delete .github/workflows/labeler.yml
sothiss Jun 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
123 changes: 123 additions & 0 deletions .agents/skills/firebase-ai-logic-basics/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
---
name: firebase-ai-logic-basics
description: Official skill for integrating Firebase AI Logic (Gemini API) into web applications. Covers setup, multimodal inference, structured output, and security.
version: 1.0.1
---

# Firebase AI Logic Basics

## Overview

Firebase AI Logic is a product of Firebase that allows developers to add gen AI to their mobile and web apps using client-side SDKs. You can call Gemini models directly from your app without managing a dedicated backend. Firebase AI Logic, which was previously known as "Vertex AI for Firebase", represents the evolution of Google's AI integration platform for mobile and web developers.

It supports the two Gemini API providers:
- **Gemini Developer API**: It has a free tier ideal for prototyping, and pay-as-you-go for production
- **Vertex AI Gemini API**: Ideal for scale with enterprise-grade production readiness, requires Blaze plan

Use the Gemini Developer API as a default, and only Vertex AI Gemini API if the application requires it.

## Setup & Initialization

### Prerequisites

- Before starting, ensure you have **Node.js 16+** and npm installed. Install them if they aren’t already available.
- Identify the platform the user is interested in building on prior to starting: Android, iOS, Flutter or Web.
- If their platform is unsupported, Direct the user to Firebase Docs to learn how to set up AI Logic for their application (share this link with the user https://firebase.google.com/docs/ai-logic/get-started)

### Installation

The library is part of the standard Firebase Web SDK.

`npm install -g firebase@latest`

If you're in a firebase directory (with a firebase.json) the currently selected project will be marked with "current" using this command:

`npx -y firebase-tools@latest projects:list`

Ensure there's at least one app associated with the current project

`npx -y firebase-tools@latest apps:list`

Initialize AI logic SDK with the init command

`npx -y firebase-tools@latest init ailogic`

This will automatically enable the Gemini Developer API in the Firebase console.

More info in [Firebase AI Logic Getting Started](https://firebase.google.com/docs/ai-logic/get-started.md.txt)

## Core Capabilities

### Text-Only Generation

### Multimodal (Text + Images/Audio/Video/PDF input)

Firebase AI Logic allows Gemini models to analyze image files directly from your app. This enables features like creating captions, answering questions about images, detecting objects, and categorizing images. Beyond images, Gemini can analyze other media types like audio, video, and PDFs by passing them as inline data with their MIME type. For files larger than 20 megabytes (which can cause HTTP 413 errors as inline data), store them in Cloud Storage for Firebase and pass their URLs to the Gemini Developer API.

### Chat Session (Multi-turn)

Maintain history automatically using `startChat`.

### Streaming Responses

To improve the user experience by showing partial results as they arrive (like a typing effect), use `generateContentStream` instead of `generateContent` for faster display of results.

### Generate Images with Nano Banana

- Start with Gemini for most use cases, and choose Imagen for specialized tasks where image quality and specific styles are critical. (Example: gemini-2.5-flash-image)
- Requires an upgraded Blaze pay-as-you-go billing plan.

### Search Grounding with the built in googleSearch tool

## Supported Platforms and Frameworks

Supported Platforms and Frameworks include Kotlin and Java for Android, Swift for iOS, JavaScript for web apps, Dart for Flutter, and C Sharp for Unity.

## Advanced Features

### Structured Output (JSON)

Enforce a specific JSON schema for the response.

### On-Device AI (Hybrid)

Hybrid on-device inference for web apps, where the Firebase Javascript SDK automatically checks for Gemini Nano's availability (after installation) and switches between on-device or cloud-hosted prompt execution. This requires specific steps to enable model usage in the Chrome browser, more info in the [hybrid-on-device-inference documentation](https://firebase.google.com/docs/ai-logic/hybrid-on-device-inference.md.txt).

## Security & Production

### App Check

> [!WARNING]
> **Critical Safety Requirement:** In order to use AI Logic safely, you MUST set up App Check on your app. This prevents unauthorized clients from using your API quota and accessing your backend resources.

See [App Check with reCAPTCHA Enterprise](https://firebase.google.com/docs/app-check/web/recaptcha-enterprise-provider.md.txt) for setup instructions.

### Remote Config

Consider that you do not need to hardcode model names (e.g., `gemini-flash-lite-latest`). Use Firebase Remote Config to update model versions dynamically without deploying new client code. See [Changing model names remotely](https://firebase.google.com/docs/ai-logic/change-model-name-remotely.md.txt)


> [!WARNING]
> **CRITICAL: Backend Provisioning Required**
> For all platforms (Flutter, Android, iOS, Web), you MUST run `npx firebase-tools init ailogic` to provision the service. `flutterfire configure` ONLY handles client configuration and does NOT enable the AI service, leading to `PERMISSION_DENIED` errors.
## Initialization Code References

| Language, Framework, Platform | Gemini API provider | Context URL |
| :---- | :---- | :---- |
| Web Modular API | Gemini Developer API (Developer API) | firebase://docs/ai-logic/get-started |
| iOS (Swift) | Gemini Developer API | [ios_setup.md](references/ios_setup.md) |
| Flutter (Dart) | Gemini Developer API | [flutter_setup.md](references/flutter_setup.md) |

**Always use the most recent version of Gemini (gemini-flash-latest) unless another model is requested by the docs or the user. DO NOT USE gemini-1.5-flash. **

## References

[Web SDK code examples and usage patterns](references/usage_patterns_web.md)
[iOS SDK code examples and usage patterns](references/ios_setup.md)
[Flutter SDK code examples and usage patterns](references/flutter_setup.md)


[Android (Kotlin) SDK usage patterns](references/usage_patterns_android.md)



Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Flutter Setup for Firebase AI Logic

This guide covers how to integrate Firebase AI Logic (Gemini API) into your Flutter applications.

> [!IMPORTANT]
> **Foundational Workflows & CLI-First Approach:**
> 1. **Review Foundation:** Before implementing platform-specific code, ALWAYS review the foundational `firebase-basics` skill to ensure familiarity with core workflows.
> 2. **Backend Provisioning via CLI:** Use the Firebase CLI for backend setup. Running `npx firebase-tools init ailogic` is MANDATORY to provision the service. `flutterfire configure` does NOT enable the AI service and will result in `PERMISSION_DENIED` if skipped.
> 3. **Client Configuration:** Use `flutterfire configure` strictly for generating `firebase_options.dart`. Avoid manual Console configuration.

> [!NOTE]
> `firebase_vertexai` has been replaced by `firebase_ai`. Always use `firebase_ai` for new projects.

## Installation

Add the necessary Firebase dependencies to your `pubspec.yaml`:

```yaml
dependencies:
flutter:
sdk: flutter
firebase_core: ^4.0.0
firebase_auth: ^6.0.0
firebase_ai: ^3.0.0
```

Run `flutter pub get` to install the packages.

## Initialization

Initialize Firebase and sign in (anonymously or via authenticated user) before using AI Logic.

```dart
import 'package:firebase_core/firebase_core.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:firebase_ai/firebase_ai.dart';

void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
await FirebaseAuth.instance.signInAnonymously();
runApp(const MyApp());
}
```

## Usage

Use `FirebaseAI.googleAI` for the **Gemini Developer API**.

> [!IMPORTANT]
> **Model Selection:** Always use **`gemini-flash-latest`**. DO NOT USE `gemini-1.5-flash`.

> [!IMPORTANT]
> **Choose the Right API Provider:** Always use `FirebaseAI.googleAI` (Gemini Developer API) as the default for prototyping and standard use. Avoid using the Vertex AI Gemini API unless your application specifically requires enterprise-grade scalability and is configured for the Blaze plan.

### Text Generation

```dart
import 'package:firebase_ai/firebase_ai.dart';
import 'package:firebase_auth/firebase_auth.dart';

Future<String> generateText(String prompt) async {
final googleAI = FirebaseAI.googleAI(auth: FirebaseAuth.instance);

// Use the latest Gemini Flash model
final model = googleAI.generativeModel(model: 'gemini-flash-latest');

final response = await model.generateContent([Content.text(prompt)]);
return response.text ?? 'No response';
}
```

### Chat Session

```dart
final chat = model.startChat(history: [
Content.text('Hello, I am a user.'),
Content.model([TextPart('Hello! How can I help you today?')]),
]);

final response = await chat.sendMessage(Content.text('What is CBT?'));
```
143 changes: 143 additions & 0 deletions .agents/skills/firebase-ai-logic-basics/references/ios_setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
# Firebase AI Logic iOS Setup Guide

## 1. Import and Initialize
Ensure you have installed the `FirebaseAILogic` SDK via Swift Package Manager.

```swift
import FirebaseAILogic

// Initialize the Firebase AI service and the generative model.
let ai = FirebaseAI.firebaseAI()

// Specify a model that's appropriate for your use case.
let model = ai.generativeModel(modelName: "gemini-flash-latest")
```

## 2. SwiftUI Integration (Best Practices)
Use the `@Observable` pattern to manage AI state and provide a smooth UX with loading indicators and error handling.

> **⛔️ CRITICAL WARNING:** Do NOT initialize the model inline as a class property if there's any chance the view model is instantiated before `FirebaseApp.configure()` executes in the app root.
> To be safe, initialize the model lazily or pass it in from a point in the hierarchy where Firebase is guaranteed to be configured.

```swift
import SwiftUI
import FirebaseAILogic

@MainActor
@Observable
final class AIViewModel {
// Initialize lazily to ensure FirebaseApp is configured first
private lazy var model = FirebaseAI.firebaseAI().generativeModel(modelName: "gemini-flash-latest")

var responseText: String = ""
var isFetching: Bool = false
var errorMessage: String?

func generate(prompt: String) async {
isFetching = true
errorMessage = nil
defer { isFetching = false }

do {
let response = try await model.generateContent(prompt)
self.responseText = response.text ?? "No response"
} catch {
self.errorMessage = error.localizedDescription
}
}
}

struct AIView: View {
@State private var viewModel = AIViewModel()
@State private var prompt = "Write a story about a magic backpack."

var body: some View {
VStack {
TextField("Enter prompt", text: $prompt)

Button("Generate") {
Task { await viewModel.generate(prompt: prompt) }
}
.disabled(viewModel.isFetching)

if viewModel.isFetching {
ProgressView()
} else if let error = viewModel.errorMessage {
Text(error).foregroundStyle(.red)
} else {
ScrollView {
Text(viewModel.responseText)
}
}
}
.padding()
}
}
```

## 3. Safety Settings
You can configure safety thresholds to prevent the model from generating harmful content.

```swift
let safetySettings = [
SafetySetting(category: .harassment, threshold: .blockLowAndAbove),
SafetySetting(category: .hateSpeech, threshold: .blockMediumAndAbove)
]

let model = FirebaseAI.firebaseAI().generativeModel(
modelName: "gemini-flash-latest",
safetySettings: safetySettings
)
```

# Advanced Features

### Chat Session (Multi-turn)
Chat sessions persist state across multiple interactions, which is essential for ongoing conversations or when using tools like function calling.

```swift
let chat = model.startChat()

Task {
do {
let response1 = try await chat.sendMessage("Hello! I have two dogs in my house.")
print(response1.text ?? "")

let response2 = try await chat.sendMessage("How many paws are in my house?")
print(response2.text ?? "")
} catch {
print("Error in chat: \(error)")
}
}
```

### Function Calling (Tools)
Define functions that the model can request to execute to interact with external systems. *Note: Advanced workflows like function calling generally require a multi-turn Chat Session to handle the back-and-forth execution.*

```swift
let getStockPriceTool = Tool(functionDeclarations: [
FunctionDeclaration(
name: "getStockPrice",
description: "Get the current stock price for a given symbol.",
parameters: [
"symbol": Schema(
type: .string,
description: "The stock symbol, e.g. AAPL"
)
]
)
])

let model = FirebaseAI.firebaseAI().generativeModel(
modelName: "gemini-flash-latest",
tools: [getStockPriceTool]
)

// In your task (using a chat session):
let chat = model.startChat()
let response = try await chat.sendMessage("What is the stock price of Apple?")
if let functionCall = response.functionCalls.first {
// Handle the function call (e.g. call a local API and send the result back)
print("Model requested function: \(functionCall.name) with args: \(functionCall.args)")
}
```
Loading
Loading