# How Does a General Contractor Check Every Subcontractor's License Each Month? An Agent That Looks Each One Up on the State Board's Site

A California general contractor runs an agent monthly that looks up each active subcontractor on the CSLB's Check a License page and flags the ones to review.

[Run this on Rush](https://cloud.getrush.ai/run/check-subcontractor-licenses-each-month/web/). Opens the console with this prompt ready to send.

## What the agent does

This is for a general contractor in California that runs a dozen remodels and small commercial jobs at a time with twenty to forty subcontractors: electricians, plumbers, roofers, drywall and concrete crews. The project manager is supposed to check each sub's state license before the first pay application of the month, and in practice it happens when the sub is hired and rarely again. A license that lapsed in the middle of a job is found when something goes wrong. The agent does the check every month for every sub on an active job and writes one list of the ones a person needs to look at.

The office keeps its active subs in a list it already has: the company name, the license number, the trade the contractor hired them for, and the jobs they are on. That list goes into the request. No app is connected. The agent uses its own browser on the Contractors State License Board's public Check a License page, which takes a search by "Contractor License #", by contractor business name, or by a person's name, and which the board says is unavailable from Sunday at 8 p.m. to Monday at 6 a.m. for maintenance.

For each sub the agent searches by license number, since the board's tips note that a business name search needs only the first 10 to 15 letters and can return several firms. It opens the license detail and copies, as the page writes them, the business name on the license, the license status, the expiration date, and the classifications listed, along with the other entries the page shows about the license. It checks that the name on the license matches the company the office pays, and that one of the classifications listed fits the trade the sub was hired for, by comparing it with what the office wrote in the list.

It sorts the results into needs attention now (the status is anything but active, the license has expired, the name does not match, or the number returns nothing), expiring within 60 days, and clear. It writes `licenses.csv` with one row per sub and `attention.md`, which lists the first two groups with the job each sub is on and a link to the board's page for that license, and it saves a screenshot of each detail page it read so the office has what the page said that day. It contacts no one and changes nothing.

## Start it with one API call

`POST https://api.phoenix.so/o/{org}/sessions`

```json
{
  "agent": "claude",
  "input": "Monthly subcontractor license check for Harbor Point Builders, run date 2026-11-24, time zone America/Los_Angeles. Active subs (company | license # | hired for | jobs): Bayline Electric Inc | 1000001 | electrical | Ocean Ave remodel, 5th St tenant improvement; Coastal Plumbing Co | 1000002 | plumbing | Ocean Ave remodel; Ridge Top Roofing | 1000003 | roofing | Mesa Dr reroof. Use the browser on https://www.cslb.ca.gov/OnlineServices/CheckLicenseII/CheckLicense.aspx and search each by Contractor License #. On each license detail page record exactly as written: business name, license status, expiration date, classifications, and every other entry the page shows about the license; save a screenshot named <license#>.png. Flag NOW when the status is not active, the license is expired, the business name does not match the company above, no classification fits the trade it was hired for, or the number returns no license. Flag SOON when it expires within 60 days of the run date. Write licenses.csv (company, license, hired_for, jobs, name_on_license, status, expires, classifications, flag, note, checked_at) and attention.md listing NOW then SOON with the jobs affected and the page URL. Do not contact anyone and do not submit any form other than the license search."
}
```

1. **Get an API key.** In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
2. **Send the request.** POST the body in request.json to https://api.phoenix.so/o/{org}/sessions. The run starts in its own cloud sandbox.
3. **Read what came back.** Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.

## What comes back

The session's artifacts hold `attention.md` with the subs that need a person now and those expiring in the next 60 days, each with the jobs they are on, `licenses.csv` with every sub checked and what the board's page said, and one screenshot per license detail page. A sub whose number returned nothing is in the first group, not left out, since a typo in the office's list and a license that is gone both need a person to look.

What the project manager checks before acting: the board's page itself for any sub flagged, through the link in the list, since the page is the record and the agent only copied it; whether a name mismatch is a d/b/a the office already knows about; and whether a classification question is real, since the agent compares classification names with the office's own trade words and can be too strict. Deciding whether to hold a payment or stop work is the contractor's call with its own advisers, not the agent's.

## Run it on every Thursday before subcontractor payments

In the console, a Project automation with a `schedule` trigger runs a saved agent whose instructions hold the sub list. A contractor that pays subs on the first of the month can use `cron` `0 7 * * 4` with `timezone` `America/Los_Angeles` and have the instructions stop at once unless the date seven days from today falls in the next month, which makes it the last Thursday before the 1st, so the check lands a few days ahead of payments and never in the board's Sunday night maintenance window.

A contractor that keeps its subs in its own job system can instead have that system send `POST /o/{org}/sessions` with the current list when a pay run is prepared, so the list is never stale. Each run is its own session, which keeps a month-by-month record of what the board said about each sub.

## Why run it on Rush?

The check is public and simple, but it is thirty searches and thirty pages to read, and it is the first thing dropped in a busy month. The agent runs it in a real browser on its own computer and keeps a screenshot of every page it read, so the office has a dated record of each check without anyone saving them by hand.

No sign-in is involved: the board's lookup needs none, so nothing is stored but the sub list in the saved agent. Each run records its steps and its `total_cost_usd`, and a contractor that grows to several offices can start one run per office at the same time, each on its own computer.

## Frequently asked questions

### Does this work for states other than California?

The same job works on any state board that has a public license lookup. Replace the URL and describe what to search by in the prompt. Each board's pages are different, so name the fields you want copied and let the agent say when a page does not show one.

### Can it check workers' compensation and bonds too?

The prompt asks the agent to copy every entry the license detail page shows about the license, so whatever the board lists there is in `licenses.csv`. Judging whether a sub's coverage is enough for your contract is a question for your insurance broker, not the agent.

### Why search by license number rather than by name?

A name search can return several firms with similar names, and the board's tips ask for only the first 10 to 15 letters. A number returns one license, so the agent then checks the name on it against the company you pay, which is the comparison that matters.

### What happens if the board's site is down when it runs?

The agent records that the page did not load and marks every sub as not checked, rather than passing them. Avoid Sunday 8 p.m. to Monday 6 a.m., the board's maintenance window, and use Run now on the automation later in the day if the site was down.

## More Web jobs

- [Which New Federal Grants Could Our Nonprofit Apply For? A Watershed Group's Weekly Grants.gov Digest](https://getrush.ai/run/find-new-federal-grants-we-can-apply-for/web/)
- [Which of Our Target Companies Posted New Roles This Week? A Recruiting Agency's Careers-Page Check](https://getrush.ai/run/find-new-openings-at-target-companies/web/)
- [Find New Public Bid Opportunities for a Construction Contractor Every Week](https://getrush.ai/run/find-new-public-bid-opportunities/web/)

## More jobs like this: Produce a report or file, no repo

- [Find Why Customers Churned in Stripe](https://getrush.ai/run/churn-analysis/stripe/)
- [How Do I Collect Each Location's Weekly Numbers From Slack? A Fitness Franchise's Monday Table From Its Studio Managers' Posts](https://getrush.ai/run/collect-each-locations-weekly-numbers/slack/)
- [What Did Customers Ask Us to Build This Week? A SaaS Customer-Success Team's Friday Digest From Shared Slack Channels](https://getrush.ai/run/collect-feature-requests-from-customer-channels/slack/)

## Keep reading

- [Start your first run from the developer API quickstart](https://getrush.ai/docs/quickstart/)
- [Rush pricing: Free, Pro and Max](https://getrush.ai/pricing/)
