Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Gemini API (required for voice streaming)
GOOGLE_GENAI_USE_VERTEXAI=FALSE
GOOGLE_API_KEY=your_gemini_api_key

# Voice model must support Gemini Live API
HOME_AGENT_MODEL=gemini-2.0-flash-live-001

# Home Assistant
HOME_ASSISTANT_URL=http://homeassistant.local:8123
HOME_ASSISTANT_TOKEN=your_long_lived_access_token

# Voice server
VOICE_SERVER_HOST=0.0.0.0
VOICE_SERVER_PORT=8000

# Optional: local Ollama for text-only dev with doc_agent
OLLAMA_API_BASE=http://localhost:11434
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,12 @@ ENV/
env.bak/
venv.bak/

# macOS
# macOS / Xcode
.DS_Store
*.xcuserstate
xcuserdata/
DerivedData/
build/

# VSCode
.vscode/
Expand Down
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ test: ## Run all tests
--cov-report=term-missing \
--junitxml=junit.xml

.PHONY: voice
voice: ## Run the iPhone-friendly voice server
@PYTHONPATH=src/agents:src python3 -m server.voice_server

.PHONY: home_web
home_web: ## Run ADK web UI for the home agent
@uv run adk web --reload src/agents/home_agent

.PHONY: web
web: ## Run the ADK web demo server
@uv run adk web --reload src/agents/
Expand Down
53 changes: 47 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ make prefect-server
- **`doc_agent`**: Technical writing assistant with Google Docs integration
- Uses local Ollama models (`gpt-oss:20b`) via LiteLLM
- Includes Google Docs tools for creating and formatting documents
- **`home_agent`**: Voice-controlled home assistant for iPhone and browsers
- Uses Gemini Live API for real-time voice conversations
- Pluggable skills (Home Assistant, routines) via `config/skills.yaml`
- Safety guardrails via `config/guardrails.yaml`
- Native iOS app (`ios/`) and web PWA served by the voice WebSocket server

### Workflows
- **`pipeline.py`**: Prefect workflow for orchestrating document creation and content generation
Expand All @@ -45,6 +50,8 @@ make prefect-server

```bash
make web # Run ADK web interface
make home_web # Run ADK web UI for home agent only
make voice # Run iPhone-friendly voice server
make api_server # Run ADK FastAPI server
make prefect-server # Start Prefect server and serve flows
make prefect-flows # Serve flows (server must be running)
Expand All @@ -57,18 +64,52 @@ make check # Lint and type check
```
src/
├── agents/
│ └── doc_agent/ # Technical writing assistant
│ ├── agent.py # Agent definition
│ ├── doc_agent/ # Technical writing assistant
│ │ ├── agent.py
│ │ └── tools/
│ └── home_agent/ # Voice home assistant
│ ├── agent.py
│ ├── config/ # skills.yaml, guardrails.yaml
│ ├── guardrails/
│ ├── skills/
│ └── tools/
│ └── google_docs_tool.py # Google Docs integration
├── server/
│ ├── voice_server.py # WebSocket voice server + PWA
│ └── static/ # Browser web client
└── workflows/
├── pipeline.py # Main Prefect workflow
├── serve.py # Flow serving entry point
└── discover.py # Flow discovery utility
ios/
└── HomeVoiceAgent.xcodeproj # Native iPhone app (SwiftUI)
```

## Configuration

- **Ollama**: Set `OLLAMA_API_BASE` in `.env` or environment
- **Google Docs**: Place `credentials.json` in project root (token.json auto-generated)
- **Home Voice Agent**: Copy `.env.example` to `.env` and set:
- `GOOGLE_API_KEY` — Gemini API key (required for voice)
- `HOME_ASSISTANT_URL` and `HOME_ASSISTANT_TOKEN` — Home Assistant access
- Customize skills in `src/agents/home_agent/config/skills.yaml`
- Customize guardrails in `src/agents/home_agent/config/guardrails.yaml`
- **Prefect UI**: Available at `http://127.0.0.1:4200` (or port specified by `PREFECT_PORT`)

## Home Voice Agent (iPhone)

### Native iOS app (recommended)

1. Copy `.env.example` to `.env` and add your Gemini + Home Assistant credentials
2. Start the voice server on your Mac: `make voice`
3. Open `ios/HomeVoiceAgent.xcodeproj` in Xcode
4. Set your development team, build to your iPhone
5. In app Settings, enter your server host (e.g. `192.168.1.42:8000`)
6. Tap **Start Voice** and talk to your home

See `ios/README.md` for full setup and remote access options.

### Web client (alternative)

1. Start the voice server: `make voice`
2. On your iPhone (same Wi‑Fi), open `http://<your-computer-ip>:8000`
3. Tap **Start Voice**, allow the microphone, and talk to your home

For HTTPS/WSS from your phone outside the LAN, put the server behind a reverse proxy
or tunnel (e.g. Cloudflare Tunnel, Tailscale) and use `wss://`.
Loading