Technical Briefing: agentic-internet

The Problem

This repository provides an AI agent system for autonomous web interaction, research, and task execution. However, it lacks the operational infrastructure and code health guards expected of production software. A consultant would assess it as functional but unguarded — capable of running ad-hoc workflows, but not reliably iterated upon.

What This Does

The codebase centers on agentic_internet/ (25 files), with cli.py as the primary entry point and agentic_internet/agents/internet_agent.py as the core agent implementation. Execution flows through main in agentic_internet/__main__.py:6, which reaches 68 functions. The run command in cli.py:59 is the CLI entry point, while orchestrate at cli.py:299 handles multi-step workflows.

The system touches the filesystem via output.write_text (in run, multi, orchestrate, news) and makes outbound network calls through SerpAPI, Browser Use, and model providers. The import graph has 30 modules and 37 edges with no circular dependencies, but agentic_internet/agents/multi_model_serpapi.py is the most connected hub: 6 importers, 5 outgoing edges, instability 0.45. agentic_internet/__init__ is equally central with instability 0.56 — a change to its surface area ripples widely.

How It Is Wired

Execution starts at agentic_internet/__main__.py:6 (main), which instantiates and runs InternetAgent. From there, run triggers the agent loop, which resolves tools via agentic_internet/tools/__init__, performs searches through web_search.py, and may invoke MCP integration through mcp_integration.py. The call graph shows InternetAgent called from 15 places, is_mcp_available from 13, and WebSearchTool from 5.

Two files carry blast radius risk: agentic_internet/agents/multi_model_serpapi.py (1008 lines, 36 functions, 18 types) and agentic_internet/cli.py (oversized, 22-reach orchestrate/multi commands). agentic_internet/agents/specialized_agents.py has broad except clauses that swallow errors indiscriminately. Nine repeated 6-line blocks appear across advanced_usage.py, basic_usage.py, tools/__init__.py, and tests/test_mcp_integration.py.

How To Use It

Setup: Clone with git clone https://github.com/moses-y/agentic-internet.git. Install with uv sync or pip install -e .. A .env.example is present; copy to .env and add API keys for SerpAPI, OpenAI/Anthropic/HuggingFace, OpenRouter, and Browser Use.

Configuration: Required env vars are documented in .env.example (root). No lockfile exists — pyproject.toml declares dependencies only. This means builds are not reproducibly pinned.

Running it: uv run python -m agentic_internet.cli --help lists commands. Typical workflow: uv run python -m agentic_internet.cli research "Search for latest AI news" or agentic_internet via python -m agentic_internet.cli. The InternetAgent class in agentic_internet/agents/internet_agent.py is the programmatic entry point.

Real-World Use

An analyst could instantiate InternetAgent and run agent.run("Summarize today's AI regulatory developments") to trigger a search-orchestrate-execute cycle. The agent resolves its own model, selects tools (web search, code execution, browser use), and returns a summary. For multi-model workflows, multi_model_serpapi.py assigns specialized models per step, but its 1008-line size and 5-level nesting make modifications high-risk.

Code Health & Issues

The static analysis produced these measured findings:

  • [HIGH] Add a workflow that builds and tests this repository — 30 source files, no CI configuration. Every change merges with nobody having run the build. Fix: add a workflow running the project build and test command on push and pull_request.
  • [MEDIUM] Enable Dependabot or Renovate — 1 manifest, no update bot. Without a bot a published advisory sits unpatched. Fix: commit .github/dependabot.yml covering the repo ecosystems plus github-actions.
  • [MEDIUM/cognitive_load] Deep nesting x5 — multi_model_serpapi.py, mcp_integration.py, web_search.py. Max indentation depth 10; control flow is hard to follow. Fix: flatten with early returns/guard clauses; extract inner blocks.
  • [MEDIUM/cognitive_load] Oversized file x2 — multi_model_serpapi.py (1008 lines), cli.py. Hard to hold in one head; changes ripple widely. Fix: split into cohesive units by responsibility.
  • [MEDIUM/resilience] Broad exception handling — specialized_agents.py. Bare/Exception-wide except swallows errors. Fix: catch specific exceptions; re-raise or log the rest.
  • [MEDIUM/clarity] Duplicated code blocks — 9 repeated 6-line blocks across 5 files (advanced_usage.py, basic_usage.py, tools/__init__.py, test_mcp_integration.py). Fix: extract shared helpers; DRY the repeated logic.

Beyond these: no lockfile means non-reproducible builds; no Dockerfile; no ly or .gitignore evidence beyond the root structure.

The Bottom Line

This is a functional agent framework that works out of the box for prototyping and single-user research workflows. Its strengths are a clear entry-point architecture, rich tooling (search, browsing, code execution, MCP), and documented env-based configuration. The operational gaps — no CI, no lockfile, outsized and deeply nested files, unhandled exceptions — make it unsuitable for team iteration or production deployment without investment. It is best suited for individual researchers or early-stage prototypes where the operator accepts manual dependency management and accepts the risk of broad exception handling. Teams needing reliable iteration should add CI, a lockfile, and refactor the two oversized files before scaling.