Skip to main content

Custodian Not Found

Use this page when the Python SDK or the Platform API cannot find a Custodian, app, squad, or chat resource.

Symptoms

You may see:

  • 404 Not Found
  • NotFoundError
  • Assistant not found or Custodian not found
  • App not found
  • Custodian squad not found (formerly Agent team not found)
  • A chat call fails after changing Custodian or app IDs

Likely Causes

Common causes include:

  • The Custodian ID is incorrect.
  • The app ID is incorrect.
  • The Custodian was created in a different environment.
  • The API key belongs to a different account.
  • The Custodian or app was deleted.
  • The deployed app was not created before calling chat.

How to Check

  1. Confirm the Custodian ID or app ID in your code.
  2. Confirm you are using the API key for the same account.
  3. Confirm the Custodian was created successfully.
  4. Confirm the app was deployed before calling chat.
  5. Restart the process if environment variables changed.

How to Fix

  • Recreate or redeploy the Custodian if needed.
  • Use the returned Custodian or app object instead of manually typing IDs.
  • Confirm the API key and base URL point to the correct environment.
  • Update stale IDs in your code or environment variables.

Example pattern:

from custodian_labs import Custodian

custodian = Custodian(model="gpt-4o", system_prompt="You are helpful")
app = custodian.deploy(name="Support Custodian")

response = app.chat("Hello")