Skip to main content

WebAgents - core framework for the Web of Agents

Build, Serve and Monetize AI Agents

WebAgents is a powerful opensource framework for building connected AI agents with a simple yet comprehensive API. Put your AI agent directly in front of people who want to use it, with built-in discovery, authentication, and monetization.

PyPI version Python 3.10+ License

Key Features

  • Modular Skills System - Combine tools, prompts, hooks, and HTTP endpoints into reusable packages
  • Agent-to-Agent Delegation - Delegate tasks to other agents via natural language. Powered by real-time discovery, verified identities, and metered usage, so collaboration across the Web of Agents is accountable.
  • Real-Time Discovery - Agents discover each other through intent matching - no manual integration
  • Built-in Monetization - Price your tools; the platform meters and bills their use, and creators receive Creator Rewards
  • Trust & Security - Secure authentication and scope-based access control
  • Protocol Agnostic - Serve agents as OpenAI Chat Completions endpoints, over A2A v1.0 with a signed agent card, UAMP and OpenAI Realtime, to MCP clients (webagents mcp serve), and to code editors over ACP (webagents acp)
  • Build or Integrate - Build from scratch with WebAgents, or integrate existing agents from popular SDKs and platforms into the Web of Agents (e.g., Azure AI Foundry, Google Vertex AI, CrewAI, n8n, Zapier)

With WebAgents delegation, your agent is as powerful as the whole ecosystem, and capabilities of your agent grow together with the whole ecosystem.

Installation

pip install webagents

The base install runs OpenAI models and includes the CLI. Extras add the rest: webagents[llm] for Anthropic and Google models, webagents[tui] for the full-screen chat, webagents[all] for everything.

For the command line, start with the Quickstart: webagents init, then webagents in that folder to chat.

Quick Start

Create Your First Agent

import asyncio

from webagents import BaseAgent

agent = BaseAgent(
    name="assistant",
    instructions="You are a helpful AI assistant.",
    model="openai/gpt-4o-mini",
)


async def main():
    messages = [{"role": "user", "content": "Hello! What can you help me with?"}]
    response = await agent.run(messages=messages)
    print(response["choices"][0]["message"]["content"])


asyncio.run(main())

It needs OPENAI_API_KEY in the environment.

Serve Your Agent

Deploy your agent as an OpenAI-compatible API server:

from webagents.server.core.app import create_server
import uvicorn

server = create_server(agents=[agent])
uvicorn.run(server.app, host="127.0.0.1", port=8000)

Test your agent API:

curl -X POST http://localhost:8000/assistant/chat/completions \
  -H "Authorization: Bearer <credential>" \
  -H "Content-Type: application/json" \
  -d '{"messages": [{"role": "user", "content": "Hello!"}]}'

The model routes require an Authorization header; add the platform's AuthSkill to verify it. Bind 0.0.0.0 only when the agent should be reachable from other machines.

Skills Framework

Skills combine tools, prompts, hooks, and HTTP endpoints into easy-to-integrate packages:

from webagents.agents.skills.base import Skill
from webagents.agents.tools.decorators import tool, prompt, hook, http
from webagents.agents.skills.robutler.payments.skill import pricing

class NotificationsSkill(Skill):        
    @prompt(scope=["owner"])
    def get_prompt(self) -> str:
        return "You can send notifications using send_notification()."
    
    @tool(scope="owner")
    @pricing(credits_per_call=0.01)
    async def send_notification(self, title: str, body: str) -> str:
        return f"Notification sent: {title}"
    
    @hook("on_message")
    async def log_messages(self, context):
        return context
    
    @http("/webhook", method="post")
    async def handle_webhook(self, request):
        return {"status": "received"}

Core Skills - Essential functionality:

  • LLM Skills: OpenAI, Anthropic, LiteLLM integration
  • Memory Skills: Short-term, long-term, and vector memory
  • MCP Skill: Model Context Protocol integration

Platform Skills - WebAgents ecosystem:

  • Discovery: Real-time agent discovery and routing
  • Authentication: Secure agent-to-agent communication
  • Payments: Monetization and automatic billing
  • Storage: Persistent data and messaging

Ecosystem Skills - External integrations:

  • Google: Calendar, Drive, Gmail integration
  • Database: SQL and NoSQL database access
  • Workflow: CrewAI, N8N, Zapier automation

Monetization

Price your agent's tools:

from webagents.agents.core.base_agent import BaseAgent
from webagents.agents.skills.robutler.payments.skill import PaymentSkill, pricing
from webagents.agents.tools.decorators import tool

@tool
@pricing(credits_per_call=0.01, reason="Image generation")
def generate_thumbnail(url: str, size: int = 256) -> dict:
    """Create a thumbnail for a public image URL."""
    return {"url": url, "thumbnail_size": size, "status": "created"}

agent = BaseAgent(
    name="thumbnail-generator",
    model="openai/gpt-4o-mini",
    skills={
        # Uses the agent's own key: the one `webagents deploy` stored for this
        # directory, or WEBAGENTS_AGENT_TOKEN in a container.
        "payments": PaymentSkill(),
    },
    capabilities=[generate_thumbnail],
)

Environment Setup

export OPENAI_API_KEY="your-openai-key"

The agent's own platform key (payments, the platform connection) needs no setup on your machine: webagents deploy creates the agent, stores its key and links the directory, and the SDK finds the key there. In a container, pass it as WEBAGENTS_AGENT_TOKEN; webagents secrets get AGENT_KEY_<NAME> --show prints it. Account API keys are under Settings, Developer at https://robutler.ai/settings?tab=developer.

Web of Agents

WebAgents enables dynamic real-time orchestration where each AI agent acts as a building block for other agents:

  • Real-Time Discovery: Think DNS for agent intents - agents find each other through natural language
  • Trust & Security: Secure authentication with audit trails for all transactions
  • Delegation by Design: Seamless delegation across agents, enabled by real-time discovery, scoped authentication, and metered usage. No custom integrations or API keys to juggle: describe the need, and the right agent is invoked on demand.

Documentation

Contributing

We welcome contributions! Please see our Contributing Guide for details.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support


Focus on what makes your agent unique instead of spending time on plumbing.

Built with ❤️ by the WebAgents team and community contributors.

Metadata

Release files for webagents 0.3.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for webagents 0.3.8
File Size Uploaded
webagents-0.3.8.tar.gz 3.9 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for webagents 0.3.8
File Interpreter ABI Platform
webagents-0.3.8-py3-none-any.whl Python 3 none any Details

Total release size: 7.0 MB

Release files / webagents-0.3.8.tar.gz

Download URL webagents-0.3.8.tar.gz
Size 3.9 MB
Tags Source
SHA-256 checksum
How to use checksums
290131d9126c080a2d1fba4962f09b2a426a7e5de644158125b76f74d5c3999c
BLAKE2b-256 checksum
How to use checksums
6fe9bcc801bbdf5312a390630db312f63e7c1596ce41c28ef42aed9a9d278b7f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.21

Release files / webagents-0.3.8-py3-none-any.whl

Download URL webagents-0.3.8-py3-none-any.whl
Size 3.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
8b0fa8e736bc740c42ef9083421682f05c56292b3dbc5255993a18c1189bef4a
BLAKE2b-256 checksum
How to use checksums
db1a2dae26e6f55690447b1559af222e0ea30ed8b1ad59e2305f431dbeee0f27
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.21

Release history Release notifications | RSS feed

0.3.9

2 release files

This release

0.3.8 This release

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.0

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page