Class: ClaudeAgentSDK::AgentDefinition
- Inherits:
-
Object
- Object
- ClaudeAgentSDK::AgentDefinition
- Defined in:
- lib/claude_agent_sdk/types.rb
Overview
Agent definition configuration
Instance Attribute Summary collapse
-
#background ⇒ Object
Returns the value of attribute background.
-
#description ⇒ Object
Returns the value of attribute description.
-
#disallowed_tools ⇒ Object
Returns the value of attribute disallowed_tools.
-
#effort ⇒ Object
Returns the value of attribute effort.
-
#initial_prompt ⇒ Object
Returns the value of attribute initial_prompt.
-
#max_turns ⇒ Object
Returns the value of attribute max_turns.
-
#mcp_servers ⇒ Object
Returns the value of attribute mcp_servers.
-
#memory ⇒ Object
Returns the value of attribute memory.
-
#model ⇒ Object
Returns the value of attribute model.
-
#permission_mode ⇒ Object
Returns the value of attribute permission_mode.
-
#prompt ⇒ Object
Returns the value of attribute prompt.
-
#skills ⇒ Object
Returns the value of attribute skills.
-
#tools ⇒ Object
Returns the value of attribute tools.
Instance Method Summary collapse
-
#initialize(description:, prompt:, tools: nil, disallowed_tools: nil, model: nil, skills: nil, memory: nil, mcp_servers: nil, initial_prompt: nil, max_turns: nil, background: nil, effort: nil, permission_mode: nil) ⇒ AgentDefinition
constructor
A new instance of AgentDefinition.
Constructor Details
#initialize(description:, prompt:, tools: nil, disallowed_tools: nil, model: nil, skills: nil, memory: nil, mcp_servers: nil, initial_prompt: nil, max_turns: nil, background: nil, effort: nil, permission_mode: nil) ⇒ AgentDefinition
Returns a new instance of AgentDefinition.
615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 |
# File 'lib/claude_agent_sdk/types.rb', line 615 def initialize(description:, prompt:, tools: nil, disallowed_tools: nil, model: nil, skills: nil, memory: nil, mcp_servers: nil, initial_prompt: nil, max_turns: nil, background: nil, effort: nil, permission_mode: nil) @description = description @prompt = prompt @tools = tools @disallowed_tools = disallowed_tools # Array of tool names to disallow @model = model @skills = skills # Array of skill names @memory = memory # One of: 'user', 'project', 'local' @mcp_servers = mcp_servers # Array of server names or config hashes @initial_prompt = initial_prompt # Initial prompt sent when agent starts @max_turns = max_turns # Maximum conversation turns for the agent @background = background # Whether this agent runs in background @effort = effort # See ClaudeAgentSDK::EFFORT_LEVELS or an Integer @permission_mode = # Permission mode for the agent end |
Instance Attribute Details
#background ⇒ Object
Returns the value of attribute background.
612 613 614 |
# File 'lib/claude_agent_sdk/types.rb', line 612 def background @background end |
#description ⇒ Object
Returns the value of attribute description.
612 613 614 |
# File 'lib/claude_agent_sdk/types.rb', line 612 def description @description end |
#disallowed_tools ⇒ Object
Returns the value of attribute disallowed_tools.
612 613 614 |
# File 'lib/claude_agent_sdk/types.rb', line 612 def disallowed_tools @disallowed_tools end |
#effort ⇒ Object
Returns the value of attribute effort.
612 613 614 |
# File 'lib/claude_agent_sdk/types.rb', line 612 def effort @effort end |
#initial_prompt ⇒ Object
Returns the value of attribute initial_prompt.
612 613 614 |
# File 'lib/claude_agent_sdk/types.rb', line 612 def initial_prompt @initial_prompt end |
#max_turns ⇒ Object
Returns the value of attribute max_turns.
612 613 614 |
# File 'lib/claude_agent_sdk/types.rb', line 612 def max_turns @max_turns end |
#mcp_servers ⇒ Object
Returns the value of attribute mcp_servers.
612 613 614 |
# File 'lib/claude_agent_sdk/types.rb', line 612 def mcp_servers @mcp_servers end |
#memory ⇒ Object
Returns the value of attribute memory.
612 613 614 |
# File 'lib/claude_agent_sdk/types.rb', line 612 def memory @memory end |
#model ⇒ Object
Returns the value of attribute model.
612 613 614 |
# File 'lib/claude_agent_sdk/types.rb', line 612 def model @model end |
#permission_mode ⇒ Object
Returns the value of attribute permission_mode.
612 613 614 |
# File 'lib/claude_agent_sdk/types.rb', line 612 def @permission_mode end |
#prompt ⇒ Object
Returns the value of attribute prompt.
612 613 614 |
# File 'lib/claude_agent_sdk/types.rb', line 612 def prompt @prompt end |
#skills ⇒ Object
Returns the value of attribute skills.
612 613 614 |
# File 'lib/claude_agent_sdk/types.rb', line 612 def skills @skills end |
#tools ⇒ Object
Returns the value of attribute tools.
612 613 614 |
# File 'lib/claude_agent_sdk/types.rb', line 612 def tools @tools end |