Skip to content

Commit 202f2a7

Browse files
go
1 parent 26717e4 commit 202f2a7

File tree

1 file changed

+2
-68
lines changed

1 file changed

+2
-68
lines changed

docs/english/concepts/adding-agent-features.md

Lines changed: 2 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,13 @@ View our [agent quickstart](/ai/agent-quickstart) to get up and running with Cas
1212

1313
Your agent can utilize features applicable to messages throughout Slack, like [chat streaming](#text-streaming) and [feedback buttons](#adding-and-handling-feedback). They can also [utilize the `Assistant` class](/tools/bolt-python/concepts/assistant-class) for a side-panel view designed with AI in mind.
1414

15-
If you're unfamiliar with using these feature within Slack, you may want to read the [API docs on the subject](/ai/).
16-
17-
## Prerequisites
18-
19-
You'll need a Slack app to mold into an agent. Follow the [quickstart](/tools/bolt-python/getting-started), and then come back here!
15+
If you're unfamiliar with using these feature within Slack, you may want to read the [API docs on the subject](/ai/). Then come back here to implement them with Bolt!
2016

2117
---
2218

2319
## Listening for user invocation
2420

25-
Agents can be invoked throughout Slack, such as @mentions in channels, messages to the app, and using the assistant side panel.
21+
Agents can be invoked throughout Slack, such as via @mentions in channels, messaging the agent, and using the assistant side panel.
2622

2723
<Tabs>
2824
<TabItem value="appmention" label = "App mention">
@@ -381,68 +377,6 @@ def handle_feedback_button(
381377

382378
---
383379

384-
## Defining agent tools
385-
386-
Your agent can perform actions by defining tools. A _tool_ in an agent context is a function that calls an external system.
387-
388-
The following example uses the Claude Agent SDK.
389-
390-
```python title="agent/tools/create_support_ticket.py"
391-
from claude_agent_sdk import tool
392-
393-
394-
@tool(
395-
name="create_support_ticket",
396-
description="Create a new IT support ticket for issues that require human follow-up.",
397-
input_schema={
398-
"type": "object",
399-
"properties": {
400-
"title": {
401-
"type": "string",
402-
"description": "A concise title describing the issue.",
403-
},
404-
"priority": {
405-
"type": "string",
406-
"description": "The ticket priority level.",
407-
"enum": ["low", "medium", "high", "critical"],
408-
},
409-
},
410-
"required": ["title", "priority"],
411-
},
412-
)
413-
async def create_support_ticket_tool(args):
414-
"""Create a new IT support ticket."""
415-
title = args["title"]
416-
priority = args["priority"]
417-
418-
ticket_id = f"INC-{random.randint(100000, 999999)}"
419-
420-
text = (
421-
f"Support ticket created successfully.\n"
422-
f"**Ticket ID:** {ticket_id}\n"
423-
f"**Priority:** {priority}"
424-
)
425-
426-
return {"content": [{"type": "text", "text": text}]}
427-
```
428-
429-
Then import and register the tool:
430-
431-
```python title="agent/casey.py"
432-
from claude_agent_sdk import create_sdk_mcp_server
433-
from agent.tools.create_support_ticket import create_support_ticket_tool
434-
435-
casey_tools_server = create_sdk_mcp_server(
436-
name="casey-tools",
437-
version="1.0.0",
438-
tools=[create_support_ticket_tool],
439-
)
440-
```
441-
442-
Your agent can then call those tools as needed.
443-
444-
---
445-
446380
## Full example
447381

448382
Putting all those concepts together results in a dynamic agent ready to helpfully respond.

0 commit comments

Comments
 (0)