Skip to content

Commit d8b3f99

Browse files
authored
replace inlined pretty-mod (#1169)
* replace inlined pretty-mod * adopt * better name
1 parent 06c2c01 commit d8b3f99

5 files changed

Lines changed: 153 additions & 347 deletions

File tree

examples/slackbot/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ dependencies = [
4040
"prefect @ git+https://github.com/PrefectHQ/prefect.git@fix-nested-add-metadata",
4141
"numpy",
4242
"raggy[tpuf] @ git+https://github.com/zzstoatzz/raggy.git",
43+
"pretty-mod",
4344
]
4445

4546

examples/slackbot/src/slackbot/modules.py

Lines changed: 0 additions & 275 deletions
This file was deleted.

examples/slackbot/src/slackbot/research_agent.py

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,14 @@
66
from pydantic_ai import Agent
77
from pydantic_ai.models import Model
88

9-
from slackbot.modules import display_signature
109
from slackbot.search import (
10+
display_callable_signature,
1111
explore_module_offerings,
1212
get_latest_prefect_release_notes,
1313
review_common_3x_gotchas,
14-
review_top_level_prefect_api,
1514
search_marvin_docs,
1615
search_prefect_2x_docs,
1716
search_prefect_3x_docs,
18-
verify_import_statements,
1917
)
2018

2119

@@ -49,31 +47,28 @@ def create_research_agent(
4947
deps_type=ResearchContext,
5048
result_type=ResearchFindings,
5149
system_prompt="""You are a specialized research agent for Prefect documentation and knowledge.
52-
Your job is to thoroughly research topics by using ALL available tools to gather comprehensive, accurate information.
50+
Your job is to thoroughly research topics by using available tools to gather comprehensive, accurate information.
5351
5452
Your research process:
55-
1. Start with broad searches to understand the topic context
53+
1. Start with broad documentation searches to understand the topic context
5654
2. Use multiple search queries with different keywords - don't stop at first result
57-
3. For code examples: ALWAYS verify imports with verify_import_statements
58-
4. Focus on Prefect 3.x documentation unless explicitly asked about 2.x or older versions
59-
5. Review gotchas and release notes for recent changes
60-
6. Explore relevant modules for deeper understanding
55+
3. Use explore_module_offerings to understand what's available in relevant modules
56+
4. Use display_callable_signature to get detailed signatures of functions, classes, and methods when needed
57+
5. Focus on Prefect 3.x documentation unless explicitly asked about 2.x or older versions
58+
6. Review gotchas and release notes for recent changes
6159
6260
Remember: You are the research specialist. The main agent relies on you for accurate, comprehensive information.
6361
Be thorough - use tools repeatedly until you have complete information.
6462
Default to Prefect 3.x unless the user explicitly asks about 2.x or version compatibility.
65-
You don't need to use all the tools all the time, but use relevant ones repeatedly if needed.
6663
""",
6764
tools=[
6865
get_latest_prefect_release_notes,
6966
search_prefect_2x_docs,
70-
display_signature,
67+
display_callable_signature,
7168
search_prefect_3x_docs,
7269
search_marvin_docs,
73-
review_top_level_prefect_api,
7470
explore_module_offerings,
7571
review_common_3x_gotchas,
76-
verify_import_statements,
7772
],
7873
)
7974

0 commit comments

Comments
 (0)