A Collaborative AI Workspace
A remix of StackEdit transformed into a multi-agent workspace for creative collaboration between humans and AI.
Developed by Fladry Creative / robb@fladrycreative.com
StackediTED reimagines document editing as a collaborative conversation between you and multiple AI agents. Instead of a sidebar chat, the AI workspace sits alongside your editor in a 50/50 split layout, creating a true collaborative environment.
π€ 6 AI Providers Working Together
- Claude (Anthropic) - Deep reasoning and analysis
- Gemini (Google) - Multimodal understanding
- GPT (OpenAI via Codex) - Code generation and optimization
- Z.AI - Chinese AI company (GLM models)
- Grok (X.AI via Cursor) - Real-time knowledge
- Composer (Cursor) - Agentic composition
π¬ @Mention System Direct messages to specific AI agents using mentions:
@claude analyze this code for security issues
@gpt optimize this function
@gemini explain this diagram
@composer write a REST API
@grok what's happening in AI news?
π Agent-to-Agent Chaining (Max 3 Hops) AI agents can collaborate autonomously by mentioning each other:
Human: @claude write a sort algorithm
Claude: Here's quicksort... @gpt can you optimize?
GPT: Using timsort... @gemini verify complexity?
Gemini: O(n log n) is correct... @human approve?
The Project Manager ("Ted") acts as the central orchestrator who sees everythingβthe document, the code, and the conversation.
- Role: Ted is the main persona you talk to. He maintains the "Meta-Reality" of the project.
- ** capabilities**:
- Full visibility into the codebase and active documents.
- Tags in other agents (
@claude,@gemini,@grok) when specialized skills are needed. - Ensures context (the "drift") is controlled and aligned with the project vision.
- Interaction: You dump your thoughts/docs to Ted. Ted manages the rest, delegating tasks to specific agents while keeping the big picture in focus.
π Trust Mode
- Trust OFF (default): Conversation pauses when AI mentions
@human, awaiting your approval - Trust ON: AI agents continue autonomously, only notifying you with
@humanmentions
π Document-Aware AI
- Your entire vault is synced to the AI daemon
- Agents can reference other documents, search your vault, and suggest edits
- Real-time document context for all conversations
- Editor: Markdown editor with live preview
- AI Chat Panel: 50/50 split layout with resizable divider
- Vuex State: Manages chat history, provider state, and chaining logic
- WebSocket Server: Real-time bidirectional communication
- Provider Adapters: CLI wrappers for all providers (Claude, Gemini, GPT, Z.AI, Cursor)
- Custom CLI Wrapper: Built zai-cli for Z.AI API integration
- Smart Routing: Auto-selects best provider or routes via @mentions
- Vault Service: Caches and indexes your documents for AI context
| Provider | Color | Hex |
|---|---|---|
| Claude | Purple | #9D4EDD |
| Gemini | Teal | #2DD4BF |
| GPT | Coral | #FF6B6B |
| Z.AI | Amber | #F59E0B |
| Grok | Lime | #84CC16 |
| Composer | Indigo | #6366F1 |
# Install frontend dependencies
npm install
# Install AI daemon dependencies
cd ai-daemon
npm install
cd ..Copy the example environment file:
cp ai-daemon/.env.example ai-daemon/.envEdit ai-daemon/.env with your credentials:
# Claude (Anthropic CLI)
CLAUDE_CLI_PATH=claude
CLAUDE_MODEL=claude-opus-4-5-20251101
# Gemini (Google CLI)
GEMINI_CLI_PATH=gemini
GEMINI_MODEL=gemini-3-pro-preview
# OpenAI (Codex CLI)
CODEX_CLI_PATH=codex
CODEX_MODEL=gpt-5-codex
# Z.AI (API Key)
ZAI_API_KEY=your_zai_api_key_here
ZAI_MODEL=glm-4.6
# Cursor (Subscription - runs both Grok and Composer)
CURSOR_API_KEY=your_cursor_api_key_here
CURSOR_MODEL=grok
COMPOSER_MODEL=composer-1You'll need the CLI tools for the providers you want to use:
# Claude
brew install anthropics/claude/claude
# Gemini
npm install -g @google-ai/generativelanguage
# Codex (OpenAI)
npm install -g codex
# Cursor (for Grok and Composer)
# Install from https://cursor.sh
# Z.AI uses custom CLI wrapper (included)
# Just set ZAI_API_KEY in .envTerminal 1 - Start AI Daemon:
cd ai-daemon
npm start
# Or in dev mode with auto-reload:
npm run devTerminal 2 - Start Frontend:
npm startOpen http://localhost:8080 in your browser.
@claude review this markdown document
β Routes to Claude
@gpt refactor this code to be more functional
β Routes to GPT
Human: @claude design a user authentication API
Claude: Here's the design... @gpt implement it?
[Auto-routes to GPT]
GPT: Here's the code... @gemini review security?
[Auto-routes to Gemini]
Gemini: Security looks good... @human deploy?
[Pauses if Trust Mode is OFF]
Toggle the TRUST button in the AI panel:
- π Locked = Pauses on
@humanmentions - π Unlocked = Continues autonomously
stackedited/
βββ src/ # Frontend Vue application
β βββ components/ # UI components
β β βββ AiChat.vue # AI chat panel
β β βββ AiProviderSelector.vue # Provider buttons
β β βββ Layout.vue # 50/50 split layout
β βββ services/
β β βββ aiService.js # WebSocket client
β βββ store/
β βββ aiChat.js # Vuex state management
β
βββ ai-daemon/ # AI daemon server
β βββ src/
β β βββ server.js # WebSocket server + routing
β β βββ providers/ # Provider adapters
β β β βββ claude.js
β β β βββ gemini.js
β β β βββ openai.js
β β β βββ zai.js
β β β βββ cursor.js
β β β βββ composer.js
β β βββ services/
β β βββ vaultService.js # Document indexing
β βββ index.js
# Build frontend
npm run build
# The AI daemon runs as-is with:
cd ai-daemon
npm start# Frontend tests
npm test
# Linting
npm run lint(Status: Cruise Week - Identifying the drift, no pressure)
- Establish COMMANDA Workflow: Ted as the central PM.
- Refine Z.AI Integration: Ensure GLM provider is fully operational.
- Documentation: Update guides to reflect the "StackediTED" meta-reality.
- Function Calling: Let AI agents edit files directly
- Vision Support: Upload images for Gemini/GPT-4V analysis
- Custom Providers: Plugin system for new AI providers
- Team Collaboration: Multi-user editing with shared AI context
- Streaming Improvements: Better UX for long responses
- Mobile Support: Responsive layout for tablets/phones
Built on top of StackEdit by Benoit Schweblin.
Remixed with π by Fladry Creative
- Email: robb@fladrycreative.com
- Design Philosophy: "Controlled Drift" β Machine/human interface at the edge of perception
Apache 2.0 (same as original StackEdit)
This is a creative experiment. If you want to contribute or have ideas, reach out!
Key areas for contribution:
- New AI provider integrations
- UI/UX improvements
- Performance optimizations
- Documentation
Q: Why so many AI providers?
A: Different AIs have different strengths. Claude excels at reasoning, GPT at code, Gemini at multimodal tasks. Let them collaborate!
Q: What's the "controlled drift" philosophy?
A: AI agents can autonomously collaborate (drift), but with safety limits (controlled). Max 3 hops, Trust Mode, and @human pauses keep things from going off the rails.
Q: Does this cost a lot to run?
A: Depends on your usage. Most providers are CLI-based and use your existing API keys. Cursor runs on a subscription, not per-call billing.
Q: Can I use this offline?
A: The editor works offline, but AI features require internet and running providers.
Built for creators who want AI as a true collaborator, not just a tool. π