Skip to content

Commit 7499a5b

Browse files
committed
notion researcher
1 parent 5ff4803 commit 7499a5b

File tree

2 files changed

+91
-0
lines changed

2 files changed

+91
-0
lines changed

.agents/notion-agent.ts

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import type { AgentDefinition } from './types/agent-definition'
2+
3+
const definition: AgentDefinition = {
4+
id: 'notion-query-agent',
5+
displayName: 'Notion Query Agent',
6+
model: 'x-ai/grok-4-fast',
7+
8+
spawnerPrompt:
9+
'Expert at querying Notion databases and pages to find information and answer questions about content stored in Notion workspaces.',
10+
11+
inputSchema: {
12+
prompt: {
13+
type: 'string',
14+
description:
15+
'A question or request about information stored in your Notion workspace',
16+
},
17+
},
18+
19+
outputMode: 'last_message',
20+
includeMessageHistory: false,
21+
22+
mcpServers: {
23+
notionApi: {
24+
command: 'npx',
25+
args: ['-y', '@notionhq/notion-mcp-server'],
26+
env: {
27+
NOTION_TOKEN: 'ntn_***',
28+
},
29+
},
30+
},
31+
32+
systemPrompt: `You are a Notion expert who helps users find and retrieve information from their Notion workspace. You can search across pages and databases, read specific pages, and query databases with filters.`,
33+
34+
instructionsPrompt: `Instructions:
35+
1. Use the Notion tools to search for relevant information based on the user's question
36+
2. Start with a broad search to understand what content is available
37+
3. If you find relevant pages or databases, read them in detail or query them with appropriate filters
38+
4. Provide a comprehensive answer based on the information found in Notion
39+
5. If no relevant information is found, let the user know what you searched for and suggest they check if the content exists in their Notion workspace
40+
41+
Include the ids of important blocks/pages/databases in the response.
42+
`,
43+
}
44+
45+
export default definition

.agents/notion-researcher.ts

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import type { AgentDefinition } from './types/agent-definition'
2+
import { publisher } from './constants'
3+
4+
const definition: AgentDefinition = {
5+
id: 'notion-researcher',
6+
publisher,
7+
displayName: 'Notion Researcher',
8+
model: 'x-ai/grok-4-fast',
9+
10+
spawnerPrompt:
11+
'Expert at conducting comprehensive research across Notion workspaces by spawning multiple notion agents in parallel waves to gather information from different angles and sources.',
12+
13+
inputSchema: {
14+
prompt: {
15+
type: 'string',
16+
description:
17+
'A research question or topic to investigate thoroughly across your Notion workspace',
18+
},
19+
},
20+
21+
outputMode: 'last_message',
22+
includeMessageHistory: true,
23+
toolNames: ['spawn_agents'],
24+
spawnableAgents: ['notion-query-agent'],
25+
26+
mcpServers: {
27+
notionApi: {
28+
command: 'npx',
29+
args: ['-y', '@notionhq/notion-mcp-server'],
30+
env: {
31+
NOTION_TOKEN: 'ntn_***',
32+
},
33+
},
34+
},
35+
36+
systemPrompt: `You are an expert research coordinator who specializes in conducting comprehensive investigations across Notion workspaces. You orchestrate multiple notion agents to gather information from different perspectives and sources to provide thorough, well-researched answers.`,
37+
38+
instructionsPrompt: `Instructions:
39+
- Spawn notion agents to gather information from different perspectives and sources.
40+
- You can spawn multiple notion agents in parallel to get even more information faster.
41+
- Once you have gathered some information, spawn more notion agents to gather even more information to answer the user's question in the best way possible.
42+
- Write up a comprehensive report of the information gathered from the notion agents. No need to include the ids of the blocks/pages/databases in the report.
43+
`,
44+
}
45+
46+
export default definition

0 commit comments

Comments
 (0)