Skip to content

A pattern for an always on AI Assistant powered by Deepseek-V3, RealtimeSTT, and Typer for engineering

Notifications You must be signed in to change notification settings

dmitriz/always-on-ai-assistant

Repository files navigation

Deepseek AI Assistant

A powerful typer based Deepseek AI Assistant you can use to engineer TODAY.

Setup

  • cp .env.sample .env
    • Update with your keys
  • uv sync
  • (optional) install python 3.11 (uv python install 3.11)

Assistant Architecture

Typer Assistant

  • 🧠 Brain: Deepseek V3
  • 📝 Job (Prompt(s)): prompts/typer-commands.xml
  • 💻 Active Memory (Dynamic Variables): scratchpad.txt + commands/template.py
  • 👂 Ears (STT): RealtimeSTT
  • 🎤 Mouth (TTS): ElevenLabs (Flash 2.5)

Base Assistant

  • 🧠 Brain: Deepseek V3
  • 🧠 Brain: Deepseek V3
  • 📝 Job (Prompt(s)): None
  • 💻 Active Memory (Dynamic Variables): scratchpad.txt + commands/template.py
  • 👂 Ears (STT): RealtimeSTT
  • 🎤 Mouth (TTS): RealtimeTTS

Commands

Base Assistant Chat Interface

Start a conversational chat session with the base assistant:

python main_base_assistant.py chat

This will start an interactive chat session where you can:

  • Type messages to the assistant
  • Get spoken responses using TTS
  • Type 'exit' or 'quit' to end the session
  • Use Ctrl+C to gracefully exit

The base assistant features:

  • 🧠 Brain: Deepseek V3
  • 🎤 Mouth: System TTS (can be replaced with Azure/11Labs)
  • 📝 Memory: Maintains full conversation history
  • 📊 Logging: Detailed session logs in output/ directory

Typer Assistant Conversational Commands

# in a python env
python main_typer_assistant.py awaken --typer-file commands/template.py --scratchpad scratchpad.md --mode execute

# raw
uv run python main_typer_assistant.py awaken --typer-file commands/template.py --scratchpad scratchpad.md --mode execute

One shot shell commands

These commands mirror a single text command to the Deepseek AI Assistant, execute it and returns the output of the command.

# Basic commands
python main.py deep --typer-file commands/template.py --scratchpad scratchpad.txt --prompt "Ping the server"
python main.py deep --typer-file commands/template.py --scratchpad scratchpad.txt --prompt "Ping the server be sure to wait"
python main.py deep --typer-file commands/template.py --scratchpad scratchpad.txt --prompt "show config verbose"

# User management
python main.py deep --typer-file commands/template.py --scratchpad scratchpad.txt --prompt "new user for tim role is admin"
python main.py deep --typer-file commands/template.py --scratchpad scratchpad.txt --prompt "delete user 12345 --confirm"

# File operations
python main.py deep --typer-file commands/template.py --scratchpad scratchpad.txt --prompt "backup data from db/ dir"
python main.py deep --typer-file commands/template.py --scratchpad scratchpad.txt --prompt "download file from http://test.com output to sessions dir retry 8 times"
python main.py deep --typer-file commands/template.py --scratchpad scratchpad.txt --prompt "upload changes to our source_dir"

# Logs and debugging
python main.py deep --typer-file commands/template.py --scratchpad scratchpad.txt --prompt "search logs for 'focus cat off re john' case sensitive"
python main.py deep --typer-file commands/template.py --scratchpad scratchpad.txt --prompt "summarize logs from /var/logs lines=500"

# Data operations
python main.py deep --typer-file commands/template.py --scratchpad scratchpad.txt --prompt "filter records from users.csv query='active=true' limit=100"
python main.py deep --typer-file commands/template.py --scratchpad scratchpad.txt --prompt "transform data input.csv format=json columns=name,email"

# System operations
python main.py deep --typer-file commands/template.py --scratchpad scratchpad.txt --prompt "health check auth_service timeout=60 alert"
python main.py deep --typer-file commands/template.py --scratchpad scratchpad.txt --prompt "sync remotes production --force"

Improvements

  • add arbitrary 'scratchpad' files (make it a list)
  • add ears (STT)
  • add minimal mouth (TTS) to summarize what was done (no need for brain here just a simple conversational, short summary)
  • [] add a minimal barebones stt, brain, tts personal ai assistant.
  • [defer] add previous command map history. 1. 'deep go ahead and backup the db' -> 'backup-data db/'\n2. '...'
    • this lets us say refer to previous commands.

Resources

About

A pattern for an always on AI Assistant powered by Deepseek-V3, RealtimeSTT, and Typer for engineering

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.3%
  • Shell 0.7%