Context.dev
Live web search, scraping, extraction, brand intelligence, monitors, and batches for PraisonAI agents
Give a PraisonAI agent current web data and structured website intelligence through Context.dev.
from praisonaiagents import Agent
from praisonai_tools import ContextToolkit
agent = Agent(
name="web-researcher",
instructions="Use Context.dev for current web research and cite source URLs.",
tools=ContextToolkit().get_tools(),
)
agent.start("Find Context.dev's latest public product updates and summarize them.")Quick Start
- Install the integration
bash pip install "praisonai-tools[context]" - Configure your API key
bash export CONTEXT_DEV_API_KEY="your-context-api-key"Create an API key in the Context.dev dashboard.
- Add Context.dev to an agent
python from praisonaiagents import Agent from praisonai_tools import ContextSearch, ContextScrape agent = Agent( name="researcher", instructions="Search first, then scrape the most useful sources.", tools=[ContextSearch(), ContextScrape()], ) agent.start("What did Stripe launch most recently? Include source links.")
Choose the Tools You Need
Use focused tools for small agents:
from praisonai_tools import (
ContextCrawl,
ContextExtract,
ContextParse,
ContextScrape,
ContextSearch,
ContextSitemap,
)
tools = [
ContextSearch(),
ContextScrape(),
ContextCrawl(),
ContextSitemap(),
ContextExtract(),
ContextParse(),
]Use a toolkit when an agent needs a broader capability set:
| Toolkit | Capabilities |
|---|---|
ContextWebToolkit | Search, scraping, crawling, sitemap discovery, extraction, screenshots, and document parsing |
ContextBrandToolkit | Brand profiles, style guides, fonts, NAICS, and SIC classification |
ContextMonitorToolkit | Website monitors, runs, changes, and usage |
ContextBatchToolkit | Large asynchronous jobs and result retrieval |
ContextToolkit | The complete public Context.dev catalog |
The combined toolkit exposes 26 safe tools by default. Monitor and batch operations that change external state require an explicit opt-in:
from praisonai_tools import ContextToolkit
tools = ContextToolkit(
include_write_tools=True,
allow_browser_actions=True,
).get_tools()Common Workflows
Search the live web
from praisonai_tools import ContextSearch
result = ContextSearch().run(
query="latest official Stripe product announcements",
numResults=10,
includeDomains=["stripe.com"],
freshness="month",
)Extract structured data
from praisonai_tools import ContextExtract
result = ContextExtract().run(
url="https://www.context.dev/pricing",
schema={
"type": "object",
"properties": {
"plans": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {"type": "string"},
"price": {"type": "string"},
},
"required": ["name", "price"],
},
}
},
"required": ["plans"],
},
)Parse a local document
from praisonai_tools import ContextParse
result = ContextParse().run(
file_path="./report.pdf",
extension="pdf",
includeLinks=True,
)Process a large URL list
from praisonai_tools import ContextBatchToolkit
batch_tools = ContextBatchToolkit(include_write_tools=True).get_tools()Pass batch_tools to an agent that needs to submit a job, check its status, and page through its results.
Safety Defaults
- Browser actions are omitted from scrape tool schemas unless
allow_browser_actions=True. - Tools that create, update, run, cancel, or delete monitors and batches are omitted unless
include_write_tools=True. - API credentials are read from
CONTEXT_DEV_API_KEY;CONTEXT_API_KEYremains supported as a legacy alias. - Tool responses omit internal debug and request metadata before they reach the agent.