Skip to content

Commit fbbc303

Browse files
zimegClaude
andcommitted
feat: add the Pydantic AI coding agent
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
1 parent 2e86b5d commit fbbc303

72 files changed

Lines changed: 4681 additions & 1 deletion

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/dependabot.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ updates:
44
directories:
55
- "/"
66
- "/openai-agents-sdk"
7+
- "/pydantic-ai"
78
schedule:
89
interval: "daily"
910
cooldown:

‎.github/workflows/ruff.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
matrix:
1717
directory:
1818
- openai-agents-sdk
19+
- pydantic-ai
1920
defaults:
2021
run:
2122
working-directory: ${{ matrix.directory }}

‎.github/workflows/tests.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
matrix:
1717
directory:
1818
- openai-agents-sdk
19+
- pydantic-ai
1920
defaults:
2021
run:
2122
working-directory: ${{ matrix.directory }}

‎AGENTS.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Guidance for coding agents working in this repository.
77
A monorepo for a **Coding Agent** sample for Slack, built with Bolt for Python. Each framework lives in its own directory as a standalone sample:
88

99
- `openai-agents-sdk/` — built with the **OpenAI Agents SDK**
10+
- `pydantic-ai/` — built with **Pydantic AI**
1011

1112
Implementations share a structure and user experience, not code. Keep each one obvious on its own, written in its framework's idiom, rather than adding shared helpers.
1213

@@ -32,6 +33,7 @@ pytest
3233
```
3334
.github/ # Shared CI workflows and dependabot config
3435
openai-agents-sdk/ # OpenAI Agents SDK implementation
36+
pydantic-ai/ # Pydantic AI implementation
3537
```
3638

3739
CI runs ruff and pytest against each directory with a matrix in `.github/workflows/ruff.yml` and `.github/workflows/tests.yml`. Dependabot watches each directory separately. When adding an implementation, add its directory to both workflow matrices, to `.github/dependabot.yml`, and to the framework table in the root `README.md`.

‎README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ A sample Slack agent that showcases [Slack Code](https://docs.slack.dev/ai/slack
1010
| App | Directory | Get started | Framework |
1111
| --------------------- | -------------------- | -------------------------------------------- | --------------------------------------------------------------- |
1212
| **OpenAI Agents SDK** | `openai-agents-sdk/` | [View README](./openai-agents-sdk/README.md) | [openai-agents](https://openai.github.io/openai-agents-python/) |
13+
| **Pydantic AI** | `pydantic-ai/` | [View README](./pydantic-ai/README.md) | [pydantic-ai](https://ai.pydantic.dev/) |
1314

1415
## What it can do
1516

‎openai-agents-sdk/agent/workspace.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# Environment variables kept from the app's environment are everything except
1010
# the app's own tokens and anything that looks like a credential, so they aren't
1111
# passed to a command from the repository.
12-
SECRET_PREFIXES = ("OPENAI_", "SLACK_")
12+
SECRET_PREFIXES = ("ANTHROPIC_", "OPENAI_", "SLACK_")
1313
SECRET_MARKERS = ("API_KEY", "CREDENTIAL", "PASSWORD", "PRIVATE_KEY", "SECRET", "TOKEN")
1414

1515
# git never waits on a prompt or an editor, since nobody can answer one.

‎pydantic-ai/.env.sample‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Required, set at least one AI provider API key.
2+
# If both are set, Anthropic is used by default.
3+
# ANTHROPIC_API_KEY=YOUR_ANTHROPIC_API_KEY
4+
OPENAI_API_KEY=YOUR_OPENAI_API_KEY
5+
6+
# Optional, uncomment and set when running without the Slack CLI (python3 app.py).
7+
# SLACK_APP_TOKEN=YOUR_SLACK_APP_TOKEN
8+
# SLACK_BOT_TOKEN=YOUR_SLACK_BOT_TOKEN
9+
10+
# Required for OAuth (app_oauth.py). Set your app's OAuth credentials.
11+
# SLACK_CLIENT_ID=YOUR_SLACK_CLIENT_ID
12+
# SLACK_CLIENT_SECRET=YOUR_SLACK_CLIENT_SECRET
13+
# SLACK_SIGNING_SECRET=YOUR_SLACK_SIGNING_SECRET
14+
15+
# Optional, uncomment and set when using a custom Slack instance.
16+
# SLACK_API_URL=YOUR_SLACK_API_URL

‎pydantic-ai/.gitignore‎

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Build
2+
build/
3+
dist/
4+
docs/_sources/
5+
docs/.doctrees
6+
7+
# Claude Code
8+
.claude/*.local.json
9+
10+
# Coverage
11+
.coverage
12+
cov_*
13+
coverage.xml
14+
15+
# Editors
16+
.idea/
17+
18+
# Environment
19+
.env*
20+
!.env.sample
21+
env*/
22+
venv/
23+
.venv*
24+
25+
# Logs
26+
logs/
27+
28+
# macOS
29+
.DS_Store
30+
31+
# OAuth
32+
data/
33+
34+
# Python
35+
__pycache__/
36+
*.db
37+
*.egg
38+
*.egg-info/
39+
*.eggs/
40+
*.py[cod]
41+
*.so
42+
.mypy_cache/
43+
.pytype/
44+
.python-version
45+
*~
46+
pip
47+
48+
# Testing
49+
.cache
50+
.pytest_cache/
51+
.tox
52+
tmp.txt

‎pydantic-ai/.slack/.gitignore‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
apps.dev.json
2+
cache/

‎pydantic-ai/.slack/config.json‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"manifest": {
3+
"source": "local"
4+
},
5+
"project_id": "3d533454-d0ab-41a8-a99d-e0ac11c33ad9"
6+
}

0 commit comments

Comments
 (0)