createAgenticContext

Creates an agentic context, which is Markdown content that the service writes to a file on the WorkSpace for the agent to use. The name must be unique among the contexts in your account. If it isn't, the operation returns ConflictException, and its ResourceId identifies the existing context. If the tags would exceed the limit of 50 tags per resource, the operation returns ServiceQuotaExceededException.

Samples

// The following example creates a steering context that agents read from the file coding standards.
// md.
val resp = workSpacesClient.createAgenticContext {
    clientToken = "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111"
    name = "coding-standards"
    description = "Team coding standards for agents."
    contextType = AgenticContextType.fromValue("STEERING")
    targetFilePath = "coding-standards.md"
    contextBody = "# Coding standards\n\nWrite unit tests for every change."
    tags = listOf<Tag>(
        Tag {
            key = "team"
            value = "platform"
        }            
    )
}