Skip to content
aleck31Public

About

๐Ÿงฐ AI็™พๅฎ็ฎฑ โ€” a modular Gen-AI suite: ๐Ÿค– agent with tool use & MCP, ๐Ÿ’ฌ multimodal chat, ๐Ÿ“ text processing, ๐Ÿง  deep reasoning, ๐Ÿ‘€ vision, ๐ŸŽจ image generation & editing. FastAPI + React + AG-UI (SSE), powered by Bedrock, Gemini, and OpenAI.

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

ย 

History

165 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

MyAIBOX

Python FastAPI React TypeScript AWS Gemini

MyAIBOX (AI็™พๅฎ็ฎฑ) is a comprehensive Gen-AI application suite built with FastAPI and React. It provides access to various AI capabilities including AI Agent, multimodal chat, text processing, summarization, image/document recognition, and image creation.

Overview

The application integrates multiple GenAI models (Bedrock, Anthropic, OpenAI, Gemini, directly or through a gateway such as agentgateway), with sign-in through Myners SSO and conversation storage in DynamoDB. It features a modular architecture with a React frontend communicating via AG-UI Protocol (SSE streaming).

๐ŸŽ‰ What's New in v3.10

  • LLM providers: Settings โ†’ Providers holds each endpoint and its credentials (AWS, or an API key / Secrets Manager secret); a model names its provider and its API, so a gateway such as agentgateway is one provider entry
  • APIs: Bedrock Converse / InvokeModel / Bidirectional Stream, Anthropic Messages, OpenAI Responses / Chat Completions, Gemini; Bedrock Converse models can use the flex tier
  • Models: Claude, GPT-6, Grok 4.7, GLM 5.3, Kimi K3.1, Nova 2 Lite and Stability go through agentgateway; Kimi K3 โ†’ K3.1
  • Upgrading: run uv sync and my-aibox build; models need provider and api; the BEDROCK_*, GEMINI_SECRET_ID and OPENAI_SECRET_ID variables are gone. See CHANGELOG.md.

Features

  • Chat ๐Ÿ’ฌ โ€” Unified conversational AI: pick an agent (Assistant, Q&A persona, etc.), each with its own tools, skills, system prompt, and workspace
  • Text ๐Ÿ“ โ€” Proofreading, rewriting, reduction, expansion, multi-language support
  • Summary ๐Ÿ“ฐ โ€” Document and text summarization
  • Talk ๐ŸŽ™๏ธ โ€” Real-time voice conversation with a LiveAgent (/talk/:agentId)
  • Asking ๐Ÿง  โ€” Research-style deep Q&A: voice or text input, follow-up threads, per-question reasoning
  • Vision ๐Ÿ‘€ โ€” Image analysis, document understanding (PDF), multi-model support
  • Draw ๐ŸŽจ โ€” AI image generation and editing with prompt optimization, style/ratio/seed options
  • Settings โš™ โ€” Sessions, agents, module configuration, LLM providers, model registry, MCP server management

Supported input formats: jpg/jpeg, png, gif, webp, pdf, csv, doc/docx, xls/xlsx, txt, md, mp4, webm, mov

Screenshots

Chat: agents with tools (image generation, weather)

Chat

Asking: research answers with web search

Asking

Vision: image and document analysis

Vision

Draw: image generation and editing

Draw

Settings: LLM providers

Providers

Settings: models (provider, API, service tier)

Models

Project Structure

my-aibox/
โ”œโ”€โ”€ app.py                        # FastAPI + uvicorn entry point
โ”œโ”€โ”€ backend/                      # Backend Python modules
โ”‚   โ”œโ”€โ”€ api/                          # REST + SSE endpoints (chat, text, summary, asking, vision, draw, settings, upload)
โ”‚   โ”œโ”€โ”€ core/                         # Config, service layer, DynamoDB sessions
โ”‚   โ”œโ”€โ”€ common/                       # Auth, logger, CLI, provider cache, async stream
โ”‚   โ”œโ”€โ”€ genai/                        # LLM providers (Bedrock/Gemini/OpenAI), agents, tools
โ”‚   โ”œโ”€โ”€ utils/                        # AWS + Bedrock helpers
โ”‚   โ””โ”€โ”€ tests/                        # pytest unit + integration
โ”œโ”€โ”€ frontend/                     # React SPA (Vite + TypeScript)
โ”‚   โ”œโ”€โ”€ src/                          # components / pages / api / styles
โ”‚   โ””โ”€โ”€ assets/                       # UI static assets (avatars, icons)
โ”œโ”€โ”€ storage/                      # Runtime data (gitignored)
โ”‚   โ”œโ”€โ”€ uploads/                      # User-uploaded files
โ”‚   โ””โ”€โ”€ generated/                    # Generated images / videos
โ”œโ”€โ”€ logs/                         # Application logs (gitignored)
โ”œโ”€โ”€ deploy/                       # Deployment artifacts
โ”‚   โ”œโ”€โ”€ my-aibox.service              # systemd user unit template
โ”‚   โ”œโ”€โ”€ build-push.sh                 # build & push multi-arch image to ECR
โ”‚   โ””โ”€โ”€ full-stack/                   # Dockerfile + EKS reference (examples/)
โ”œโ”€โ”€ docs/                         # README screenshots, etc.
โ”œโ”€โ”€ pyproject.toml
โ”œโ”€โ”€ CHANGELOG.md                  # Release history
โ””โ”€โ”€ README.md

Tool & Skill System

Type Configuration Examples
Strands Tools Per-agent toggle calculator, current_time, file_write
MCP Tools Settings โ†’ MCP Server exa-server, core-mcp-server
Legacy Tools Per-agent toggle get_weather, search_wikipedia
Skills Per-agent toggle (from ~/.agents/skills/) Anthropic-style skills loaded via Strands AgentSkills plugin

MCP server types: HTTP, stdio, SSE. stdio servers run commands on the host, so adding one requires your user sub (see /api/auth/me) in ADMIN_SUBS (when ADMIN_SUBS is set, all MCP changes are admin-only).

Setup

  1. Install dependencies:
curl -LsSf https://astral.sh/uv/install.sh | sh
uv sync
  1. Configure environment:
aws configure
cp .env.example .env
# Edit .env: AWS region, SSO, DynamoDB, API keys
  1. Build frontend:
my-aibox build
  1. Run:
uv run python app.py

Routes

Path Description
/ React SPA (default โ†’ /chat/assistant)
/login Login page
/chat/:agentId Chat with the selected agent (e.g. /chat/assistant, /chat/family_doctor)
/talk/:agentId Voice conversation (default /talk/english-coach)
/text, /summary, /asking, /vision, /draw Tool modules
/settings/session, /settings/agents, /settings/modules, /settings/models, /settings/mcp Settings pages
/api/* Backend API

Deployment

Local / EC2

my-aibox install            # set up the systemd user service (one-time)
my-aibox run                # run in the foreground (skips systemd)
my-aibox start|stop|restart # manage the systemd user service
my-aibox status             # show service status
my-aibox logs [-f]          # tail journalctl logs
my-aibox build              # build frontend (syncs version)
my-aibox check              # lint (ruff) + run unit tests
my-aibox test               # run pytest (default: tests/unit)
                            # use `my-aibox test -m integration` for real-service tests

Container / EKS

The image in deploy/full-stack/Dockerfile is thin: it ships uv + git only, and the start script git pull the latest code at pod startup. So most code changes do not require a rebuild โ€” just kubectl rollout restart.

deploy/build-push.sh           # build & push multi-arch (amd64 + arm64) to ECR
kubectl rollout restart deployment my-aibox   # roll pods, picks up latest commit + uv sync

deploy/full-stack/examples/ contains reference IAM role/policy and a k8s manifest with our values baked in โ€” copy them as a starting point, do not kubectl apply directly.

License

MIT License - see LICENSE file for details

About

๐Ÿงฐ AI็™พๅฎ็ฎฑ โ€” a modular Gen-AI suite: ๐Ÿค– agent with tool use & MCP, ๐Ÿ’ฌ multimodal chat, ๐Ÿ“ text processing, ๐Ÿง  deep reasoning, ๐Ÿ‘€ vision, ๐ŸŽจ image generation & editing. FastAPI + React + AG-UI (SSE), powered by Bedrock, Gemini, and OpenAI.

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages