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.

python
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.")
Diagram

User

PraisonAI Agent

Context.dev Tool

Live Web and Context API

Grounded Result

Quick Start

  1. Install the integration
    bash
    pip install "praisonai-tools[context]"
  2. Configure your API key
    bash
    export CONTEXT_DEV_API_KEY="your-context-api-key"

    Create an API key in the Context.dev dashboard.

  3. 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:

python
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:

ToolkitCapabilities
ContextWebToolkitSearch, scraping, crawling, sitemap discovery, extraction, screenshots, and document parsing
ContextBrandToolkitBrand profiles, style guides, fonts, NAICS, and SIC classification
ContextMonitorToolkitWebsite monitors, runs, changes, and usage
ContextBatchToolkitLarge asynchronous jobs and result retrieval
ContextToolkitThe 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:

python
from praisonai_tools import ContextToolkit

tools = ContextToolkit(
    include_write_tools=True,
    allow_browser_actions=True,
).get_tools()

Common Workflows

Search the live web
python
from praisonai_tools import ContextSearch

result = ContextSearch().run(
    query="latest official Stripe product announcements",
    numResults=10,
    includeDomains=["stripe.com"],
    freshness="month",
)
Extract structured data
python
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
python
from praisonai_tools import ContextParse

result = ContextParse().run(
    file_path="./report.pdf",
    extension="pdf",
    includeLinks=True,
)
Process a large URL list
python
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_KEY remains supported as a legacy alias.
  • Tool responses omit internal debug and request metadata before they reach the agent.

Related Resources