Glossary

Plain Python Agent

An AI agent built using standard Python libraries (requests, json, asyncio) with direct API calls to LLM providers and tools, without depending on agent frameworks like LangChain, CrewAI, or AutoGen.

Definition

An AI agent built using standard Python libraries (requests, json, asyncio) with direct API calls to LLM providers and tools, without depending on agent frameworks like LangChain, CrewAI, or AutoGen.

In Depth

The plain Python agent pattern emerged as a counter-movement to framework complexity in 2025-2026. As LangChain, CrewAI, and AutoGen grew in abstraction layers, developers building production agents increasingly chose to write direct Python code instead. Architecture: (1) LLM client -- direct HTTP calls to Anthropic or OpenAI APIs using the requests library or thin official SDKs. (2) Tool definitions -- Python functions that call external APIs and return structured results. (3) Dispatch loop -- a while loop that sends messages to the LLM, checks for tool calls in the response, executes them, and appends results. (4) State management -- a list of messages (conversation history) passed to each LLM call. The entire agent runtime is typically 50-150 lines of Python. Compare to LangChain agents which import 50+ packages and use multiple abstraction layers (chains, tools, agents, memory, callbacks). Advantages in production: (1) Debugging -- when a tool call fails, the stack trace shows your code, not framework internals. (2) Dependencies -- pip install requests anthropic (2 packages) vs pip install langchain langchain-community langchain-core (50+ transitive packages). (3) Performance -- no serialization overhead, no chain execution overhead. Direct API calls are 10-30ms faster per tool call. (4) Upgradability -- when Anthropic or OpenAI change their API, you update one function. Framework users wait for the framework to update. Tool integration example with Scavio: a Python function that takes a query string, calls api.scavio.dev/api/v1/search with requests.post, and returns the JSON response. Total code: 8 lines. No wrapper classes, no decorators, no schema generation.

Example Usage

Real-World Example

import requests import anthropic client = anthropic.Anthropic() def search(query: str, platform: str = "google") -> dict: return requests.post( "https://api.scavio.dev/api/v1/search", headers={"x-api-key": "YOUR_KEY"}, json={"query": query, "platform": platform}, ).json() tools = [{"name": "search", "description": "Search the web", "input_schema": {"type": "object", "properties": {"query": {"type": "string"}, "platform": {"type": "string"}}}}]

Platforms

Plain Python Agent is relevant across the following platforms, all accessible through Scavio's unified API:

  • Google
  • Amazon
  • YouTube
  • TikTok
  • Reddit

Related Terms

Frequently Asked Questions

An AI agent built using standard Python libraries (requests, json, asyncio) with direct API calls to LLM providers and tools, without depending on agent frameworks like LangChain, CrewAI, or AutoGen.

import requests import anthropic client = anthropic.Anthropic() def search(query: str, platform: str = "google") -> dict: return requests.post( "https://api.scavio.dev/api/v1/search", headers={"x-api-key": "YOUR_KEY"}, json={"query": query, "platform": platform}, ).json() tools = [{"name": "search", "description": "Search the web", "input_schema": {"type": "object", "properties": {"query": {"type": "string"}, "platform": {"type": "string"}}}}]

Plain Python Agent is relevant to Google, Amazon, YouTube, TikTok, Reddit. Scavio provides a unified API to access data from all of these platforms.

The plain Python agent pattern emerged as a counter-movement to framework complexity in 2025-2026. As LangChain, CrewAI, and AutoGen grew in abstraction layers, developers building production agents increasingly chose to write direct Python code instead. Architecture: (1) LLM client -- direct HTTP calls to Anthropic or OpenAI APIs using the requests library or thin official SDKs. (2) Tool definitions -- Python functions that call external APIs and return structured results. (3) Dispatch loop -- a while loop that sends messages to the LLM, checks for tool calls in the response, executes them, and appends results. (4) State management -- a list of messages (conversation history) passed to each LLM call. The entire agent runtime is typically 50-150 lines of Python. Compare to LangChain agents which import 50+ packages and use multiple abstraction layers (chains, tools, agents, memory, callbacks). Advantages in production: (1) Debugging -- when a tool call fails, the stack trace shows your code, not framework internals. (2) Dependencies -- pip install requests anthropic (2 packages) vs pip install langchain langchain-community langchain-core (50+ transitive packages). (3) Performance -- no serialization overhead, no chain execution overhead. Direct API calls are 10-30ms faster per tool call. (4) Upgradability -- when Anthropic or OpenAI change their API, you update one function. Framework users wait for the framework to update. Tool integration example with Scavio: a Python function that takes a query string, calls api.scavio.dev/api/v1/search with requests.post, and returns the JSON response. Total code: 8 lines. No wrapper classes, no decorators, no schema generation.

Plain Python Agent

Start using Scavio to work with plain python agent across Google, Amazon, YouTube, Walmart, and Reddit.