Threads, and the messages and runs in them, are always user-owned, so selecting a team doesn’t affect them. Agents are team-owned, but the threads you run them on are not.
Set the active team
Setting a team is optional. If you don’t, requests use your personal workspace, the private, single-member team that every user has by default. The Teams Settings page in the SeekrFlow web interface lists every team you belong to and its ID. Resources returned by the SDK also include theteam_id of their owning team.
The SDK sends the team you select as the x-team-id request header. You can set it in two ways.
Environment variable (recommended). Set SEEKR_TEAM_ID and the SDK applies it automatically to every request:
Python
supplied_headers when you construct the client. This takes precedence over SEEKR_TEAM_ID, which is useful when one process works across several teams:
Python
Python
The team applies to the whole client. Every call made through a client is scoped to that client’s team. To act on more than one team in the same process, create a separate client per team.
Create resources in a team
Once a client is scoped to a team, every resource you create through it belongs to that team. No extra argument is needed on individual calls:Python
Read resources from a team
List and retrieve calls return only the resources owned by the client’s team. Requests for a resource that belongs to a team you aren’t a member of are rejected.Python
team_id of their owning team alongside the user_id of the creator, so you can confirm where a resource lives:
Python
Work across multiple teams
To operate on several teams in one program, create one client per team:Python