Skip to content

Commit bf537aa

Browse files
committed
add phidata
1 parent 428b46a commit bf537aa

File tree

2 files changed

+120
-1
lines changed

2 files changed

+120
-1
lines changed

integrations/phidata.mdx

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
---
2+
title: '🦐 Phidata'
3+
description: 'Build AI Assistants with ScrapeGraph using Phidata'
4+
---
5+
6+
## Overview
7+
8+
[Phidata](https://www.phidata.com) is a development framework for building production-ready AI Assistants. This integration allows you to easily add ScrapeGraph's web scraping capabilities to your Phidata-powered AI agents.
9+
10+
<Card
11+
title="Official Phidata Documentation"
12+
icon="book"
13+
href="https://docs.phidata.com/introduction"
14+
>
15+
Learn more about building AI Assistants with Phidata
16+
</Card>
17+
18+
## Installation
19+
20+
Install the required packages:
21+
22+
```bash
23+
pip install phi-scrapegraph
24+
```
25+
26+
## Usage
27+
28+
### Basic Example
29+
30+
Create an AI Assistant with ScrapeGraph tools:
31+
32+
```python
33+
from phi.agent import Agent
34+
from phi.tools.scrapegraph_tools import ScrapeGraphTools
35+
36+
# Initialize with smartscraper enabled
37+
scrapegraph = ScrapeGraphTools(smartscraper=True)
38+
39+
# Create an agent with the tools
40+
agent = Agent(
41+
tools=[scrapegraph],
42+
show_tool_calls=True,
43+
markdown=True,
44+
stream=True
45+
)
46+
47+
# Use smartscraper to extract structured data
48+
agent.print_response("""
49+
Use smartscraper to extract the following from https://www.wired.com/category/science/:
50+
- News articles
51+
- Headlines
52+
- Images
53+
- Links
54+
- Author
55+
""")
56+
```
57+
58+
### Markdown Conversion
59+
60+
You can also use ScrapeGraph to convert web pages to markdown:
61+
62+
```python
63+
from phi.agent import Agent
64+
from phi.tools.scrapegraph_tools import ScrapeGraphTools
65+
66+
# Initialize with only markdownify enabled
67+
scrapegraph_md = ScrapeGraphTools(smartscraper=False)
68+
69+
# Create an agent for markdown conversion
70+
agent_md = Agent(
71+
tools=[scrapegraph_md],
72+
show_tool_calls=True,
73+
markdown=True
74+
)
75+
76+
# Convert webpage to markdown
77+
agent_md.print_response(
78+
"Fetch and convert https://www.wired.com/category/science/ to markdown format"
79+
)
80+
```
81+
82+
## Features
83+
84+
<CardGroup cols={2}>
85+
<Card title="Smart Scraping" icon="robot">
86+
Extract structured data using natural language
87+
</Card>
88+
<Card title="Markdown Conversion" icon="file-code">
89+
Convert web pages to clean markdown
90+
</Card>
91+
<Card title="Streaming Support" icon="stream">
92+
Real-time responses with streaming
93+
</Card>
94+
<Card title="Tool Visibility" icon="eye">
95+
Debug with visible tool calls
96+
</Card>
97+
</CardGroup>
98+
99+
## Support
100+
101+
Need help with the integration?
102+
103+
<CardGroup cols={2}>
104+
<Card
105+
title="Phidata Discord"
106+
icon="discord"
107+
href="https://discord.gg/4M322yGwK2"
108+
>
109+
Join the Phidata community
110+
</Card>
111+
<Card
112+
title="GitHub"
113+
icon="github"
114+
href="https://github.com/phidatahq/phidata"
115+
>
116+
Check out the source code
117+
</Card>
118+
</CardGroup>

mint.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@
104104
"group": "Integrations",
105105
"pages": [
106106
"integrations/langchain",
107-
"integrations/llamaindex"
107+
"integrations/llamaindex",
108+
"integrations/phidata"
108109
]
109110
},
110111
{

0 commit comments

Comments
 (0)