{"id":51970723,"url":"https://github.com/zelinewang/postprism","last_synced_at":"2026-07-29T22:01:16.231Z","repository":{"id":308323807,"uuid":"1031155458","full_name":"zelinewang/postprism","owner":"zelinewang","description":"Hackathon prototype for parallel computer-use agents; the hosted front end is a simulation.","archived":false,"fork":false,"pushed_at":"2026-07-13T01:47:38.000Z","size":1008,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-13T03:07:05.393Z","etag":null,"topics":["agent-s","ai-agents","computer-use","flask","hackathon","react","typescript","ui-tars"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zelinewang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-03T06:05:36.000Z","updated_at":"2026-07-13T01:47:38.000Z","dependencies_parsed_at":"2025-08-05T11:18:37.006Z","dependency_job_id":"40ea89a5-f2c3-4daa-a940-02fffc3592d3","html_url":"https://github.com/zelinewang/postprism","commit_stats":null,"previous_names":["zelinewang/postprism-12e78c39","zelinewang/postprism"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/zelinewang/postprism","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zelinewang%2Fpostprism","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zelinewang%2Fpostprism/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zelinewang%2Fpostprism/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zelinewang%2Fpostprism/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zelinewang","download_url":"https://codeload.github.com/zelinewang/postprism/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zelinewang%2Fpostprism/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":36050896,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-29T02:00:04.910Z","response_time":95,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent-s","ai-agents","computer-use","flask","hackathon","react","typescript","ui-tars"],"created_at":"2026-07-29T22:01:15.302Z","updated_at":"2026-07-29T22:01:16.204Z","avatar_url":"https://github.com/zelinewang.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n\u003cimg src=\"public/postprism-logo.png\" alt=\"PostPrism logo\" width=\"120\"\u003e\n\n# PostPrism\n\n**A hackathon prototype for adapting one piece of content and orchestrating isolated computer-use agents for LinkedIn, X, and Instagram in parallel.**\n\n[![Build](https://github.com/zelinewang/postprism/actions/workflows/build.yml/badge.svg)](https://github.com/zelinewang/postprism/actions/workflows/build.yml)\n[![Agent S2.5](https://img.shields.io/badge/agent-Agent%20S2.5-red)](https://github.com/simular-ai/Agent-S)\n[![ORGO](https://img.shields.io/badge/VMs-ORGO-green)](https://docs.orgo.ai/)\n[![UI-TARS 1.5](https://img.shields.io/badge/grounding-UI--TARS%201.5-blue)](https://github.com/bytedance/UI-TARS)\n[![Live demo](https://img.shields.io/badge/demo-live-purple)](https://postprism.lovable.app)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)\n\n[Quick start](#quick-start) · [Hosted demo](#hosted-front-end-demo) · [Architecture](#architecture) · [Setup](#setup) · [Technical deep dive](#technical-deep-dive)\n\n\u003c/div\u003e\n\nPostPrism 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](https://github.com/simular-ai/Agent-S) with [UI-TARS 1.5](https://github.com/bytedance/UI-TARS) visual grounding.\n\n## Quick start\n\nThe front end builds and runs on [Bun](https://bun.sh/); this demo mode needs no API keys.\n\n```bash\ngit clone https://github.com/zelinewang/postprism.git\ncd postprism\nbun install\nbun run build    # verified: 1769 modules transformed, built in ~2s\nbun run dev      # front end at http://localhost:8080\n```\n\nFor the credentialed experimental backend (ORGO + OpenAI keys), see [Setup](#setup).\n\n---\n\n## Hosted front-end demo\n\n[![Launch PostPrism](https://img.shields.io/badge/launch-live%20demo-purple?style=for-the-badge)](https://postprism.lovable.app)\n[![Watch demo video](https://img.shields.io/badge/watch-2%20min%20video-red?style=for-the-badge)](https://drive.google.com/file/d/1VQ-ryiUvUobjEwkwRCKIvOA-i2ifnabP/view?usp=drive_link)\n\nThe hosted Lovable deployment is deliberately front-end only. It uses\n[`src/services/demoService.ts`](./src/services/demoService.ts) to simulate\nparallel progress and results without backend calls, account access, provider\ncredentials, or publishing.\n\n**What you'll see:**\n- A simulated three-platform progress dashboard\n- Local platform-specific content adaptation\n- Simulated agent actions and completion states\n- The interface and information flow used by the credentialed backend path\n\n**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.\n\n---\n\n## About this project\n\nBuilt solo for the ORGO AI hackathon. Implemented surfaces:\n\n- Front end: React + TypeScript (Vite)\n- Experimental back end: Flask + Python orchestration\n- Agent S2.5 integration with custom optimizations\n- ORGO VM management and parallel execution\n- Real-time screen streaming over WebSocket\n- Progress monitoring\n\nThe 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.\n\n---\n\n## What is implemented\n\n- **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.\n- **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.\n- **Parallel task execution.** The backend creates one coroutine per platform and awaits them together with `asyncio.gather`.\n- **Agent S2.5 + UI-TARS grounding.** Uses [Agent S2.5](https://github.com/simular-ai/Agent-S) for computer use with `ui-tars-1.5-7b` visual grounding and a configurable OpenAI decision model (`gpt-4o-mini` by default).\n- **Loop breakers and rate-limit backoff.** `OptimizedAgentManager` detects repeated actions and rewrite attempts, caps steps, and increases per-platform delay after rate-limit errors.\n\n### Success semantics\n\nThe backend is an experimental hackathon path, not a verified publishing\nservice. Its current controller can return `success=True` when it detects a\nrepeated action or a rewrite attempt, without reading the platform afterward to\nconfirm that a post exists. It also generates a placeholder `post_url` rather\nthan extracting a canonical URL from the platform. Treat a success result as\n\"the controller terminated its run,\" not as proof of publication; verify the\ntarget account manually.\n\n---\n\n## Architecture\n\n```\npostprism/\n├── 📄 README.md                          # This README\n├── 📄 env.example.txt                    # Environment setup template\n│\n├── 🎨 src/                               # Frontend (React + TypeScript)\n│   ├── 📄 App.tsx                        # Main application entry\n│   │                                     # Location: ./src/App.tsx\n│   ├── 📄 pages/Index.tsx                # Primary publishing interface\n│   │                                     # Location: ./src/pages/Index.tsx\n│   ├── 📄 components/\n│   │   ├── 📄 ContentInput.tsx           # Content input with AI preprocessing\n│   │   ├── 📄 LiveStreamViewer.tsx       # Real-time AI observation dashboard\n│   │   ├── 📄 PublishResults.tsx         # Results analytics \u0026 tracking\n│   │   └── 📄 PlatformCard.tsx           # Platform status display\n│   └── 📄 config/api.ts                  # API configuration \u0026 demo mode\n│\n├── 🤖 backend/                           # Backend (Flask + Agent S2.5)\n│   ├── 📄 run_fixed.py                   # Backend entry point\n│   │                                     # Location: ./backend/run_fixed.py\n│   ├── 📄 app_fixed.py                   # Main Flask application\n│   │                                     # Location: ./backend/app_fixed.py\n│   ├── 📄 requirements.txt               # Dependencies\n│   ├── 📄 install_dependencies.sh        # Automated setup\n│   │\n│   ├── 🧠 agent_s2_controller/\n│   │   ├── 📄 optimized_agent_manager.py # Custom Agent S2.5 enhancements\n│   │   │                                 # Anti-perfectionism, loop detection\n│   │   └── 📄 official_agent_manager.py  # Standard wrapper\n│   │\n│   ├── 🎥 streaming/\n│   │   ├── 📄 video_streamer.py          # Real-time video streaming\n│   │   └── 📄 progress_tracker.py        # Progress monitoring\n│   │\n│   └── 🔄 content_adapters/\n│       └── 📄 multi_platform_adapter.py  # AI content optimization\n│\n└── 📚 docs/archive/                      # Development documentation\n```\n\n---\n\n## Setup\n\n**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.\n\n### Prerequisites\n\n#### 1. ORGO AI account \u0026 VM setup\n\nThis enables the parallel architecture.\n\n```bash\n# Step 1: Get ORGO API Access\n# Sign up at: https://docs.orgo.ai/introduction\n\n# Step 2: Create 3 Dedicated VMs (one for each platform)\nLinkedIn VM    → Project ID: \"proj_linkedin_abc123\" (save this!)\nTwitter VM     → Project ID: \"proj_twitter_def456\" (save this!)\nInstagram VM   → Project ID: \"proj_instagram_ghi789\" (save this!)\n\n# Step 3: Persistent login setup\n# For each VM:\n1. Connect to VM via ORGO interface\n2. Open browser → Navigate to platform → Login\n3. Keep browser open, stay logged in\n4. Test: Refresh page → Should remain logged in\n\n# Why this works:\n# - ORGO VMs maintain state when paused\n# - No re-authentication needed = faster publishing\n# - Each VM has a unique IP\n```\n\n#### 2. Agent S2.5 configuration\n\n```bash\n# Required: OpenAI API Key\nOPENAI_API_KEY=sk-your_openai_key_here\nAGENTS2_5_MODEL=o3-2025-04-16              # Recommended by Agent S2.5 team\n# but we use gpt-4o-mini for speed\n\n# Required: UI-TARS 1.5 Grounding Model\nAGENTS2_5_GROUNDING_URL=https://your-endpoint.endpoints.huggingface.cloud\nAGENTS2_5_GROUNDING_API_KEY=hf_your_token_here\n```\n\n#### 3. Environment configuration\n\nCreate `.env` file:\n\n```bash\n# ORGO AI Configuration\nORGO_API_KEY=your_orgo_api_key_here\n\n# Platform-Specific VM IDs\nORGO_LINKEDIN_PROJECT_ID=proj_linkedin_abc123\nORGO_TWITTER_PROJECT_ID=proj_twitter_def456\nORGO_INSTAGRAM_PROJECT_ID=proj_instagram_ghi789\n\n# AI Model Configuration\nOPENAI_API_KEY=sk-your_openai_key_here\nAGENTS2_5_MODEL=o3-2025-04-16\n# but we use gpt-4o-mini for speed\n\n# UI-TARS 1.5 Configuration\nAGENTS2_5_GROUNDING_URL=your_grounding_endpoint\nAGENTS2_5_GROUNDING_API_KEY=your_grounding_key\nAGENTS2_5_GROUNDING_MODEL=ui-tars-1.5-7b\n\n# Feature toggles\nENABLE_ANTI_PERFECTIONISM=true\nENABLE_LOOP_DETECTION=true\nENABLE_LIVE_STREAMING=true\n```\n\n### Installation \u0026 launch\n\n```bash\n# Clone \u0026 setup\ngit clone https://github.com/zelinewang/postprism.git\ncd postprism\n\n# Run automated backend dependencies installation\ncd backend \u0026\u0026 chmod +x install_dependencies.sh \u0026\u0026 ./install_dependencies.sh\n\n# The setup script creates/updates .env in the project root; edit it with your keys and VM IDs\n\n# Launch\ncd ..                                     # Return to project root\nbun run dev \u0026                             # Frontend on :8080 (npm run dev also works)\npython backend/run_fixed.py               # Backend on :8000\n\n# Open http://localhost:8080 and watch the agents run\n```\n\n---\n\n## Technical deep dive\n\nThe architecture below maps directly to tracked implementation; there is no\npseudocode API in this section.\n\n### Parallel orchestration\n\n[`PostPrismApp._execute_official_publishing`](./backend/app_fixed.py) builds one\n`_publish_single_platform_parallel` coroutine per requested platform and passes\nthe complete list to `asyncio.gather(..., return_exceptions=True)`. It then\nnormalizes each `OptimizedPublishResult` and emits per-platform and aggregate\nSocket.IO events.\n\n### Agent execution loop\n\n[`OptimizedAgentManager._run_optimized_agent_loop`](./backend/agent_s2_controller/optimized_agent_manager.py)\nrepeats four concrete operations: capture an ORGO screenshot, call\n`AgentS2_5.predict`, emit the frame/action state, and execute the returned action\nthrough `Computer.exec`. The same method contains the repeated-action and\nrewrite loop breakers described in [Success semantics](#success-semantics).\n\n### Stream lifecycle\n\n[`VideoStreamer`](./backend/streaming/video_streamer.py) owns session lifecycle,\nframe buffers, frame-rate limits, and Socket.IO broadcast state. Agent frames\nare emitted by `OptimizedAgentManager` as `video_frame` events with the session,\nplatform, step, and base64 screenshot payload.\n\n---\n\n## Configuration reference\n\nUse the configuration below (from [`env.example.txt`](./env.example.txt)); the implementation uses `AGENTS2_5_*` variable names.\n\n```bash\n# ===== CORE REQUIREMENTS =====\nOPENAI_API_KEY=sk-your-openai-api-key-here     # From: https://platform.openai.com/api-keys\nORGO_API_KEY=your-orgo-api-key-here            # From: https://console.orgo.ai/\n\n# ===== PLATFORM VM IDs (Optional but recommended) =====\nORGO_LINKEDIN_PROJECT_ID=your-linkedin-vm-id   # Create at: https://console.orgo.ai/projects\nORGO_TWITTER_PROJECT_ID=your-twitter-vm-id      # Enables persistent login states\nORGO_INSTAGRAM_PROJECT_ID=your-instagram-vm-id  # Faster publishing performance\n\n# ===== AGENT S2.5 CONFIGURATION =====\nAGENTS2_5_MODEL=gpt-4o-mini                    # Default: fast \u0026 cost-effective\nAGENTS2_5_MODEL_TYPE=openai                    # Provider: openai/anthropic\nAGENTS2_5_GROUNDING_MODEL=ui-tars-1.5-7b       # Visual UI detection model\nAGENTS2_5_GROUNDING_TYPE=huggingface           # Grounding service provider\nAGENTS2_5_MAX_STEPS=15                         # Maximum automation steps\nAGENTS2_5_STEP_DELAY=1.0                       # Delay between actions (seconds)\nAGENTS2_5_MAX_TRAJECTORY_LENGTH=8              # Memory efficiency\nAGENTS2_5_ENABLE_REFLECTION=true               # Learning capability\n```\n\n### Model selection guide\n\n| Model | Relative trade-off | Intended use |\n|-------|--------------------|--------------|\n| `gpt-4o-mini` | Faster / lower-cost | Default development path |\n| `gpt-4o` | More capable / higher-cost | Accuracy-sensitive experiments |\n| `o3-2025-04-16` | Slower reasoning path | Explicit opt-in experiments |\n\n### Automated installation\n\n`install_dependencies.sh` handles:\n\n1. **Python virtual environment** — isolated dependency management\n2. **Standard dependencies** — Flask 3.0+, SocketIO 5.3+, OpenAI 1.25+, etc. ([`requirements.txt`](./backend/requirements.txt))\n3. **GUI Agents S2.5** — v0.2.5 (Aug 2025) from the [official repository](https://github.com/simular-ai/Agent-S)\n4. **ORGO AI client** — virtual desktop orchestration (`pip install orgo`)\n5. **Production extras** — Gunicorn, Eventlet\n6. **Environment setup** — interactive wizard via `setup_env.py`\n\nRun: `chmod +x install_dependencies.sh \u0026\u0026 ./install_dependencies.sh`\n\n### Ports\n\n- **Frontend**: `http://localhost:8080` (Vite dev server)\n- **Backend**: `http://localhost:8000` (Flask)\n- **Health check**: `http://localhost:8000/health`\n\n### Deployment options (see [`DEPLOYMENT_STRATEGY.md`](./DEPLOYMENT_STRATEGY.md))\n\n**Demo mode (no backend):**\n```bash\nbun install \u0026\u0026 bun run dev\necho \"VITE_DEMO_MODE=true\" \u003e .env.local\n```\n\n**Credentialed local backend path (experimental):**\n```bash\ncd backend \u0026\u0026 chmod +x install_dependencies.sh \u0026\u0026 ./install_dependencies.sh\ncd .. \u0026\u0026 bun install\ncp env.example.txt .env  # edit with your keys\nbun run dev \u0026 python backend/run_fixed.py\n```\n\n**Cloud:** the hosted [Lovable front end](https://postprism.lovable.app) is\nforced into front-end-only demo mode. The repository contains Render/Railway\nconfiguration for a separate backend, but that credentialed path is not part of\nthe public demo and is not claimed as production-ready.\n\n### Troubleshooting (see [`SETUP_GUIDE.md`](./SETUP_GUIDE.md))\n\n```bash\n# Backend connection failed\ncurl http://localhost:8000/health\n\n# OpenAI rate limits — use a cheaper model\nAGENTS2_5_MODEL=gpt-4o-mini\n\n# ORGO VM access issues\ncurl -H \"Authorization: Bearer $ORGO_API_KEY\" https://api.orgo.ai/health\n\n# Installation verification\npython backend/run_fixed.py --test\n```\n\n---\n\n## Status\n\nHackathon 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.\n\n## License\n\n[MIT](LICENSE).\n\n## Acknowledgments\n\n- [ORGO AI](https://docs.orgo.ai/) — isolated cloud VMs\n- [Agent S2.5](https://github.com/simular-ai/Agent-S) — computer-use agent\n- [UI-TARS 1.5](https://github.com/bytedance/UI-TARS) — visual grounding\n- [OpenAI](https://platform.openai.com/) — decision models\n- Front end scaffolded with [Lovable](https://lovable.dev/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzelinewang%2Fpostprism","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzelinewang%2Fpostprism","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzelinewang%2Fpostprism/lists"}