# Optimizations (/ai-powered-features/optimizations)



StarSling's AI agents continuously perform deep scans of your workflows and open PRs to optimize your CI speed. See [real examples of AI-authored PRs](https://starsling.dev/#ai-prs) or browse the [customer case studies](https://starsling.dev/customers).

<Callout type="info">
  AI-powered optimizations are in early access. [Join the waitlist](https://tally.so/r/yPgNag) to get access.
</Callout>

## How It Works

StarSling monitors your CI workflows and identifies opportunities to improve performance, reliability, and efficiency. When an optimization is found, StarSling opens a pull request with the suggested changes and an explanation.

## What Gets Optimized

### Caching

Detect missing or misconfigured caches and add them automatically.

* [Better Auth](https://starsling.dev/customers/better-auth): fixed a Turborepo cache that wasn't hitting between runs and cached Playwright browser installs.
* [Partcl](https://starsling.dev/customers/partcl): cached build artifacts across shards.

### Dependency installation

Suggest faster install strategies (e.g., frozen lockfiles, parallel installs).

### Build steps

Identify redundant or slow steps that can be parallelized or removed.

* [Mastra](https://starsling.dev/customers/mastra): sharded the E2E kitchen-sink suite across 3 parallel jobs.
* [Partcl](https://starsling.dev/customers/partcl): parallelized a test suite the team had never had time to split.

### Test reliability

Replace fixed `sleep` calls with real readiness checks and add service healthchecks.

* [Mastra](https://starsling.dev/customers/mastra): swapped blind sleeps for polling across MongoDB and Chroma and added Docker healthchecks.
* [Better Auth](https://starsling.dev/customers/better-auth): added Docker Compose healthchecks.

### Workflow structure

Recommend job splitting, matrix strategies, and dependency ordering.

### Runner configuration

Flag suboptimal runner labels or resource usage.

* [Partcl](https://starsling.dev/customers/partcl): right-sized the heaviest jobs from 64-core down to 8-core machines.

## How Optimizations Are Delivered

1. StarSling analyzes your workflow runs and configuration
2. When an optimization is identified, a PR is opened with the changes
3. Each PR includes an explanation of what changed and why
4. You review and merge at your own pace

> "Within a day of migrating to StarSling Runners, their agents opened up a PR that literally made our Rust CI tests 2x faster!"
>
> — Vamshi Balanaga, Co-founder & CTO, [Partcl](https://starsling.dev/customers/partcl)

## See It In Action

Real CI optimizations StarSling agents have shipped, with measured before/after numbers:

<Cards>
  <Card title="Mastra — 6x faster tests" href="https://starsling.dev/customers/mastra" description="14 agent-authored PRs cut the slowest test suite from ~30m to ~5m and shortened queue time ~8x." />

  <Card title="Better Auth — 2x faster E2E" href="https://starsling.dev/customers/better-auth" description="Three agent optimization PRs halved per-job E2E runtime, saving ~20,000 CI minutes per month." />

  <Card title="Partcl — 13x cheaper per run" href="https://starsling.dev/customers/partcl" description="Build caching, test parallelization, and 64→8-core right-sizing made the heaviest CI jobs 13x cheaper and cut queue time 16x." />
</Cards>

See all [StarSling case studies →](https://starsling.dev/customers).
