Skip to content

Add J.A.R.V.I.S — advanced AI assistant with Claude Opus 4.6#144

Open
leerobber wants to merge 1 commit intodocker:mainfrom
leerobber:claude/build-intelligent-assistant-Zn1rh
Open

Add J.A.R.V.I.S — advanced AI assistant with Claude Opus 4.6#144
leerobber wants to merge 1 commit intodocker:mainfrom
leerobber:claude/build-intelligent-assistant-Zn1rh

Conversation

@leerobber
Copy link

Summary

Introduces J.A.R.V.I.S (Just A Rather Very Intelligent System), a sophisticated conversational AI assistant powered by Claude Opus 4.6 with adaptive thinking, streaming responses, and a comprehensive set of built-in tools. The implementation is self-contained in a single Python module with Docker support for easy deployment.

Key Changes

  • Core agent (agent.py): 717-line single-file implementation featuring:

    • Multi-turn conversation memory with streaming response support
    • Adaptive thinking integration for complex reasoning
    • 9 built-in tools: datetime, calculator, weather, web search, Wikipedia summaries, persistent notes, and Python code execution
    • Security-hardened tool implementations (sandboxed Python execution, banned imports, expression validation)
    • Rich terminal UI with ANSI colors, progress indicators, and formatted output
    • Graceful error handling and rate-limit recovery
  • Docker containerization:

    • Dockerfile: Python 3.12-slim base with tzdata for timezone support
    • compose.yaml: Interactive service with secret-based API key management and persistent notes volume
    • compose.env.yaml: Alternative compose override for environment variable-based API key injection
    • entrypoint.sh: Flexible credential resolution (secrets file or env var)
  • Documentation & configuration:

    • README.md: Feature overview, quick-start guide, example interactions, and architecture explanation
    • requirements.txt: Minimal dependency (anthropic SDK only)
    • .gitignore: Protects API key secret file from accidental commits

Notable Implementation Details

  • Tool execution: Centralized dispatcher pattern with lambda-based routing for clean separation of concerns
  • Security: Banned imports list, restricted builtins, and expression validation prevent malicious code execution in run_python and calculate tools
  • Persistence: Notes stored in Docker named volume, survives container restarts
  • Streaming: Real-time token-by-token output using Anthropic's streaming API with thinking block detection
  • Agentic loop: Handles tool calls, accumulates results, and continues conversation until end_turn signal
  • Personality: System prompt establishes formal yet warm persona with dry wit and proactive helpfulness

https://claude.ai/code/session_01WwLSFPq695jxXafptGSMSk

A fully self-contained Jarvis-like personal assistant that runs as a
Docker Compose service. Features:

- Interactive terminal chat with streaming responses and ANSI color UI
- Claude Opus 4.6 with adaptive thinking for complex reasoning
- Agentic tool-use loop (manual loop preserving compaction-safe history)
- 9 built-in tools with no external MCP servers required:
  * get_current_datetime — IANA timezone-aware date/time
  * calculate — safe Python math evaluation (full math module)
  * get_weather — live weather via wttr.in
  * search_web — DuckDuckGo Instant Answers API
  * get_wikipedia_summary — Wikipedia REST API
  * save_note / list_notes / read_note — persistent file-based notes
  * run_python — sandboxed Python execution with safe builtins
- Docker named volume for notes persistence across restarts
- Secret file or env-var API key injection
- compose.env.yaml override for env-var-only usage

https://claude.ai/code/session_01WwLSFPq695jxXafptGSMSk
Copy link
Author

@leerobber leerobber left a comment

Choose a reason for hiding this comment

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

Need developers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants