Skip to content
Closed
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
48 changes: 47 additions & 1 deletion agents-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,50 @@ Build Vision Agents quickly with any model or video provider.

Created by Stream, uses [Stream's edge network](https://getstream.io/video/) for ultra-low latency.

See [Github](https://github.com/GetStream/Vision-Agents).
## Quick Start

```bash
# Install vision-agents
uv add vision-agents

# Import (automatically creates .env file)
python -c "from vision_agents import Agent"
```

The package automatically creates a `.env` file with example configuration. Edit it to add your API keys:

### Required API Keys
- **Stream** (required): `STREAM_API_KEY`, `STREAM_API_SECRET` - [Get keys](https://getstream.io/)
- **LLM** (choose one): `OPENAI_API_KEY`, `GOOGLE_API_KEY`, `ANTHROPIC_API_KEY`, `XAI_API_KEY`
- **STT** (choose one): `DEEPGRAM_API_KEY`, `MOONSHINE_API_KEY`, `WIZPER_API_KEY`
- **TTS** (choose one): `CARTESIA_API_KEY`, `ELEVENLABS_API_KEY`, `KOKORO_API_KEY`
- **Turn Detection**: `FAL_KEY` - [Get key](https://fal.ai/)

### Setup Commands
```bash
vision-agents-setup # Create .env file
vision-agents-setup --guide # Show setup guide
vision-agents-setup --force # Overwrite existing .env
```

## Example Usage

```python
from vision_agents import Agent
from vision_agents.plugins import openai, deepgram, cartesia

agent = Agent(
edge=getstream.Edge(),
agent_user=User(name="AI Assistant", id="agent"),
instructions="You're a helpful AI assistant.",
llm=openai.LLM(model="gpt-4o-mini"),
tts=cartesia.TTS(),
stt=deepgram.STT(),
)
```
Comment on lines +39 to +53
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Add missing import for getstream.

The example code references getstream.Edge() on line 46 but doesn't import getstream. Users following this example will encounter a NameError.

Apply this diff to fix the import:

 from vision_agents import Agent
-from vision_agents.plugins import openai, deepgram, cartesia
+from vision_agents.plugins import openai, deepgram, cartesia, getstream
 
 agent = Agent(
     edge=getstream.Edge(),
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
## Example Usage
```python
from vision_agents import Agent
from vision_agents.plugins import openai, deepgram, cartesia
agent = Agent(
edge=getstream.Edge(),
agent_user=User(name="AI Assistant", id="agent"),
instructions="You're a helpful AI assistant.",
llm=openai.LLM(model="gpt-4o-mini"),
tts=cartesia.TTS(),
stt=deepgram.STT(),
)
```
from vision_agents import Agent
from vision_agents.plugins import openai, deepgram, cartesia, getstream
agent = Agent(
edge=getstream.Edge(),
agent_user=User(name="AI Assistant", id="agent"),
instructions="You're a helpful AI assistant.",
llm=openai.LLM(model="gpt-4o-mini"),
tts=cartesia.TTS(),
stt=deepgram.STT(),
)
🤖 Prompt for AI Agents
In agents-core/README.md around lines 39 to 53, the example references
getstream.Edge() but never imports getstream; add a top-level import for the
getstream module (e.g., add "import getstream") so the example runs without a
NameError, placing the import with the other example imports at the top of the
code block.


## Documentation

- 📚 [Full Documentation](https://visionagents.ai/)
- 💬 [Examples](https://github.com/GetStream/Vision-Agents/tree/main/examples)
- 🔧 [GitHub Repository](https://github.com/GetStream/Vision-Agents)
3 changes: 3 additions & 0 deletions agents-core/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ packages = ["vision_agents"]
[tool.hatch.build.targets.sdist]
include = ["vision_agents"]

[project.scripts]
vision-agents-setup = "vision_agents.post_install:main"

#[tool.uv.sources]
#krisp-audio = [
# { path = "./vision_agents/core/turn_detection/krisp/krisp_audio-1.4.0-cp313-cp313-macosx_12_0_arm64.whl", marker = "sys_platform == 'darwin' and platform_machine == 'aarch64'" },
Expand Down
61 changes: 61 additions & 0 deletions agents-core/vision_agents/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
"""
Vision Agents - Open video agents for building low latency video and voice agents.
"""

from pathlib import Path

# Version will be set by hatch-vcs
__version__ = "0.0.0"

# Auto-create .env file on first import if it doesn't exist
def _setup_env_file():
Copy link

@ulgens ulgens Oct 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't this run every time the project starts? "Onboarding script" feels fancy but as a user, I'd prefer a simple copy-paste over a script over a fancy alternative. I'd recommend providing the template and instructing the users to copy that to .env when it's necessary.

"""Automatically create .env file from template if it doesn't exist."""
try:
# Get the package directory
package_dir = Path(__file__).parent

# Template file path
template_path = package_dir / "env_template.txt"

# Target .env file path (in current working directory)
env_path = Path.cwd() / ".env"

# Check if .env already exists
if env_path.exists():
return

# Check if template exists
if not template_path.exists():
return
Comment on lines +28 to +29
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a possibility? The files comes in the repo.


# Only create .env if we're in a project directory (not in site-packages)
# This prevents creating .env files in unexpected places
if "site-packages" in str(package_dir) or "dist-packages" in str(package_dir):
return
Comment on lines +31 to +34
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Site-packages detection is fragile.

The string-matching approach for detecting site-packages installations is fragile and may fail for:

  • Editable installs (pip install -e .)
  • Conda environments with non-standard paths
  • Custom installation directories
  • Project directories that happen to contain "site-packages" or "dist-packages" in their path

Consider a more robust check:

-        # Only create .env if we're in a project directory (not in site-packages)
-        # This prevents creating .env files in unexpected places
-        if "site-packages" in str(package_dir) or "dist-packages" in str(package_dir):
-            return
+        # Only create .env if we're in a project directory (not in site-packages)
+        # This prevents creating .env files in unexpected places
+        try:
+            # Check if package is in the same directory as cwd or is in a stdlib/site location
+            package_dir.relative_to(Path.cwd())
+        except ValueError:
+            # Package is not under cwd, likely installed in site-packages
+            return

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In agents-core/vision_agents/__init__.py around lines 33 to 36, the current
string-match check for "site-packages"/"dist-packages" is fragile; replace it
with a robust containment check by resolving package_dir to an absolute Path and
comparing it against the actual site-packages / dist-packages locations returned
by site.getsitepackages(), sysconfig.get_paths() (e.g. "purelib"/"platlib"), and
optionally site.getusersitepackages(); treat any of those canonical paths as
targets and check whether package_dir.resolve() is inside any of them
(Path(...).resolve().is_relative_to(...) or equivalent loop over parents) so
editable installs, conda/custom prefixes, and symlinked paths are handled
correctly.


# Copy template to .env
import shutil
shutil.copy2(template_path, env_path)

# Print helpful message
print("🎉 Vision Agents: Created .env file with example configuration!")
print()
print("📁 File location:")
print(f" {env_path.absolute()}")
print()
print("📝 Please edit the .env file and add your actual API keys")
print("🔗 See the comments in the .env file for where to get API keys")
print("💡 Run 'vision-agents-setup' command for more setup options")

except Exception:
# Silently fail - don't break the import if env setup fails
pass
Comment on lines +50 to +52
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Log exceptions instead of silently suppressing them.

While not breaking the import is reasonable, silently suppressing all exceptions means users won't know why setup failed (permissions, missing template, etc.).

Apply this diff to at least log failures:

+    import logging
+    
     except Exception:
-        # Silently fail - don't break the import if env setup fails
-        pass
+        # Don't break the import, but log the failure
+        logging.getLogger(__name__).debug(
+            "Failed to auto-create .env file", exc_info=True
+        )

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In agents-core/vision_agents/__init__.py around lines 52 to 54, the code
currently catches Exception and silently passes; change this to catch Exception
as e and log the error (including e and the traceback) using the module's logger
(or the standard logging.getLogger(__name__)) with a clear message like
"vision_agents initialization failed" so import doesn't break but failures are
recorded for debugging; ensure the logging import exists and that the exception
handler does not re-raise.

Comment on lines +50 to +52
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any expected failures?


# Run the setup function
_setup_env_file()
Comment on lines +11 to +55
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Reconsider import-time side effects.

Creating files and printing to stdout during module import is a significant anti-pattern that can cause multiple issues:

  1. Tool breakage: Breaks introspection tools (mypy, sphinx, IDEs) that import modules for analysis
  2. CI/CD issues: Unexpected file creation in containerized or test environments
  3. Principle of least surprise: Users don't expect imports to modify the filesystem
  4. Silent failures: The broad except Exception: pass on line 52 hides all errors including permission issues

Consider refactoring to make setup explicit rather than automatic. Options:

  1. Require users to call vision-agents-setup explicitly (documented in README)
  2. Only print a one-line reminder if .env is missing, without creating it
  3. Move the setup logic to a clearly-named function that users call explicitly

If you want to keep automatic setup, at minimum:

  1. Add a way to disable it (environment variable like VISION_AGENTS_NO_AUTO_SETUP)
  2. Make the message much shorter (one line max)
  3. Log specific exceptions instead of silently suppressing them
  4. Document this behavior prominently in the README
 # Auto-create .env file on first import if it doesn't exist
 def _setup_env_file():
-    """Automatically create .env file from template if it doesn't exist."""
+    """Automatically create .env file from template if it doesn't exist.
+    
+    This function runs at import time. It can be disabled by setting
+    the VISION_AGENTS_NO_AUTO_SETUP environment variable.
+    
+    Returns:
+        bool: True if .env was created, False otherwise.
+    """
+    # Allow users to disable auto-setup
+    if os.environ.get("VISION_AGENTS_NO_AUTO_SETUP"):
+        return False
+    
     try:
         # Get the package directory
         package_dir = Path(__file__).parent

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In agents-core/vision_agents/__init__.py around lines 13 to 57, remove the
import-time side effects by not running _setup_env_file() at module import;
instead expose a clearly named function (e.g., setup_env_file()) and a small
helper (e.g.,
ensure_env_file_exists(disable_auto=os.environ.get("VISION_AGENTS_NO_AUTO_SETUP"))),
remove automatic file creation and prints on import, and implement explicit
control: check VISION_AGENTS_NO_AUTO_SETUP before doing anything, make any
messages a single short log line (use logging.warning/info), and replace the
broad except Exception: pass with catching and logging specific exceptions
(IOError/OSError and Exception with logged error details) so callers can opt
into setup (e.g., via a CLI command or README instruction) and errors are
visible.


# Import core components
from .core.agents import Agent
from .core.edge.types import User

__all__ = ["Agent", "User", "__version__"]
129 changes: 129 additions & 0 deletions agents-core/vision_agents/env_template.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# Vision Agents Environment Configuration
# Copy this file to .env and fill in your actual API keys

# =============================================================================
# CORE INFRASTRUCTURE
# =============================================================================

# Stream (Required for video/audio infrastructure)
# Get your keys from: https://getstream.io/
STREAM_API_KEY=your_stream_api_key_here
STREAM_API_SECRET=your_stream_api_secret_here
STREAM_BASE_URL=https://getstream.io

# =============================================================================
# LLM PROVIDERS
# =============================================================================

# OpenAI (for GPT models)
# Get your key from: https://platform.openai.com/api-keys
OPENAI_API_KEY=your_openai_api_key_here

# Google/Gemini
# Get your key from: https://aistudio.google.com/app/apikey
GOOGLE_API_KEY=your_google_api_key_here
GEMINI_API_KEY=your_gemini_api_key_here # Alternative to GOOGLE_API_KEY

# Anthropic (Claude)
# Get your key from: https://console.anthropic.com/
ANTHROPIC_API_KEY=your_anthropic_api_key_here

# xAI (Grok)
# Get your key from: https://console.x.ai/
XAI_API_KEY=your_xai_api_key_here

# =============================================================================
# SPEECH-TO-TEXT (STT) PROVIDERS
# =============================================================================

# Deepgram
# Get your key from: https://console.deepgram.com/
DEEPGRAM_API_KEY=your_deepgram_api_key_here

# Moonshine
# Get your key from: https://moonshine.ai/
MOONSHINE_API_KEY=your_moonshine_api_key_here

# Wizper
# Get your key from: https://wizper.ai/
WIZPER_API_KEY=your_wizper_api_key_here

# =============================================================================
# TEXT-TO-SPEECH (TTS) PROVIDERS
# =============================================================================

# Cartesia
# Get your key from: https://cartesia.ai/
CARTESIA_API_KEY=your_cartesia_api_key_here

# ElevenLabs
# Get your key from: https://elevenlabs.io/
ELEVENLABS_API_KEY=your_elevenlabs_api_key_here

# Kokoro
# Get your key from: https://kokoro.ai/
KOKORO_API_KEY=your_kokoro_api_key_here

# =============================================================================
# TURN DETECTION & VAD
# =============================================================================

# Smart Turn (FAL)
# Get your key from: https://fal.ai/
FAL_KEY=your_fal_api_key_here

# =============================================================================
# COMPUTER VISION
# =============================================================================

# Ultralytics (YOLO models)
# No API key required for basic usage
# ULTRALYTICS_API_KEY=your_ultralytics_api_key_here

# =============================================================================
# AUDIO PROCESSING
# =============================================================================

# Krisp (Noise cancellation)
# Get your key from: https://krisp.ai/
KRISP_API_KEY=your_krisp_api_key_here

# =============================================================================
# MCP (Model Context Protocol) SERVERS
# =============================================================================

# Local MCP server command (for testing)
MCP_LOCAL_CMD=python -m mcp_server_weather

# Remote MCP server URL (for testing)
MCP_REMOTE_URL=https://your-mcp-server.com

# MCP server headers (prefix with MCP_REMOTE_HEADERS_)
# MCP_REMOTE_HEADERS_Authorization=Bearer your_token
# MCP_REMOTE_HEADERS_X_API_Key=your_api_key

# =============================================================================
# DEVELOPMENT & TESTING
# =============================================================================

# Example base URL for demos
EXAMPLE_BASE_URL=https://getstream.io/video/demos

# Test configuration
TEST_MCP_CITY=New York

# GitHub (for MCP integration tests)
GITHUB_PAT=your_github_personal_access_token_here

# =============================================================================
# OPTIONAL CONFIGURATION
# =============================================================================

# OpenAI model selection
OPENAI_MODEL=gpt-4o-mini

# Logging level
LOG_LEVEL=INFO

# Debug mode
DEBUG=false
140 changes: 140 additions & 0 deletions agents-core/vision_agents/post_install.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
#!/usr/bin/env python3
"""
Vision Agents Setup Script
Creates a .env file from template and provides setup guidance.
"""

import sys
import shutil
import argparse
from pathlib import Path


def create_env_file(target_dir=None, force=False):
"""Create .env file from template if it doesn't exist."""
# Get the package directory
package_dir = Path(__file__).parent

# Template file path
template_path = package_dir / "env_template.txt"

# Target directory
if target_dir is None:
target_dir = Path.cwd()
else:
target_dir = Path(target_dir)

# Target .env file path
env_path = target_dir / ".env"

# Check if .env already exists
if env_path.exists() and not force:
print(f"✓ .env file already exists at {env_path}")
print("💡 Use --force to overwrite existing .env file")
return True

# Check if template exists
if not template_path.exists():
print(f"❌ Template file not found at {template_path}")
return False

try:
# Ensure target directory exists
target_dir.mkdir(parents=True, exist_ok=True)

# Copy template to .env
shutil.copy2(template_path, env_path)
print(f"✓ Created .env file at: {env_path}")
print()
print("📁 File location:")
print(f" {env_path.absolute()}")
print()
print("📝 Next steps:")
print("1. Edit the .env file and add your actual API keys")
print("2. See the comments in the .env file for where to get API keys")
print("3. Start building your vision agent!")
print()
print("🔗 Quick links for API keys:")
print(" • Stream: https://getstream.io/")
print(" • OpenAI: https://platform.openai.com/api-keys")
print(" • Deepgram: https://console.deepgram.com/")
print(" • Cartesia: https://cartesia.ai/")
print(" • FAL (Smart Turn): https://fal.ai/")
return True

except Exception as e:
print(f"❌ Failed to create .env file: {e}")
return False
Comment on lines +13 to +67
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

Enhance docstring to follow Google style guide.

The function logic is solid with appropriate error handling and helpful user messaging. However, the docstring doesn't follow the Google style guide as required by the coding guidelines.

As per coding guidelines.

Apply this diff to improve the docstring:

-def create_env_file(target_dir=None, force=False):
-    """Create .env file from template if it doesn't exist."""
+def create_env_file(target_dir=None, force=False):
+    """Create .env file from template if it doesn't exist.
+    
+    Args:
+        target_dir: Directory to create .env file in. Defaults to current working directory.
+        force: If True, overwrite existing .env file.
+        
+    Returns:
+        bool: True if .env file was created or already exists, False on failure.
+    """
🤖 Prompt for AI Agents
In agents-core/vision_agents/post_install.py around lines 14 to 68, the function
docstring for create_env_file should be converted to Google style: replace the
current one-line description with a multiline docstring that includes a short
summary, a longer description of behavior, and sections for Args (target_dir:
Optional path to create .env in; force: bool whether to overwrite), Returns
(bool indicating success), and Raises (propagate or document exceptions if any
are expected), keeping it concise and formatted per Google Python docstring
conventions.



def show_setup_guide():
"""Show comprehensive setup guide."""
print("🚀 Vision Agents Setup Guide")
print("=" * 50)
print()
print("✅ Package already installed!")
print()
print("📝 Next steps:")
print("1. Add your API keys to the .env file")
print("2. Start building your vision agent:")
print()
print(" from vision_agents import Agent")
print(" from vision_agents.plugins import openai, deepgram, cartesia")
print()
print("🔧 Setup commands:")
print(" vision-agents-setup # Create .env file")
print(" vision-agents-setup --force # Overwrite existing .env")
print(" vision-agents-setup --guide # Show this guide")
print()
print("📚 Documentation: https://visionagents.ai/")
print("💬 Examples: https://github.com/GetStream/Vision-Agents/tree/main/examples")

Comment on lines +70 to +91
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

Enhance docstring to follow Google style guide.

The function's docstring should be expanded to follow Google style.

As per coding guidelines.

Apply this diff:

-def show_setup_guide():
-    """Show comprehensive setup guide."""
+def show_setup_guide():
+    """Show comprehensive setup guide.
+    
+    Prints setup instructions, commands, and documentation links to stdout.
+    """
🤖 Prompt for AI Agents
In agents-core/vision_agents/post_install.py around lines 70 to 91, the
show_setup_guide() function currently has a one-line docstring; update it to a
multi-line Google-style docstring that includes a short summary, a longer
description of what the function prints, an "Args" section indicating there are
no parameters, a "Returns" section stating None, an optional "Raises" section if
relevant (or state that no exceptions are raised), and an "Examples" section
showing how to call the function; keep the docstring concise and follow Google
docstring formatting conventions.


def main():
"""Main entry point for setup script."""
parser = argparse.ArgumentParser(
description="Vision Agents setup script",
formatter_class=argparse.RawDescriptionHelpFormatter,
epilog="""
Examples:
vision-agents-setup # Create .env in current directory
vision-agents-setup --dir /path/to/project # Create .env in specific directory
vision-agents-setup --force # Overwrite existing .env file
vision-agents-setup --guide # Show setup guide
"""
)

parser.add_argument(
"--dir", "-d",
help="Directory to create .env file in (default: current directory)"
)

parser.add_argument(
"--force", "-f",
action="store_true",
help="Overwrite existing .env file"
)

parser.add_argument(
"--guide", "-g",
action="store_true",
help="Show setup guide"
)

args = parser.parse_args()

if args.guide:
show_setup_guide()
return

try:
success = create_env_file(target_dir=args.dir, force=args.force)
if not success:
sys.exit(1)
except Exception as e:
print(f"❌ Setup script failed: {e}")
sys.exit(1)


if __name__ == "__main__":
main()
Comment on lines +93 to +140
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

Enhance docstring to follow Google style guide.

The main function's implementation is solid with proper argument parsing and error handling. However, the docstring needs expansion.

As per coding guidelines.

Apply this diff:

-def main():
-    """Main entry point for setup script."""
+def main():
+    """Main entry point for setup script.
+    
+    Parses CLI arguments and executes the requested action:
+    - Creates .env file in specified or current directory
+    - Shows setup guide if --guide flag is provided
+    - Supports --force to overwrite existing .env files
+    
+    Exits with code 1 on failure, 0 on success.
+    """
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
def main():
"""Main entry point for setup script."""
parser = argparse.ArgumentParser(
description="Vision Agents setup script",
formatter_class=argparse.RawDescriptionHelpFormatter,
epilog="""
Examples:
vision-agents-setup # Create .env in current directory
vision-agents-setup --dir /path/to/project # Create .env in specific directory
vision-agents-setup --force # Overwrite existing .env file
vision-agents-setup --guide # Show setup guide
"""
)
parser.add_argument(
"--dir", "-d",
help="Directory to create .env file in (default: current directory)"
)
parser.add_argument(
"--force", "-f",
action="store_true",
help="Overwrite existing .env file"
)
parser.add_argument(
"--guide", "-g",
action="store_true",
help="Show setup guide"
)
args = parser.parse_args()
if args.guide:
show_setup_guide()
return
try:
success = create_env_file(target_dir=args.dir, force=args.force)
if not success:
sys.exit(1)
except Exception as e:
print(f"❌ Setup script failed: {e}")
sys.exit(1)
if __name__ == "__main__":
main()
def main():
"""Main entry point for setup script.
Parses CLI arguments and executes the requested action:
- Creates .env file in specified or current directory
- Shows setup guide if --guide flag is provided
- Supports --force to overwrite existing .env files
Exits with code 1 on failure, 0 on success.
"""
parser = argparse.ArgumentParser(
description="Vision Agents setup script",
formatter_class=argparse.RawDescriptionHelpFormatter,
epilog="""
Examples:
vision-agents-setup # Create .env in current directory
vision-agents-setup --dir /path/to/project # Create .env in specific directory
vision-agents-setup --force # Overwrite existing .env file
vision-agents-setup --guide # Show setup guide
"""
)
parser.add_argument(
"--dir", "-d",
help="Directory to create .env file in (default: current directory)"
)
parser.add_argument(
"--force", "-f",
action="store_true",
help="Overwrite existing .env file"
)
parser.add_argument(
"--guide", "-g",
action="store_true",
help="Show setup guide"
)
args = parser.parse_args()
if args.guide:
show_setup_guide()
return
try:
success = create_env_file(target_dir=args.dir, force=args.force)
if not success:
sys.exit(1)
except Exception as e:
print(f"❌ Setup script failed: {e}")
sys.exit(1)
if __name__ == "__main__":
main()
🤖 Prompt for AI Agents
In agents-core/vision_agents/post_install.py around lines 93 to 140, the
module-level main() docstring is too brief; replace it with a Google-style
docstring that documents the function purpose and parameters: add a short
summary line, an Args section describing none (or that CLI args are parsed via
argparse), a Returns section (e.g., None), and a Raises section listing
SystemExit on failure or Exception if propagated; ensure formatting follows
Google style (sections labeled Args:, Returns:, Raises:) and keep it concise.

Loading