diff --git a/javascript/sentry-conventions/src/op.ts b/javascript/sentry-conventions/src/op.ts index 60898a76..e66c39fd 100644 --- a/javascript/sentry-conventions/src/op.ts +++ b/javascript/sentry-conventions/src/op.ts @@ -285,6 +285,21 @@ export const GEN_AI_GENERATE_CONTENT = 'gen_ai.generate_content'; */ export const GEN_AI_RERANK = 'gen_ai.rerank'; +/** + * Creation of an AI agent that can later be invoked to perform a task + */ +export const GEN_AI_CREATE_AGENT = 'gen_ai.create_agent'; + +/** + * An interaction with a generative AI model through a responses API + */ +export const GEN_AI_RESPONSES = 'gen_ai.responses'; + +/** + * A text completion request to a generative AI model + */ +export const GEN_AI_TEXT_COMPLETION = 'gen_ai.text_completion'; + // Path: model/op/general.json // Name: general diff --git a/model/description/gen_ai.json b/model/description/gen_ai.json new file mode 100644 index 00000000..21e0da77 --- /dev/null +++ b/model/description/gen_ai.json @@ -0,0 +1,50 @@ +{ + "brief": "Generative AI", + "operations": [ + { + "name": "Agent", + "brief": "Generative AI agent operations (e.g., spawning a new agent, an agent performing an action on behalf of a user, and agent handing off work to another agent).", + "ops": ["gen_ai.create_agent", "gen_ai.handoff", "gen_ai.invoke_agent"], + "templates": [ + "{{gen_ai.operation.name}} {{gen_ai.agent.name}}", + "{{gen_ai.operation.name}} {{gen_ai.function_id}}", + "{{gen_ai.operation.name}}" + ], + "examples": [ + "invoke_agent weather_assistant", + "create_agent weather_assistant", + "invoke_agent my-awesome-function", + "invoke_agent" + ] + }, + { + "name": "Inference", + "brief": "Generative AI inference operations. Requests to a generative AI model to perform some unit of work (e.g., autocomplete, translation, chat completion, response to a query).", + "ops": [ + "gen_ai", + "gen_ai.chat", + "gen_ai.embeddings", + "gen_ai.generate_content", + "gen_ai.rerank", + "gen_ai.responses", + "gen_ai.text_completion" + ], + "templates": ["{{gen_ai.operation.name}} {{gen_ai.request.model}}", "{{gen_ai.operation.name}}"], + "examples": [ + "chat gpt-4", + "responses gpt-4o", + "text_completion gpt-3.5-turbo-instruct", + "generate_content gemini-2.0-flash-001", + "embeddings text-embedding-3-small", + "chat" + ] + }, + { + "name": "Tool", + "brief": "Generative AI tool execution. The execution of a tool or function that a generative AI model requested to be called.", + "ops": ["gen_ai.execute_tool"], + "templates": ["{{gen_ai.operation.name}} {{gen_ai.tool.name}}", "{{gen_ai.operation.name}}"], + "examples": ["execute_tool get_weather", "execute_tool"] + } + ] +} diff --git a/model/op/gen_ai.json b/model/op/gen_ai.json index c3609025..e2d5bce3 100644 --- a/model/op/gen_ai.json +++ b/model/op/gen_ai.json @@ -29,6 +29,18 @@ { "name": "gen_ai.rerank", "description": "Reranking of documents or results by a generative AI model" + }, + { + "name": "gen_ai.create_agent", + "description": "Creation of an AI agent that can later be invoked to perform a task" + }, + { + "name": "gen_ai.responses", + "description": "An interaction with a generative AI model through a responses API" + }, + { + "name": "gen_ai.text_completion", + "description": "A text completion request to a generative AI model" } ] } diff --git a/rust/src/op.rs b/rust/src/op.rs index ffba415a..b66f5b61 100644 --- a/rust/src/op.rs +++ b/rust/src/op.rs @@ -200,6 +200,15 @@ pub const GEN_AI_GENERATE_CONTENT: &str = "gen_ai.generate_content"; /// Reranking of documents or results by a generative AI model pub const GEN_AI_RERANK: &str = "gen_ai.rerank"; +/// Creation of an AI agent that can later be invoked to perform a task +pub const GEN_AI_CREATE_AGENT: &str = "gen_ai.create_agent"; + +/// An interaction with a generative AI model through a responses API +pub const GEN_AI_RESPONSES: &str = "gen_ai.responses"; + +/// A text completion request to a generative AI model +pub const GEN_AI_TEXT_COMPLETION: &str = "gen_ai.text_completion"; + // Path: model/op/general.json // Name: general