# Find the incumbent on a contract

To find the incumbent with an AI agent, have it read the notice with get_opportunity and look for the prior contract number, then fetch that award by PIID. When the notice names no prior contract, it calls search_awards with the same NAICS and agency and matches the description and place of performance to the current work.

Capture managers deciding whether to chase a recompete. The incumbent's size, contract value and number of competing offers last time tell you how hard the follow-on will be, and whether you are better placed as a prime or a subcontractor to them.

## The prompt

```
Who is the incumbent on the work behind SAM.gov notice 5d8aa2693f7c4dd7adf3f6494c77eb5d? Check the notice for a prior contract number first; if there is none, search awards in the same NAICS and agency and tell me how confident the match is.
```

## What the agent calls

1. get_opportunity: Notices for recompetes often cite the current contract number or incumbent name in the description.

```json
{"name":"get_opportunity","arguments":{"notice_id":"5d8aa2693f7c4dd7adf3f6494c77eb5d","user_request":"find incumbent for notice"}}
```

2. fetch: When a PIID is found, the keyless fetch tool returns that award: recipient, agency, value and dates.

```json
{"name":"fetch","arguments":{"id":"award:140P8122C0012"}}
```

3. search_awards: Fallback when the notice cites nothing: awards ending soon in the same code and agency.

```json
{"name":"search_awards","arguments":{"naics":"561720","agency":"Department of the Interior","expiring_within_days":180,"user_request":"match incumbent by naics agency"}}
```

## Sample output

Trimmed; field names and structure match the live response, values are shortened or illustrative.

```json
{
  "data": [
    {
      "piid": "140P8122C0012",
      "recipient_name": "EXAMPLE FACILITY SERVICES INC",
      "recipient_uei": "ABCDEFGH1234",
      "awarding_sub_agency": "National Park Service",
      "naics": "561720",
      "description": "JANITORIAL SERVICES CHANNEL ISLANDS NATIONAL PARK",
      "pop_state": "CA",
      "potential_end_date": "2026-12-31",
      "obligated": 412000,
      "number_of_offers": 3
    }
  ],
  "meta": {
    "credits_charged": 1
  }
}
```

## How to read the answer

- A PIID match from the notice is strong evidence. A match from search alone is a candidate: the agent should say which fields agreed (agency, place, description words, end date) and which did not.
- number_of_offers shows how many bids the incumbent beat. Three or more suggests a competitive field; one suggests the requirement may be written around them.

## Make it yours

- Ask for the incumbent's registration_status too: an incumbent whose registration is lapsing is worth knowing about.
- Ask for the incumbent's other awards at the same agency to judge how entrenched they are.

## Pitfalls

- Small purchases and orders under vehicles can be hard to match. If several awards fit, the agent should list them rather than pick one.
- USAspending descriptions are abbreviated. Never state an incumbent as fact from a weak match.

## The same job over REST

```bash
curl "https://samgovapi.io/api/v1/awards/140P8122C0012" -H "Authorization: Bearer $SAMGOVAPI_API_KEY"
```

Plan: every plan. Credits: 1 credit per lookup; 1 credit per 100 rows returned, minimum 1 for the fallback search.

## Questions

### Does the API say who the incumbent is directly?

No source labels incumbents. The agent infers it from the prior contract number in the notice, or from matching awards, and should say how confident the match is.

### Why is the fetch tool used here instead of a data tool?

fetch reads the public award page by id or PIID without a key and costs no credits, which suits a single lookup.

All recipes: https://samgovapi.io/agents/recipes.md

Independent. Not affiliated with, endorsed by or sponsored by GSA, SAM.gov or any U.S. government agency. Registering in SAM.gov is free at sam.gov.
