This project provides a fully agentic, A2A-compliant web crawler agent using Python, Flask, and modular async crawling logic.
It exposes both a CLI interface and an A2A HTTP+JSON/JSON-RPC protocol service (per A2A Protocol) for agent-to-agent orchestration.
- A2A Agent: Supported via
a2a_agent_flask.py—responds to any A2A-compliant system with a well-formed AgentCard and JSON-RPC 2.0 methods (message/send). - Modular CLI: Run web crawling/joined reporting tasks directly via
cli.pyfor interactive/manual use. - Skill Structure: Schedule periodic crawls or fetch the most recent report and suggestions for failed URLs as skills.
- MCP Tool Optional: Also includes a modular MCP-style HTTP tool (
mcp_server.py) for stateless, non-agentic API use. - Clean, extensible structure for large-scale or team-oriented A2A/MCP adoption.
-
Install dependencies
pip install -r requirements.txt -
Run the A2A agent server (Flask)
python a2a_agent_flask.pyThis listens on
http://localhost:9000/ -
Discover AgentCard
curl http://localhost:9000/.well-known/agent-card.json -
Start periodic crawl with JSON-RPC
import requests payload = { "jsonrpc": "2.0", "id": "task-001", "method": "message/send", "params": { "skill": "start_periodic_crawl", "interval_seconds": 600, "target_url": "https://example.com/", "max_concurrent": 10 } } requests.post("http://localhost:9000/v1/message:send", json=payload) -
Fetch latest crawl report and suggestions
payload = { "jsonrpc": "2.0", "id": "task-002", "method": "message/send", "params": {"skill": "get_last_report"} } requests.post("http://localhost:9000/v1/message:send", json=payload) -
Manual (CLI) crawling
python cli.py --target-url https://example.com/ --max-concurrent 10 --output-format json --output-prefix results/manual
- a2a_agent_flask.py: Main A2A agent server (serves agent card, JSON-RPC skill endpoint)
- cli.py: Standalone crawler with full CLI interface (runs all crawl/report logic)
- config.py, crawl.py, report.py: Modular components for config, network crawling, reporting
- mcp_server.py: (Optional) API for tool/server-only mode (not A2A agent)
- mcp_client.py: (Optional) test client for direct MCP use
- requirements.txt: All dependencies
- AgentCard: Served at
/.well-known/agent-card.json - JSON-RPC 2.0: Main endpoint
/v1/message:sendaccepts and returns JSON-RPC objects per spec - Skills:
start_periodic_crawl,get_last_report - Messages & Tasks: Responds per standard A2A formats for immediate and schedule-based commands
- Add more skills by extending the handler in
a2a_agent_flask.py - Integrate with larger orchestration tools or LLM agent frameworks
- Use as reference implementation for app-to-agent or agent-to-agent Python systems
This project includes two advanced agents for analyzing failing URLs and identifying codebase culprits:
Analyzer Agent (http://localhost:9100)
The urlstatus/analyzer_agent.py service analyzes web crawl failures and suggests fixes using an OpenAI-compatible LLM. To run:
-
Install dependencies (if not already done):
pip install -r requirements.txt -
Start the analyzer agent:
python urlstatus/analyzer_agent.py -
The service will be available at
http://localhost:9100/v1and serves its AgentCard athttp://localhost:9100/.well-known/agent-card.json
GitHub Code Analysis Agent (http://localhost:9200)
The urlstatus/github_code_agent.py service finds backend GitHub source for failing endpoints and proposes fixes. To run:
-
Set your GitHub credentials in environment variables:
export GITHUB_REPO="YOUR_ORG/YOUR_REPO" export GITHUB_TOKEN="your_github_personal_access_token" -
Install dependencies (if not already done):
pip install -r requirements.txt -
Start the GitHub code analysis agent:
python urlstatus/github_code_agent.py -
The service will be available at
http://localhost:9200/v1and serves its AgentCard athttp://localhost:9200/.well-known/agent-card.json
These V2 agents extract URLs from crawl reports and pass them to dedicated analysis agents that search for failing URL patterns in the codebase, enabling comprehensive root cause analysis and automated fix recommendations.
MIT License
Copyright (c) 2025 Aziz Kurbanov
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.