---
title: "Deploy AgentCase Lab"
description: "Replay and root-cause AI agent failures with 30 demo cases"
category: "AI/ML"
url: https://railway.com/deploy/deploy-agentcase-lab-ai-agent-debugger
---

# Deploy AgentCase Lab

Replay and root-cause AI agent failures with 30 demo cases

**[Deploy AgentCase Lab on Railway](https://railway.com/template/deploy-agentcase-lab-ai-agent-debugger)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/deploy-agentcase-lab-ai-agent-debugger/manifest.json

- **Creator:** onepush
- **Category:** AI/ML

## Template content

### agentcase-lab https://api.iconify.design/mdi/bug-check-outline.svg

- **Image:** ghcr.io/onepush-dev/agentcase-lab:a50f9c9
- **Health check:** /_stcore/health
- **Public domain:** Yes

## Documentation

# Deploy and Host self hosted AgentCase Lab (AI Agent Failure Replay) on Railway

This template runs a single self-hosted AgentCase Lab service, a Streamlit lab for replaying and root-causing AI agent failures, behind a basic-auth password.

## About Hosting AgentCase Lab open-source software on Railway (self hosted AgentCase Lab template)

This template runs one container with the Streamlit app pinned to upstream commit a50f9c9, behind a Caddy proxy that asks for a username and password first. Streamlit has no login of its own, so the Caddy basic-auth prompt is the only gate; keep the service private or rotate the password if you share the URL. Because SQLite is a local file, run a single replica.

Railway handles the build, public HTTPS URL, health check, and volume. You own the content you load and any optional model key.

## Why Deploy AgentCase Lab, the AI agent failure replay and root-cause analysis lab on Railway (Railway Free Trial)

Self hosting on Railway keeps your SQLite data and Streamlit app on infrastructure you control, rather than sending traces to a third-party service.

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying AgentCase Lab on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.

### Railway vs Other Hosting Providers and VPS for AgentCase Lab self hosting

Self hosting means choosing where the Streamlit app and SQLite volume run.

| Provider | What You Get with Railway | What You Get with the Other Provider |
|---|---|---|
| DigitalOcean | The template sets up the app, /data volume, and health check, with AGENTCASE_PASSWORD generated. | A Droplet with root access, but you install Python and Caddy yourself. |
| AWS | One service and one volume, with no VPC or load balancer to configure. | Deep networking control, but you wire EC2, security groups, and EBS by hand. |
| Hetzner | No server sizing or firewall work for a single small app. | Low-cost capacity, but you handle server setup and the reverse proxy yourself. |

Railway trades low-level control for a faster path to a working instance.

## Common Use Cases for hosted AgentCase Lab

- **Reviewing quality:** The dashboard shows success rate, fix rate, root causes, latency, and cost.
- **Triaging failures:** Filter by scenario, status, or root cause.
- **Replaying a run:** Walk through the six-step trace (input, plan, tool, memory, model, result) to find the first failure.
- **Drafting root causes:** Run rule-based analysis for a reproducible explanation, or add an optional OpenAI-compatible key for live analysis.
- **Checking a fix before shipping:** Compare before and after outcome, latency, token use, and cost, so a higher success rate that raises spend is visible.

## Dependencies for AgentCase Lab Docker hosted on Railway

AgentCase Lab runs as one container and one service, with no external database, queue, or cache. The only variable is AGENTCASE_PASSWORD, generated per deploy.

### Deployment Dependencies for Managed AgentCase Lab Service (one container with SQLite)

The template deploys one service from the image ghcr.io/onepush-dev/agentcase-lab:a50f9c9. The SQLite file lives on the /data volume, so keep the service at one replica. The health check path is /_stcore/health.

### Implementation Details for AgentCase Lab (upstream commit a50f9c9 behind a Caddy basic-auth proxy)

The image is built on python:3.12-slim with the upstream source pinned to commit a50f9c9 of the MIT-licensed project. The environment sets AGENTCASE_DB_PATH=/data/agentcase.db and AGENTCASE_USER=admin.

## How does AgentCase Lab compare against other tools

### AgentCase Lab vs Langfuse (Langfuse Alternative)

- **Scope:** Langfuse is an LLM observability platform with production tracing SDKs. AgentCase Lab is a portfolio MVP for replaying failure cases with no production log SDK.
- **Data:** The 30 built-in cases are clearly labeled simulated demo data.
- **Where Langfuse wins:** Continuous production tracing and team workflows at scale.

### AgentCase Lab vs LangSmith (LangSmith Alternative)

- **Scope:** LangSmith is an observability and evaluation platform tied to its SDK. AgentCase Lab ships no tracing SDK and focuses on six-step trace replay.
- **Analysis:** Rule-based root-cause analysis is the default, with an optional OpenAI-compatible model. The UI is Chinese-only.
- **Where LangSmith wins:** Integrated tracing and evaluation for LangChain users.

### AgentCase Lab vs a spreadsheet of bad cases (Spreadsheet Alternative)

- **Structure:** A spreadsheet records what went wrong. AgentCase Lab keeps trace, root cause, and evidence together.
- **Comparison:** Success rate, latency, token use, and cost are shown before and after a fix.
- **Where a spreadsheet wins:** It is free, flexible, and familiar.

### AgentCase Lab with Docker vs Railway (Docker Alternative)

- **Setup:** Docker controls host and volume paths. Railway handles deployment, the public URL, and the /data volume.
- **Auth:** The template adds the Caddy basic-auth proxy; a plain upstream run has no login, so add your own auth proxy.
- **Where Docker wins:** Full host and networking control.

## How to use AgentCase Lab on Railway?

1. Open the public URL that Railway generated for your service.
2. Sign in with username `admin` and the value of `AGENTCASE_PASSWORD`. Streamlit has no login of its own, so this prompt is the only gate.
3. On first start the app loads 30 simulated demo cases. The data is labeled as simulated, and the UI is Chinese-only.
4. Open a case and replay its six-step trace (input, plan, tool, memory, model, result) to find where things went wrong.
5. Run the rule-based root-cause analysis. It works without any model key.
6. To try live model analysis, add `AGENTCASE_API_KEY` yourself, since it is optional and not in the template. Optionally set `AGENTCASE_API_BASE` (default `https://api.deepseek.com/v1`) and `AGENTCASE_MODEL` (default `deepseek-chat`), then redeploy.

Check the health endpoint to confirm Streamlit is reachable (availability only, not AI calls):

```
curl https://your-domain/_stcore/health
```

This path skips basic auth so Railway can check health.

## How to self host AgentCase Lab on other VPS Services (AgentCase Lab self hosting guide)

### Clone the Repository

Clone the upstream repository and check out the pinned commit so you run the same code the template uses.

```bash
git clone https://github.com/TngSHoO/agentcase-lab.git
cd agentcase-lab
git checkout a50f9c9
```

### Install Dependencies

AgentCase Lab needs Python 3.11 or newer. Create a virtual environment and install the requirements.

```bash
python -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt
```

### Configure Environment Variables

The app runs without configuration. For live model analysis, copy the example file and add your own OpenAI-compatible key. Never commit `.env` or a real key.

```bash
cp .env.example .env
```

Set `AGENTCASE_API_KEY` in `.env`, and adjust `AGENTCASE_API_BASE` and `AGENTCASE_MODEL` if you use a different provider.

### Start the AgentCase Lab Application

Start Streamlit and open the local address. The first start creates the SQLite database and loads 30 demo cases.

```bash
streamlit run app.py
```

Open `http://localhost:8501` in your browser. Railway handles the public HTTPS endpoint, database volume, and basic-auth layer.

## Pricing and License of AgentCase Lab (AgentCase Lab pricing)

AgentCase Lab is MIT-licensed open-source software, so self-hosting is free. This is independent community packaging of upstream commit a50f9c9, not affiliated with or endorsed by the upstream author, which describes it as a portfolio MVP. Check your provider's current pricing before relying on any estimate.

## AgentCase Lab hosted vs self hosted comparison (Pricing, features, costs, and more)

AgentCase Lab is free MIT-licensed software with no hosted plan, so the choice is Railway or your own VPS. Optional model usage is billed by your provider.

### Monthly cost of self hosting AgentCase Lab on Railway

Railway bills by usage: RAM and CPU, /data volume size, and service count. Check actual usage in the Railway dashboard after a few days.

### System Requirements for Hosting AgentCase Lab on a VPS

Upstream requires Python 3.11 or newer, and the template runs on python:3.12-slim. Keep one replica, because the SQLite database lives on a single volume.

## Frequently Asked Questions (FAQs)

### How do I sign in to my AgentCase Lab deployment?

Your browser shows a basic-auth prompt. Enter username admin and the password in your service's AGENTCASE_PASSWORD variable. Caddy hashes it at each start, so the new password applies after changing the variable and redeploying. Streamlit XSRF protection is disabled because the app sits behind the basic-auth proxy.

### Is the data in AgentCase Lab real?

No. The 30 built-in cases are labeled simulated demo data, not real model rankings or production results. AgentCase Lab is a portfolio MVP with no production log SDK.

### Does AgentCase Lab need an LLM key to work?

No. The rule-based demo analysis works without one. AGENTCASE_API_KEY is optional and is not included in the template, so you add it yourself only if you want live model analysis.

### Can AgentCase Lab ingest my production agent logs?

No. Upstream marks production log collection as out of scope for this MVP, so you cannot connect production traces directly.

### Why is the AgentCase Lab interface in Chinese?

The upstream project is Chinese-only, so this template cannot switch the UI to English.

### What should I back up for AgentCase Lab?

Back up the /data volume, which holds the agentcase.db SQLite database file.

## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [Weaviate](https://railway.com/deploy/weaviate-1) — Vector database with hybrid search and an API key-protected API
- [Möbius v0.1 Personal AI OS](https://railway.com/deploy/mobius-v01-personal-ai-os) — Self-hosted AI agent that builds and runs apps for you, with memory.

Open this page in a browser: https://railway.com/deploy/deploy-agentcase-lab-ai-agent-debugger
