You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a third parallel Casey implementation using the Claude Agent SDK
with AsyncApp. Tools are registered via @tool decorator and
create_sdk_mcp_server(). Conversation context is managed server-side
via session IDs instead of local message history storage.
Updates root README, CLAUDE.md, CI matrix, and dependabot config.
Copy file name to clipboardExpand all lines: .claude/CLAUDE.md
+19-16Lines changed: 19 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,19 +4,20 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
4
4
5
5
## What This Is
6
6
7
-
A monorepo containing two parallel implementations of **Casey**, an AI-powered IT helpdesk agent for Slack built with Bolt for Python. Both implementations are functionally identical from the Slack user's perspective but use different AI agent frameworks:
7
+
A monorepo containing three parallel implementations of **Casey**, an AI-powered IT helpdesk agent for Slack built with Bolt for Python. All implementations are functionally identical from the Slack user's perspective but use different AI agent frameworks:
8
8
9
9
-`pydantic-ai/` — Built with **Pydantic AI**
10
10
-`openai-agents-sdk/` — Built with **OpenAI Agents SDK**
11
+
-`claude-agent-sdk/` — Built with **Claude Agent SDK**
11
12
12
13
All tool data (knowledge base, tickets, password resets, system status, permissions) is hardcoded for demo purposes.
13
14
14
15
## Commands
15
16
16
-
All commands must be run from within the respective project directory (`pydantic-ai/` or `openai-agents-sdk/`).
17
+
All commands must be run from within the respective project directory (`pydantic-ai/`, `openai-agents-sdk/`, or `claude-agent-sdk/`).
17
18
18
19
```sh
19
-
# Run the app (requires .env with OPENAI_API_KEY; Slack tokens optional with CLI)
20
+
# Run the app (requires .env with OPENAI_API_KEY or ANTHROPIC_API_KEY; Slack tokens optional with CLI)
20
21
slack run # via Slack CLI
21
22
python3 app.py # directly
22
23
@@ -34,9 +35,10 @@ pytest
34
35
.github/ # Shared CI workflows and dependabot config
claude-agent-sdk/ # Claude Agent SDK implementation
37
39
```
38
40
39
-
CI runs ruff lint/format checks against both directories via a matrix strategy in `.github/workflows/ruff.yml`. Dependabot monitors `requirements.txt` in both directories independently.
41
+
CI runs ruff lint/format checks against all directories via a matrix strategy in `.github/workflows/ruff.yml`. Dependabot monitors `requirements.txt` in all directories independently.
40
42
41
43
## Architecture (shared across both implementations)
42
44
@@ -59,15 +61,16 @@ Each sub-package has a `register(app)` function called from `listeners/__init__.
Both implementations share the same Slack listener layer, the same five simulated IT tools, and the same user experience. The only difference is how the agent is defined and executed under the hood.
16
+
All implementations share the same Slack listener layer, the same five simulated IT tools, and the same user experience. The only difference is how the agent is defined and executed under the hood.
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+
See the root `../.claude/CLAUDE.md` for monorepo-wide architecture, commands, and a comparison of all implementations.
6
+
7
+
## Claude Agent SDK Specifics
8
+
9
+
**App (`app.py`)** uses `AsyncApp` from Bolt for Python. All listeners and Slack API calls are fully async (`await`).
10
+
11
+
**Agent (`agent/casey.py`)** uses `ClaudeSDKClient` from the Claude Agent SDK. Tools are registered via `create_sdk_mcp_server()` and passed as `mcp_servers` in `ClaudeAgentOptions`. The `run_casey_agent()` function is async and returns `(response_text, session_id)`.
12
+
13
+
**Tools (`agent/tools/`)** are defined with the `@tool` decorator from `claude_agent_sdk`. Each tool returns `{"content": [{"type": "text", "text": ...}]}`. Tools are registered into a single MCP server via `create_sdk_mcp_server()`.
14
+
15
+
**Conversation history** is managed server-side by the Claude Agent SDK via sessions. The local `SessionStore` (`conversation/store.py`) only maps `(channel_id, thread_ts)` to session IDs. Sessions are resumed via `ClaudeAgentOptions(resume=session_id)`.
16
+
17
+
**Feedback blocks** use the native `FeedbackButtonsElement` from `slack_sdk.models.blocks`. A single `feedback` action ID is registered.
18
+
19
+
**Dependencies** (`agent/deps.py`) use `AsyncWebClient` from `slack_sdk.web.async_client` instead of the sync `WebClient`.
0 commit comments