A hackathon prototype for adapting one piece of content and orchestrating isolated computer-use agents for LinkedIn, X, and Instagram in parallel.
Quick start · Hosted demo · Architecture · Setup · Technical deep dive
PostPrism is a full-stack experiment built for the ORGO AI hackathon. The credentialed backend creates a separate computer-use agent and ORGO VM per platform, adapts content per platform, executes the agents concurrently, and emits screenshots and progress events to one dashboard. The hosted Lovable build is a front-end-only simulation and does not sign in to or publish on social platforms. Front end: React + TypeScript (Vite). Back end: Flask + Agent S2.5 with UI-TARS 1.5 visual grounding.
The front end builds and runs on Bun; this demo mode needs no API keys.
git clone https://github.com/zelinewang/postprism.git
cd postprism
bun install
bun run build # verified: 1769 modules transformed, built in ~2s
bun run dev # front end at http://localhost:8080For the credentialed experimental backend (ORGO + OpenAI keys), see Setup.
The hosted Lovable deployment is deliberately front-end only. It uses
src/services/demoService.ts to simulate
parallel progress and results without backend calls, account access, provider
credentials, or publishing.
What you'll see:
- A simulated three-platform progress dashboard
- Local platform-specific content adaptation
- Simulated agent actions and completion states
- The interface and information flow used by the credentialed backend path
Demo workflow: type one piece of content → the browser adapts it per platform → simulated agents progress in parallel. The demo does not create social posts. The video records the hackathon workflow, not a current end-to-end publishing guarantee.
Built solo for the ORGO AI hackathon. Implemented surfaces:
- Front end: React + TypeScript (Vite)
- Experimental back end: Flask + Python orchestration
- Agent S2.5 integration with custom optimizations
- ORGO VM management and parallel execution
- Real-time screen streaming over WebSocket
- Progress monitoring
The hardest part: Agent S2.5 released on August 1st and I migrated from S2 to S2.5 under 24 hours before the deadline, which meant standing up a separate UI-TARS grounding endpoint on short notice.
- Backend frame and progress events. During the credentialed backend path, each agent step emits its ORGO screenshot and action state over Flask-SocketIO. The hosted demo simulates these events locally.
- One isolated agent per platform. The backend initializes separate ORGO computers, grounding agents, and Agent S2.5 instances so the runs do not share browser state.
- Parallel task execution. The backend creates one coroutine per platform and awaits them together with
asyncio.gather. - Agent S2.5 + UI-TARS grounding. Uses Agent S2.5 for computer use with
ui-tars-1.5-7bvisual grounding and a configurable OpenAI decision model (gpt-4o-miniby default). - Loop breakers and rate-limit backoff.
OptimizedAgentManagerdetects repeated actions and rewrite attempts, caps steps, and increases per-platform delay after rate-limit errors.
The backend is an experimental hackathon path, not a verified publishing
service. Its current controller can return success=True when it detects a
repeated action or a rewrite attempt, without reading the platform afterward to
confirm that a post exists. It also generates a placeholder post_url rather
than extracting a canonical URL from the platform. Treat a success result as
"the controller terminated its run," not as proof of publication; verify the
target account manually.
postprism/
├── 📄 README.md # This README
├── 📄 env.example.txt # Environment setup template
│
├── 🎨 src/ # Frontend (React + TypeScript)
│ ├── 📄 App.tsx # Main application entry
│ │ # Location: ./src/App.tsx
│ ├── 📄 pages/Index.tsx # Primary publishing interface
│ │ # Location: ./src/pages/Index.tsx
│ ├── 📄 components/
│ │ ├── 📄 ContentInput.tsx # Content input with AI preprocessing
│ │ ├── 📄 LiveStreamViewer.tsx # Real-time AI observation dashboard
│ │ ├── 📄 PublishResults.tsx # Results analytics & tracking
│ │ └── 📄 PlatformCard.tsx # Platform status display
│ └── 📄 config/api.ts # API configuration & demo mode
│
├── 🤖 backend/ # Backend (Flask + Agent S2.5)
│ ├── 📄 run_fixed.py # Backend entry point
│ │ # Location: ./backend/run_fixed.py
│ ├── 📄 app_fixed.py # Main Flask application
│ │ # Location: ./backend/app_fixed.py
│ ├── 📄 requirements.txt # Dependencies
│ ├── 📄 install_dependencies.sh # Automated setup
│ │
│ ├── 🧠 agent_s2_controller/
│ │ ├── 📄 optimized_agent_manager.py # Custom Agent S2.5 enhancements
│ │ │ # Anti-perfectionism, loop detection
│ │ └── 📄 official_agent_manager.py # Standard wrapper
│ │
│ ├── 🎥 streaming/
│ │ ├── 📄 video_streamer.py # Real-time video streaming
│ │ └── 📄 progress_tracker.py # Progress monitoring
│ │
│ └── 🔄 content_adapters/
│ └── 📄 multi_platform_adapter.py # AI content optimization
│
└── 📚 docs/archive/ # Development documentation
Note: the credentialed backend is designed around three accounts (LinkedIn, X, Instagram); the hosted demo does not access any account. The architecture can be extended to more platforms/accounts.
This enables the parallel architecture.
# Step 1: Get ORGO API Access
# Sign up at: https://docs.orgo.ai/introduction
# Step 2: Create 3 Dedicated VMs (one for each platform)
LinkedIn VM → Project ID: "proj_linkedin_abc123" (save this!)
Twitter VM → Project ID: "proj_twitter_def456" (save this!)
Instagram VM → Project ID: "proj_instagram_ghi789" (save this!)
# Step 3: Persistent login setup
# For each VM:
1. Connect to VM via ORGO interface
2. Open browser → Navigate to platform → Login
3. Keep browser open, stay logged in
4. Test: Refresh page → Should remain logged in
# Why this works:
# - ORGO VMs maintain state when paused
# - No re-authentication needed = faster publishing
# - Each VM has a unique IP# Required: OpenAI API Key
OPENAI_API_KEY=sk-your_openai_key_here
AGENTS2_5_MODEL=o3-2025-04-16 # Recommended by Agent S2.5 team
# but we use gpt-4o-mini for speed
# Required: UI-TARS 1.5 Grounding Model
AGENTS2_5_GROUNDING_URL=https://your-endpoint.endpoints.huggingface.cloud
AGENTS2_5_GROUNDING_API_KEY=hf_your_token_hereCreate .env file:
# ORGO AI Configuration
ORGO_API_KEY=your_orgo_api_key_here
# Platform-Specific VM IDs
ORGO_LINKEDIN_PROJECT_ID=proj_linkedin_abc123
ORGO_TWITTER_PROJECT_ID=proj_twitter_def456
ORGO_INSTAGRAM_PROJECT_ID=proj_instagram_ghi789
# AI Model Configuration
OPENAI_API_KEY=sk-your_openai_key_here
AGENTS2_5_MODEL=o3-2025-04-16
# but we use gpt-4o-mini for speed
# UI-TARS 1.5 Configuration
AGENTS2_5_GROUNDING_URL=your_grounding_endpoint
AGENTS2_5_GROUNDING_API_KEY=your_grounding_key
AGENTS2_5_GROUNDING_MODEL=ui-tars-1.5-7b
# Feature toggles
ENABLE_ANTI_PERFECTIONISM=true
ENABLE_LOOP_DETECTION=true
ENABLE_LIVE_STREAMING=true# Clone & setup
git clone https://github.com/zelinewang/postprism.git
cd postprism
# Run automated backend dependencies installation
cd backend && chmod +x install_dependencies.sh && ./install_dependencies.sh
# The setup script creates/updates .env in the project root; edit it with your keys and VM IDs
# Launch
cd .. # Return to project root
bun run dev & # Frontend on :8080 (npm run dev also works)
python backend/run_fixed.py # Backend on :8000
# Open http://localhost:8080 and watch the agents runThe architecture below maps directly to tracked implementation; there is no pseudocode API in this section.
PostPrismApp._execute_official_publishing builds one
_publish_single_platform_parallel coroutine per requested platform and passes
the complete list to asyncio.gather(..., return_exceptions=True). It then
normalizes each OptimizedPublishResult and emits per-platform and aggregate
Socket.IO events.
OptimizedAgentManager._run_optimized_agent_loop
repeats four concrete operations: capture an ORGO screenshot, call
AgentS2_5.predict, emit the frame/action state, and execute the returned action
through Computer.exec. The same method contains the repeated-action and
rewrite loop breakers described in Success semantics.
VideoStreamer owns session lifecycle,
frame buffers, frame-rate limits, and Socket.IO broadcast state. Agent frames
are emitted by OptimizedAgentManager as video_frame events with the session,
platform, step, and base64 screenshot payload.
Use the configuration below (from env.example.txt); the implementation uses AGENTS2_5_* variable names.
# ===== CORE REQUIREMENTS =====
OPENAI_API_KEY=sk-your-openai-api-key-here # From: https://platform.openai.com/api-keys
ORGO_API_KEY=your-orgo-api-key-here # From: https://console.orgo.ai/
# ===== PLATFORM VM IDs (Optional but recommended) =====
ORGO_LINKEDIN_PROJECT_ID=your-linkedin-vm-id # Create at: https://console.orgo.ai/projects
ORGO_TWITTER_PROJECT_ID=your-twitter-vm-id # Enables persistent login states
ORGO_INSTAGRAM_PROJECT_ID=your-instagram-vm-id # Faster publishing performance
# ===== AGENT S2.5 CONFIGURATION =====
AGENTS2_5_MODEL=gpt-4o-mini # Default: fast & cost-effective
AGENTS2_5_MODEL_TYPE=openai # Provider: openai/anthropic
AGENTS2_5_GROUNDING_MODEL=ui-tars-1.5-7b # Visual UI detection model
AGENTS2_5_GROUNDING_TYPE=huggingface # Grounding service provider
AGENTS2_5_MAX_STEPS=15 # Maximum automation steps
AGENTS2_5_STEP_DELAY=1.0 # Delay between actions (seconds)
AGENTS2_5_MAX_TRAJECTORY_LENGTH=8 # Memory efficiency
AGENTS2_5_ENABLE_REFLECTION=true # Learning capability| Model | Relative trade-off | Intended use |
|---|---|---|
gpt-4o-mini |
Faster / lower-cost | Default development path |
gpt-4o |
More capable / higher-cost | Accuracy-sensitive experiments |
o3-2025-04-16 |
Slower reasoning path | Explicit opt-in experiments |
install_dependencies.sh handles:
- Python virtual environment — isolated dependency management
- Standard dependencies — Flask 3.0+, SocketIO 5.3+, OpenAI 1.25+, etc. (
requirements.txt) - GUI Agents S2.5 — v0.2.5 (Aug 2025) from the official repository
- ORGO AI client — virtual desktop orchestration (
pip install orgo) - Production extras — Gunicorn, Eventlet
- Environment setup — interactive wizard via
setup_env.py
Run: chmod +x install_dependencies.sh && ./install_dependencies.sh
- Frontend:
http://localhost:8080(Vite dev server) - Backend:
http://localhost:8000(Flask) - Health check:
http://localhost:8000/health
Deployment options (see DEPLOYMENT_STRATEGY.md)
Demo mode (no backend):
bun install && bun run dev
echo "VITE_DEMO_MODE=true" > .env.localCredentialed local backend path (experimental):
cd backend && chmod +x install_dependencies.sh && ./install_dependencies.sh
cd .. && bun install
cp env.example.txt .env # edit with your keys
bun run dev & python backend/run_fixed.pyCloud: the hosted Lovable front end is forced into front-end-only demo mode. The repository contains Render/Railway configuration for a separate backend, but that credentialed path is not part of the public demo and is not claimed as production-ready.
Troubleshooting (see SETUP_GUIDE.md)
# Backend connection failed
curl http://localhost:8000/health
# OpenAI rate limits — use a cheaper model
AGENTS2_5_MODEL=gpt-4o-mini
# ORGO VM access issues
curl -H "Authorization: Bearer $ORGO_API_KEY" https://api.orgo.ai/health
# Installation verification
python backend/run_fixed.py --testHackathon project (ORGO AI hackathon, 2025); not actively maintained. This README was trimmed from its original hackathon pitch to focus on what you can run today. The hosted front end is reproducible as a simulation. The credentialed backend is source-documented but was not end-to-end revalidated for this README and does not verify publication state.
MIT.
- ORGO AI — isolated cloud VMs
- Agent S2.5 — computer-use agent
- UI-TARS 1.5 — visual grounding
- OpenAI — decision models
- Front end scaffolded with Lovable