ALTER AGENT Statement in Confluent Cloud for Apache Flink

Modify an existing agent’s configuration. Use the CREATE AGENT statement to create an agent.

Syntax

ALTER AGENT [IF EXISTS] [[catalog_name.]database_name.]<agent_name>
SET MODEL <model_identifier>
| SET PROMPT <prompt_string>
| ADD|REMOVE TOOL <tool_identifier>
| SET (<key1>=<val1>[,<key>=<val>]*);

Description

The ALTER AGENT statement enables you to modify the configuration of an existing Streaming Agent. You can update agent properties, like max_iterations, description, tools, and other configuration options.

Parameters

  • agent_name (STRING): Name of the agent to modify
  • key1=value1 (STRING): Agent configuration options to update

Available Configuration Options

  • max_iterations: Maximum loop iterations (INTEGER)
  • description: Human-readable description (STRING)

Examples

Modify an agent’s configuration:

ALTER AGENT claim_processor SET (
  'max_iterations' = '10',
  'description' = 'Updated claims processing agent'
);

Add or remove a tool:

-- Add a tool
ALTER AGENT <name> ADD TOOL <tool>;

-- Remove a tool
ALTER AGENT <name> REMOVE TOOL <tool>;

Assign the model:

-- Set the model
ALTER AGENT <name> SET MODEL <model>

Assign the prompt:

-- Set the prompt
ALTER AGENT <agent> SET PROMPT <prompt>

Update multiple agent properties:

ALTER AGENT data_analyzer SET (
  'max_iterations' = '15',
  'description' = 'Enhanced data analysis agent',
  'tools' = 'advanced_analytics_mcp'
);