{"id":47989050,"url":"https://github.com/jamesmurdza/upstream-agents","last_synced_at":"2026-04-04T11:32:07.417Z","repository":{"id":342933818,"uuid":"1170550929","full_name":"jamesmurdza/upstream-agents","owner":"jamesmurdza","description":"Run AI coding agents in isolated sandboxes connected to your GitHub repositories","archived":false,"fork":false,"pushed_at":"2026-04-03T05:53:51.000Z","size":4905,"stargazers_count":7,"open_issues_count":4,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-03T13:32:27.754Z","etag":null,"topics":["ai-agents","claude-code","codex","opencode"],"latest_commit_sha":null,"homepage":"https://upstreamagents.com/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jamesmurdza.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":"2026-03-02T08:51:12.000Z","updated_at":"2026-04-03T05:53:55.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/jamesmurdza/upstream-agents","commit_stats":null,"previous_names":["jamesmurdza/sandboxed-agents","jamesmurdza/upstream-agents"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jamesmurdza/upstream-agents","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesmurdza%2Fupstream-agents","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesmurdza%2Fupstream-agents/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesmurdza%2Fupstream-agents/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesmurdza%2Fupstream-agents/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jamesmurdza","download_url":"https://codeload.github.com/jamesmurdza/upstream-agents/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesmurdza%2Fupstream-agents/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31398114,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ai-agents","claude-code","codex","opencode"],"created_at":"2026-04-04T11:32:07.263Z","updated_at":"2026-04-04T11:32:07.391Z","avatar_url":"https://github.com/jamesmurdza.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Upstream Agents\n\nA sophisticated multi-tenant web application that enables users to run AI coding agents (Claude Code, OpenCode, Codex) in isolated Daytona sandboxes. Features a Slack-like interface for managing AI-powered coding agents across multiple GitHub repositories with real-time streaming output, background execution, and persistent chat history.\n\n\u003cimg width=\"1361\" height=\"749\" alt=\"image\" src=\"https://github.com/user-attachments/assets/301f461c-7a8a-43b3-b26b-c30d3b972dcf\" /\u003e\n\n## Features\n\n### Core Capabilities\n- **Multi-Agent Support** - Run Claude Code, OpenCode, or Codex agents with configurable models\n- **GitHub OAuth Login** - Sign in with GitHub, OAuth tokens used for seamless repo access\n- **Isolated Sandboxes** - Each branch gets its own Daytona sandbox environment\n- **Real-time Streaming** - Live agent output via Server-Sent Events (SSE)\n- **Background Execution** - Agent tasks continue even when browser is closed\n- **Persistent Chat History** - Full conversation history with tool calls and content blocks\n\n### User Experience\n- **Slack-like Interface** - Repository sidebar with branch-based conversations\n- **Multi-tenant Architecture** - User data fully isolated, shared infrastructure\n- **Quota Enforcement** - Configurable concurrent sandbox limits\n- **Encrypted Credentials** - API keys stored AES-encrypted in database\n- **Drag-and-Drop Reordering** - Customize repository order in sidebar\n- **Dark Mode Support** - Theme switching with next-themes\n- **Mobile Responsive** - Full mobile UI with drawer navigation\n\n### Developer Features\n- **Pull Request Integration** - Create PRs directly from branches\n- **Git Diff Viewer** - Compare branches and view changes\n- **Git History** - Browse commit history per branch\n- **Advanced Git Operations** - Merge, rebase, reset, tag, rename, and delete remote branches\n- **MCP Server Registry** - Browse and connect 3,000+ MCP servers via [Smithery](https://smithery.ai)\n- **Environment Variables** - Per-repository encrypted env vars for sandboxes\n- **Auto-Stop** - Configurable sandbox auto-stop intervals (5-20 minutes)\n- **Safe Push Handling** - Branch checks plus retry and graceful \"already up-to-date\" handling\n\n---\n\n## Architecture\n\n```\n┌─────────────────────┐     ┌─────────────────────┐     ┌──────────────────┐\n│   Browser (React)   │────▶│   Next.js 16 API    │────▶│   Neon Postgres  │\n│   - Shadcn/ui       │◀────│   (Vercel/Node)     │◀────│   (Serverless)   │\n│   - SSE Streaming   │     │   - 34 API routes   │     │   - Prisma ORM   │\n└─────────────────────┘     └──────────┬──────────┘     └──────────────────┘\n                                       │\n                    ┌──────────────────┼──────────────────┐\n                    │                  │                  │\n                    ▼                  ▼                  ▼\n          ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐\n          │  Daytona Cloud  │ │   GitHub API    │ │   LLM APIs      │\n          │  (Sandboxes)    │ │   (OAuth)       │ │   - Anthropic   │\n          │  - SDK control  │ │   - Repos/PRs   │ │   - OpenAI      │\n          └────────┬────────┘ └─────────────────┘ └─────────────────┘\n                   │\n                   ▼\n          ┌─────────────────┐         ┌─────────────────┐\n          │  Coding Agents  │────────▶│  Smithery       │\n          │  - Claude Code  │         │  (MCP Registry  │\n          │  - OpenCode     │◀────────│   + Connect)    │\n          │  - Codex        │         └─────────────────┘\n          └─────────────────┘\n```\n\n---\n\n## Tech Stack\n\n### Frontend\n- **Framework**: Next.js 16.1.6 (App Router, React 19)\n- **UI Library**: Shadcn/ui (50+ Radix UI components)\n- **Styling**: Tailwind CSS 4.2\n- **Forms**: React Hook Form + Zod validation\n- **Icons**: Lucide React (564 icons)\n- **Charts**: Recharts\n- **Notifications**: Sonner toast notifications\n- **Markdown**: react-markdown for agent output\n\n### Backend\n- **Server**: Next.js API Routes (serverless)\n- **ORM**: Prisma 7.4.2 with Neon adapter\n- **Database**: PostgreSQL (Neon serverless)\n- **Authentication**: NextAuth.js 4.24 (GitHub OAuth)\n- **Encryption**: crypto-js (AES encryption)\n\n### External Services\n- **Sandboxes**: Daytona SDK (@daytonaio/sdk)\n- **Agent Runner**: background-agents\n- **LLM Providers**: Anthropic SDK, OpenAI SDK\n- **MCP Registry**: [Smithery](https://smithery.ai) (server discovery + managed connections)\n\n---\n\n## Setup\n\n### Prerequisites\n\n- Node.js 18+\n- A Vercel account (for deployment + Neon integration)\n- A GitHub account (for OAuth app)\n- A Daytona API key\n\n### 1. Neon Database\n\n**Option A: Via Vercel (Recommended)**\n1. Go to your Vercel project → **Storage** tab\n2. Click **Create Database** → Select **Neon Postgres**\n3. Vercel auto-adds `DATABASE_URL` and `DATABASE_URL_UNPOOLED` env vars\n\n**Option B: Direct Setup**\n1. Go to [neon.tech](https://neon.tech) → Create project\n2. Copy the connection strings\n3. Add to Vercel env vars:\n   ```\n   DATABASE_URL=postgres://...?sslmode=require\n   DATABASE_URL_UNPOOLED=postgres://...?sslmode=require\n   ```\n\n### 2. GitHub OAuth App\n\n1. Go to GitHub → **Settings** → **Developer settings** → **OAuth Apps** → **New OAuth App**\n2. Fill in:\n   - **Application name**: `Upstream Agents`\n   - **Homepage URL**: `https://your-app.vercel.app`\n   - **Authorization callback URL**: `https://your-app.vercel.app/api/auth/callback/github`\n3. Click **Register application**\n4. Copy the **Client ID**\n5. Generate a **Client Secret** and copy it\n\n### 3. Generate Secrets\n\n```bash\n# NextAuth secret (32-byte base64)\nopenssl rand -base64 32\n\n# Encryption key for API credentials (32-byte hex)\nopenssl rand -hex 32\n```\n\n### 4. Environment Variables\n\nAdd these to Vercel (Settings → Environment Variables):\n\n| Variable | Description | Example |\n|----------|-------------|---------|\n| `DATABASE_URL` | Neon pooled connection | (auto-set by Vercel) |\n| `DATABASE_URL_UNPOOLED` | Neon direct connection (migrations) | (auto-set by Vercel) |\n| `NEXTAUTH_URL` | Your app's URL | `https://your-app.vercel.app` |\n| `NEXTAUTH_SECRET` | Random secret for NextAuth | (output of `openssl rand -base64 32`) |\n| `GITHUB_CLIENT_ID` | From GitHub OAuth App | `Ov23li...` |\n| `GITHUB_CLIENT_SECRET` | From GitHub OAuth App | `abc123...` |\n| `ENCRYPTION_KEY` | For encrypting API keys | (output of `openssl rand -hex 32`) |\n| `DAYTONA_API_KEY` | Your shared Daytona API key | `dtn_...` |\n| `DAYTONA_API_URL` | Daytona API endpoint | `https://api.daytona.io` |\n| `SMITHERY_API_KEY` | Smithery API key for MCP registry | (from [smithery.ai/account/api-keys](https://smithery.ai/account/api-keys)) |\n\n### 5. Deploy\n\n```bash\n# Install dependencies\nnpm install\n\n# Generate Prisma client\nnpx prisma generate\n\n# Run migrations (uses DATABASE_URL_UNPOOLED)\nnpx prisma migrate deploy\n\n# Build\nnpm run build\n```\n\nOr push to Vercel - the build script handles migrations automatically.\n\n---\n\n## Development\n\nThis is a monorepo with two packages:\n\n```\npackages/\n├── agents/   # @sandboxed-agents/sdk - TypeScript SDK for AI coding agents\n└── web/      # @sandboxed-agents/web - Next.js web application\n```\n\nFor full local development setup (database, environment variables, running the dev server), see [DEVELOPMENT.md](./DEVELOPMENT.md).\n\n### Available Scripts (Root)\n\n| Script | Description |\n|--------|-------------|\n| `npm run dev` | Start web development server |\n| `npm run build` | Build SDK + web app |\n| `npm run build:sdk` | Build only the SDK package |\n| `npm run build:web` | Build only the web app |\n| `npm run start` | Start production server |\n| `npm run lint` | ESLint check across all packages |\n| `npm run clean` | Clean build artifacts |\n\nFor SDK development, see [`packages/agents/README.md`](packages/agents/README.md).\n\n### Testing\n\nFor unit tests and Playwright end-to-end tests, see [TESTING.md](./TESTING.md).\n\n---\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch: `git checkout -b feature/my-feature`\n3. Make your changes\n4. Run linting: `npm run lint`\n5. Commit your changes: `git commit -m \"Add my feature\"`\n6. Push to the branch: `git push origin feature/my-feature`\n7. Open a Pull Request\n\n---\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamesmurdza%2Fupstream-agents","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamesmurdza%2Fupstream-agents","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamesmurdza%2Fupstream-agents/lists"}