> For the complete documentation index, see [llms.txt](https://docs.concurrence.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.concurrence.com/api-reference/readme/platform/dynamic-behavior-sets.md).

# Dynamic Behavior Sets

## List dynamic behavior sets

> List the workspace's dynamic behavior sets with pagination, without their versions. Sets that aren't archived by default. Filter by name text, tag, or the service whose version sets pin them. Requires \`DynamicBehaviorSet.view\` permission.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"tags":[{"name":"Dynamic Behavior Sets"}],"servers":[{"url":"https://platform.api-us.concurrence.com"},{"url":"https://platform.api-eu.concurrence.com","description":"Production, European Union"},{"url":"https://platform.api-au.concurrence.com","description":"Production, Australia"},{"url":"https://platform.api-ca.concurrence.com","description":"Production, Canada"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"SearchString":{"type":"string","maxLength":200,"minLength":1},"DynamicBehaviorSetListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/DynamicBehaviorSetResponse"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More"},"continuation_token":{"title":"Continuation Token"}},"type":"object","required":["items","has_more"],"title":"DynamicBehaviorSetListResponse"},"DynamicBehaviorSetResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"latest_version":{"type":"integer","minimum":1,"title":"Latest Version"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At","description":"When it was archived. Null: not archived."},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","workspace_id","name","tags","latest_version","archived_at","created_by","created_at","updated_at"],"title":"DynamicBehaviorSetResponse","description":"A set in the library, without its versions."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/dynamic-behavior-sets":{"get":{"tags":["Dynamic Behavior Sets"],"summary":"List dynamic behavior sets","description":"List the workspace's dynamic behavior sets with pagination, without their versions. Sets that aren't archived by default. Filter by name text, tag, or the service whose version sets pin them. Requires `DynamicBehaviorSet.view` permission.","operationId":"list-dynamic-behavior-sets","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"sort_by","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[],"title":"Sort By"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/SearchString"},{"type":"null"}],"description":"Sets whose name contains this text, whatever the case.","title":"Q"},"description":"Sets whose name contains this text, whatever the case."},{"name":"tag","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}],"description":"Sets that carry this tag.","title":"Tag"},"description":"Sets that carry this tag."},{"name":"archived","in":"query","required":false,"schema":{"type":"boolean","description":"False (the default): sets that aren't archived. True: only archived sets.","default":false,"title":"Archived"},"description":"False (the default): sets that aren't archived. True: only archived sets."},{"name":"service_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Sets that one of this service's version sets pins.","title":"Service Id"},"description":"Sets that one of this service's version sets pins."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"exclusiveMinimum":0,"default":50,"title":"Limit"}},{"name":"continuation_token","in":"query","required":false,"schema":{"title":"Continuation Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DynamicBehaviorSetListResponse"}}}},"401":{"description":"Missing or invalid API key."},"403":{"description":"Insufficient permissions."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"429":{"description":"Rate limited."}}}}}}
```

## Create a dynamic behavior set

> Create a set with its version 1, together. The name is unique among the workspace's sets that aren't archived, whatever the case. \`id\` is optional, and setting it needs the \`platform:admin\` scope: an import that derives it from the source's id gets a 409 instead of a second set when it creates the set again. Requires \`DynamicBehaviorSet.create\` permission, for a first version in add or replace mode alike.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"tags":[{"name":"Dynamic Behavior Sets"}],"servers":[{"url":"https://platform.api-us.concurrence.com"},{"url":"https://platform.api-eu.concurrence.com","description":"Production, European Union"},{"url":"https://platform.api-au.concurrence.com","description":"Production, Australia"},{"url":"https://platform.api-ca.concurrence.com","description":"Production, Canada"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"CreateDynamicBehaviorSetRequest":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id","description":"The set's id, unique across workspaces. Omitted, the platform generates it; setting it needs the\n``platform:admin`` scope. A client that derives it from something stable, as an import does from its\nworkspace's id and the source's id, gets a conflict instead of a second set when it creates the set again."},"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name","description":"What authors call it. Unique in the workspace among sets that aren't archived, whatever the case. The\nselector reads it with the condition and examples, and the reply prompt never does."},"tags":{"items":{"type":"string","maxLength":64,"minLength":1},"type":"array","maxItems":10,"title":"Tags","description":"Labels for authors. They never reach a prompt."},"first_version":{"$ref":"#/components/schemas/CreateDynamicBehaviorSetVersionRequest","description":"Version 1, written with the set."}},"additionalProperties":false,"type":"object","required":["name","first_version"],"title":"CreateDynamicBehaviorSetRequest","description":"A new set, written with its first version."},"CreateDynamicBehaviorSetVersionRequest":{"properties":{"condition":{"type":"string","maxLength":1000,"minLength":1,"title":"Condition","description":"When it applies, in terms of what the client wants or says. It describes the behavior to the selector."},"instruction":{"anyOf":[{"type":"string","maxLength":50000,"minLength":1},{"type":"null"}],"title":"Instruction","description":"The guidance the reply follows while the behavior is in force. The selector never reads it. Null: the\nbehavior is decided and recorded, and changes no reply."},"mode":{"$ref":"#/components/schemas/DynamicBehaviorMode","description":"``add``: the guidance yields to every action guideline. ``replace``: it stands in for the reply's action\nguidelines, while boundary constraints, guardrails and safety rules stay. A replace-mode version needs an\ninstruction.","default":"add"},"sticky_turns":{"type":"integer","maximum":5,"minimum":1,"title":"Sticky Turns","description":"The fewest caller turns it stays in force once applied, counting the turn it was applied on.","default":1},"note":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}],"description":"What changed, for the people reading the set's history. It never reaches a prompt."}},"additionalProperties":false,"type":"object","required":["condition"],"title":"CreateDynamicBehaviorSetVersionRequest","description":"The next version of a set, or the first version of a new one."},"DynamicBehaviorMode":{"enum":["add","replace"],"type":"string"},"DescriptionString":{"type":"string","maxLength":2000},"DynamicBehaviorSetResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"latest_version":{"type":"integer","minimum":1,"title":"Latest Version"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At","description":"When it was archived. Null: not archived."},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","workspace_id","name","tags","latest_version","archived_at","created_by","created_at","updated_at"],"title":"DynamicBehaviorSetResponse","description":"A set in the library, without its versions."}}},"paths":{"/v1/{workspace_id}/dynamic-behavior-sets":{"post":{"tags":["Dynamic Behavior Sets"],"summary":"Create a dynamic behavior set","description":"Create a set with its version 1, together. The name is unique among the workspace's sets that aren't archived, whatever the case. `id` is optional, and setting it needs the `platform:admin` scope: an import that derives it from the source's id gets a 409 instead of a second set when it creates the set again. Requires `DynamicBehaviorSet.create` permission, for a first version in add or replace mode alike.","operationId":"create-dynamic-behavior-set","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDynamicBehaviorSetRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DynamicBehaviorSetResponse"}}}},"401":{"description":"Missing or invalid API key."},"403":{"description":"Insufficient permissions."},"409":{"description":"The name or the id is already in use."},"422":{"description":"Invalid request body."},"429":{"description":"Rate limited."}},"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}]}}}}
```

## Get a dynamic behavior set

> Retrieve a set, without its versions, with the number of its latest version. Requires \`DynamicBehaviorSet.view\` permission.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"tags":[{"name":"Dynamic Behavior Sets"}],"servers":[{"url":"https://platform.api-us.concurrence.com"},{"url":"https://platform.api-eu.concurrence.com","description":"Production, European Union"},{"url":"https://platform.api-au.concurrence.com","description":"Production, Australia"},{"url":"https://platform.api-ca.concurrence.com","description":"Production, Canada"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"DynamicBehaviorSetResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"latest_version":{"type":"integer","minimum":1,"title":"Latest Version"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At","description":"When it was archived. Null: not archived."},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","workspace_id","name","tags","latest_version","archived_at","created_by","created_at","updated_at"],"title":"DynamicBehaviorSetResponse","description":"A set in the library, without its versions."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/dynamic-behavior-sets/{set_id}":{"get":{"tags":["Dynamic Behavior Sets"],"summary":"Get a dynamic behavior set","description":"Retrieve a set, without its versions, with the number of its latest version. Requires `DynamicBehaviorSet.view` permission.","operationId":"get-dynamic-behavior-set","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"set_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Set Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DynamicBehaviorSetResponse"}}}},"401":{"description":"Missing or invalid API key."},"403":{"description":"Insufficient permissions."},"404":{"description":"Dynamic behavior set not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"429":{"description":"Rate limited."}}}}}}
```

## Update a dynamic behavior set

> Change a set's name, tags or archive state without a new version. A field left out stays as it is. A set is never deleted: \`archived: true\` takes it out of the default list and gives its name back, and is refused (409, naming the services) while a version set pins it. Requires \`DynamicBehaviorSet.update\` permission, and \`DynamicBehaviorSet.delete\` to archive.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"tags":[{"name":"Dynamic Behavior Sets"}],"servers":[{"url":"https://platform.api-us.concurrence.com"},{"url":"https://platform.api-eu.concurrence.com","description":"Production, European Union"},{"url":"https://platform.api-au.concurrence.com","description":"Production, Australia"},{"url":"https://platform.api-ca.concurrence.com","description":"Production, Canada"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"UpdateDynamicBehaviorSetRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":120,"minLength":1},{"type":"null"}],"title":"Name","description":"What authors call it. The selector reads the name, so a rename changes what it sees for every service that\npins the set, without a new version."},"tags":{"anyOf":[{"items":{"type":"string","maxLength":64,"minLength":1},"type":"array","maxItems":10},{"type":"null"}],"title":"Tags"},"archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Archived","description":"True archives the set, which a version set that pins it refuses. False brings it back."}},"additionalProperties":false,"type":"object","title":"UpdateDynamicBehaviorSetRequest","description":"What can change on a set without a new version. A field left out stays as it is."},"DynamicBehaviorSetResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"latest_version":{"type":"integer","minimum":1,"title":"Latest Version"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At","description":"When it was archived. Null: not archived."},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","workspace_id","name","tags","latest_version","archived_at","created_by","created_at","updated_at"],"title":"DynamicBehaviorSetResponse","description":"A set in the library, without its versions."}}},"paths":{"/v1/{workspace_id}/dynamic-behavior-sets/{set_id}":{"patch":{"tags":["Dynamic Behavior Sets"],"summary":"Update a dynamic behavior set","description":"Change a set's name, tags or archive state without a new version. A field left out stays as it is. A set is never deleted: `archived: true` takes it out of the default list and gives its name back, and is refused (409, naming the services) while a version set pins it. Requires `DynamicBehaviorSet.update` permission, and `DynamicBehaviorSet.delete` to archive.","operationId":"update-dynamic-behavior-set","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"set_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Set Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDynamicBehaviorSetRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DynamicBehaviorSetResponse"}}}},"401":{"description":"Missing or invalid API key."},"403":{"description":"Insufficient permissions."},"404":{"description":"Dynamic behavior set not found."},"409":{"description":"The name is in use by a set that isn't archived, or version sets pin the set an archive would remove."},"422":{"description":"Invalid request body."},"429":{"description":"Rate limited."}}}}}}
```

## Get a dynamic behavior set's usage

> List the services whose version sets pin the set, with each pinning version set, the version it runs, whether the pin is enabled and its states. A pinned set cannot be archived. Requires \`DynamicBehaviorSet.view\` permission.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"tags":[{"name":"Dynamic Behavior Sets"}],"servers":[{"url":"https://platform.api-us.concurrence.com"},{"url":"https://platform.api-eu.concurrence.com","description":"Production, European Union"},{"url":"https://platform.api-au.concurrence.com","description":"Production, Australia"},{"url":"https://platform.api-ca.concurrence.com","description":"Production, Canada"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"DynamicBehaviorSetUsageResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PinningService"},"type":"array","title":"Items","description":"The services whose version sets pin the set, by name."},"has_more":{"type":"boolean","title":"Has More"},"continuation_token":{"title":"Continuation Token"}},"type":"object","required":["items","has_more"],"title":"DynamicBehaviorSetUsageResponse"},"PinningService":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The service's id."},"name":{"type":"string","title":"Name","description":"The service's name."},"version_sets":{"items":{"$ref":"#/components/schemas/PinningVersionSet"},"type":"array","title":"Version Sets"}},"type":"object","required":["id","name","version_sets"],"title":"PinningService"},"PinningVersionSet":{"properties":{"name":{"type":"string","title":"Name","description":"The version set's name."},"version":{"type":"integer","title":"Version","description":"The version of the set it runs."},"enabled":{"type":"boolean","title":"Enabled"},"states":{"items":{"type":"string"},"type":"array","title":"States","description":"The states it applies in. Empty: every one."}},"type":"object","required":["name","version","enabled","states"],"title":"PinningVersionSet"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/dynamic-behavior-sets/{set_id}/usage":{"get":{"tags":["Dynamic Behavior Sets"],"summary":"Get a dynamic behavior set's usage","description":"List the services whose version sets pin the set, with each pinning version set, the version it runs, whether the pin is enabled and its states. A pinned set cannot be archived. Requires `DynamicBehaviorSet.view` permission.","operationId":"get-dynamic-behavior-set-usage","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"set_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Set Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"exclusiveMinimum":0,"default":50,"title":"Limit"}},{"name":"continuation_token","in":"query","required":false,"schema":{"title":"Continuation Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DynamicBehaviorSetUsageResponse"}}}},"401":{"description":"Missing or invalid API key."},"403":{"description":"Insufficient permissions."},"404":{"description":"Dynamic behavior set not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"429":{"description":"Rate limited."}}}}}}
```

## List dynamic behavior set versions

> List a set's versions, newest first, with pagination. Requires \`DynamicBehaviorSet.view\` permission.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"tags":[{"name":"Dynamic Behavior Sets"}],"servers":[{"url":"https://platform.api-us.concurrence.com"},{"url":"https://platform.api-eu.concurrence.com","description":"Production, European Union"},{"url":"https://platform.api-au.concurrence.com","description":"Production, Australia"},{"url":"https://platform.api-ca.concurrence.com","description":"Production, Canada"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"DynamicBehaviorSetVersionListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/DynamicBehaviorSetVersionResponse"},"type":"array","title":"Items","description":"Newest version first."},"has_more":{"type":"boolean","title":"Has More"},"continuation_token":{"title":"Continuation Token"}},"type":"object","required":["items","has_more"],"title":"DynamicBehaviorSetVersionListResponse"},"DynamicBehaviorSetVersionResponse":{"properties":{"condition":{"type":"string","maxLength":1000,"minLength":1,"title":"Condition","description":"When it applies, in terms of what the client wants or says. It describes the behavior to the selector."},"instruction":{"anyOf":[{"type":"string","maxLength":50000,"minLength":1},{"type":"null"}],"title":"Instruction","description":"The guidance the reply follows while the behavior is in force. The selector never reads it. Null: the\nbehavior is decided and recorded, and changes no reply."},"mode":{"$ref":"#/components/schemas/DynamicBehaviorMode","description":"``add``: the guidance yields to every action guideline. ``replace``: it stands in for the reply's action\nguidelines, while boundary constraints, guardrails and safety rules stay. A replace-mode version needs an\ninstruction.","default":"add"},"sticky_turns":{"type":"integer","maximum":5,"minimum":1,"title":"Sticky Turns","description":"The fewest caller turns it stays in force once applied, counting the turn it was applied on.","default":1},"note":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}],"description":"What changed, for the people reading the set's history. It never reaches a prompt."},"set_id":{"type":"string","format":"uuid","title":"Set Id"},"version":{"type":"integer","maximum":2147483647,"minimum":1,"title":"Version"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["condition","set_id","version","created_by","created_at"],"title":"DynamicBehaviorSetVersionResponse","description":"One version of a set, as it was written."},"DynamicBehaviorMode":{"enum":["add","replace"],"type":"string"},"DescriptionString":{"type":"string","maxLength":2000},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/dynamic-behavior-sets/{set_id}/versions":{"get":{"tags":["Dynamic Behavior Sets"],"summary":"List dynamic behavior set versions","description":"List a set's versions, newest first, with pagination. Requires `DynamicBehaviorSet.view` permission.","operationId":"list-dynamic-behavior-set-versions","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"set_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Set Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"exclusiveMinimum":0,"default":20,"title":"Limit"}},{"name":"continuation_token","in":"query","required":false,"schema":{"title":"Continuation Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DynamicBehaviorSetVersionListResponse"}}}},"401":{"description":"Missing or invalid API key."},"403":{"description":"Insufficient permissions."},"404":{"description":"Dynamic behavior set or version not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"429":{"description":"Rate limited."}}}}}}
```

## Create a dynamic behavior set version

> Write the set's next version. \`expected\_latest\_version\` is the latest version the write was made from; when the set has moved on, or another write took the next number first, nothing is stored and the response is a 409. A version never changes, and no service runs it until its version set pins it. Requires \`DynamicBehaviorSet.update\` permission, for a version in add or replace mode alike.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"tags":[{"name":"Dynamic Behavior Sets"}],"servers":[{"url":"https://platform.api-us.concurrence.com"},{"url":"https://platform.api-eu.concurrence.com","description":"Production, European Union"},{"url":"https://platform.api-au.concurrence.com","description":"Production, Australia"},{"url":"https://platform.api-ca.concurrence.com","description":"Production, Canada"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"CreateDynamicBehaviorSetVersionRequest":{"properties":{"condition":{"type":"string","maxLength":1000,"minLength":1,"title":"Condition","description":"When it applies, in terms of what the client wants or says. It describes the behavior to the selector."},"instruction":{"anyOf":[{"type":"string","maxLength":50000,"minLength":1},{"type":"null"}],"title":"Instruction","description":"The guidance the reply follows while the behavior is in force. The selector never reads it. Null: the\nbehavior is decided and recorded, and changes no reply."},"mode":{"$ref":"#/components/schemas/DynamicBehaviorMode","description":"``add``: the guidance yields to every action guideline. ``replace``: it stands in for the reply's action\nguidelines, while boundary constraints, guardrails and safety rules stay. A replace-mode version needs an\ninstruction.","default":"add"},"sticky_turns":{"type":"integer","maximum":5,"minimum":1,"title":"Sticky Turns","description":"The fewest caller turns it stays in force once applied, counting the turn it was applied on.","default":1},"note":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}],"description":"What changed, for the people reading the set's history. It never reaches a prompt."}},"additionalProperties":false,"type":"object","required":["condition"],"title":"CreateDynamicBehaviorSetVersionRequest","description":"The next version of a set, or the first version of a new one."},"DynamicBehaviorMode":{"enum":["add","replace"],"type":"string"},"DescriptionString":{"type":"string","maxLength":2000},"DynamicBehaviorSetVersionResponse":{"properties":{"condition":{"type":"string","maxLength":1000,"minLength":1,"title":"Condition","description":"When it applies, in terms of what the client wants or says. It describes the behavior to the selector."},"instruction":{"anyOf":[{"type":"string","maxLength":50000,"minLength":1},{"type":"null"}],"title":"Instruction","description":"The guidance the reply follows while the behavior is in force. The selector never reads it. Null: the\nbehavior is decided and recorded, and changes no reply."},"mode":{"$ref":"#/components/schemas/DynamicBehaviorMode","description":"``add``: the guidance yields to every action guideline. ``replace``: it stands in for the reply's action\nguidelines, while boundary constraints, guardrails and safety rules stay. A replace-mode version needs an\ninstruction.","default":"add"},"sticky_turns":{"type":"integer","maximum":5,"minimum":1,"title":"Sticky Turns","description":"The fewest caller turns it stays in force once applied, counting the turn it was applied on.","default":1},"note":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}],"description":"What changed, for the people reading the set's history. It never reaches a prompt."},"set_id":{"type":"string","format":"uuid","title":"Set Id"},"version":{"type":"integer","maximum":2147483647,"minimum":1,"title":"Version"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["condition","set_id","version","created_by","created_at"],"title":"DynamicBehaviorSetVersionResponse","description":"One version of a set, as it was written."}}},"paths":{"/v1/{workspace_id}/dynamic-behavior-sets/{set_id}/versions":{"post":{"tags":["Dynamic Behavior Sets"],"summary":"Create a dynamic behavior set version","description":"Write the set's next version. `expected_latest_version` is the latest version the write was made from; when the set has moved on, or another write took the next number first, nothing is stored and the response is a 409. A version never changes, and no service runs it until its version set pins it. Requires `DynamicBehaviorSet.update` permission, for a version in add or replace mode alike.","operationId":"create-dynamic-behavior-set-version","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"set_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Set Id"}},{"name":"expected_latest_version","in":"query","required":true,"schema":{"type":"integer","maximum":2147483647,"minimum":1,"description":"The latest version this write was made from. When the set has a different latest version, the write is refused with 409.","title":"Expected Latest Version"},"description":"The latest version this write was made from. When the set has a different latest version, the write is refused with 409."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDynamicBehaviorSetVersionRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DynamicBehaviorSetVersionResponse"}}}},"401":{"description":"Missing or invalid API key."},"403":{"description":"Insufficient permissions."},"404":{"description":"Dynamic behavior set or version not found."},"409":{"description":"The set's latest version isn't expected_latest_version, or the set is archived."},"422":{"description":"Invalid request body."},"429":{"description":"Rate limited."}}}}}}
```

## Get a dynamic behavior set version

> Retrieve one version of a set, as it was written. Requires \`DynamicBehaviorSet.view\` permission.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"tags":[{"name":"Dynamic Behavior Sets"}],"servers":[{"url":"https://platform.api-us.concurrence.com"},{"url":"https://platform.api-eu.concurrence.com","description":"Production, European Union"},{"url":"https://platform.api-au.concurrence.com","description":"Production, Australia"},{"url":"https://platform.api-ca.concurrence.com","description":"Production, Canada"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"DynamicBehaviorSetVersionResponse":{"properties":{"condition":{"type":"string","maxLength":1000,"minLength":1,"title":"Condition","description":"When it applies, in terms of what the client wants or says. It describes the behavior to the selector."},"instruction":{"anyOf":[{"type":"string","maxLength":50000,"minLength":1},{"type":"null"}],"title":"Instruction","description":"The guidance the reply follows while the behavior is in force. The selector never reads it. Null: the\nbehavior is decided and recorded, and changes no reply."},"mode":{"$ref":"#/components/schemas/DynamicBehaviorMode","description":"``add``: the guidance yields to every action guideline. ``replace``: it stands in for the reply's action\nguidelines, while boundary constraints, guardrails and safety rules stay. A replace-mode version needs an\ninstruction.","default":"add"},"sticky_turns":{"type":"integer","maximum":5,"minimum":1,"title":"Sticky Turns","description":"The fewest caller turns it stays in force once applied, counting the turn it was applied on.","default":1},"note":{"anyOf":[{"$ref":"#/components/schemas/DescriptionString"},{"type":"null"}],"description":"What changed, for the people reading the set's history. It never reaches a prompt."},"set_id":{"type":"string","format":"uuid","title":"Set Id"},"version":{"type":"integer","maximum":2147483647,"minimum":1,"title":"Version"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["condition","set_id","version","created_by","created_at"],"title":"DynamicBehaviorSetVersionResponse","description":"One version of a set, as it was written."},"DynamicBehaviorMode":{"enum":["add","replace"],"type":"string"},"DescriptionString":{"type":"string","maxLength":2000},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/dynamic-behavior-sets/{set_id}/versions/{version}":{"get":{"tags":["Dynamic Behavior Sets"],"summary":"Get a dynamic behavior set version","description":"Retrieve one version of a set, as it was written. Requires `DynamicBehaviorSet.view` permission.","operationId":"get-dynamic-behavior-set-version","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"set_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Set Id"}},{"name":"version","in":"path","required":true,"schema":{"type":"integer","maximum":2147483647,"minimum":1,"title":"Version"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DynamicBehaviorSetVersionResponse"}}}},"401":{"description":"Missing or invalid API key."},"403":{"description":"Insufficient permissions."},"404":{"description":"Dynamic behavior set or version not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"429":{"description":"Rate limited."}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.concurrence.com/api-reference/readme/platform/dynamic-behavior-sets.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
