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, authentication, and micropayments for safe, accountable, pay-per-use collaboration across the Web of Agents.
  • 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 - Deploy agents as standard chat completion endpoints with support for OpenAI Responses/Realtime, ACP, A2A and other common AI communication protocols
  • 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 CLI Quickstart: webagents init, then webagents connect.

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 micropayments. 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.

Release files for webagents 0.3.6

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.6
File Size Uploaded
webagents-0.3.6.tar.gz 1.8 MB Details

Built distribution (wheel)

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

Total release size: 2.9 MB

Release files / webagents-0.3.6.tar.gz

Download URL webagents-0.3.6.tar.gz
Size 1.8 MB
Tags Source
SHA-256 checksum
How to use checksums
a74ff933f54c29c471bfe9e2376e0145a319eed1f1dbe9702ef64d6faad6649d
BLAKE2b-256 checksum
How to use checksums
915f81a78f1a7f8b5b5dde1bb5d5855fbf999c66d9a0f6bcecb5a860b2e0c6f5
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.6-py3-none-any.whl

Download URL webagents-0.3.6-py3-none-any.whl
Size 1.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
7a7d045c22b0ca4b5fccc57f4765adb0e5d5e5052b161febf94ad0cf23f34f19
BLAKE2b-256 checksum
How to use checksums
12e3c8a4c5679623f8ebf0e724befb1e318c91d47680e527900464c3005a3191
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

This release

0.3.6 This release

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