CLI
CLI Quickstart
Get started with the WebAgents CLI in 5 minutes.
Installation
Install webagents with pip:
pip install webagentsYour First Agent
1. Create an Agent
Create a new agent in your current directory:
webagents initThis creates AGENT.md with a basic configuration:
---
name: assistant
description: A helpful AI assistant
namespace: local
model: openai/gpt-4o-mini
intents:
- answer questions
- help with tasks
---
# Assistant Agent
You are a helpful AI assistant.2. Start a Session
Launch the interactive REPL:
webagents connectOr just run webagents with no arguments:
webagentsYou'll see the welcome screen:
█ █ █▀▀ █▀▄ █▀█ █▀▀ █▀▀ █▄ █ ▀█▀ █▀
█ █ █ █▀ █▀▄ █▀█ █ █ █▀ █ ▀█ █ ▀█
▀ ▀ ▀ ▀▀▀ ▀▀ ▀ ▀ ▀▀▀ ▀▀▀ ▀ ▀ ▀ ▀▀
Tips for getting started:
1. Ask questions, edit files, or run commands.
2. Be specific for the best results.
3. /help for more information.
❯ 3. Chat with Your Agent
Type your message and press Enter:
❯ What can you help me with?
I can help you with:
- Answering questions on various topics
- Helping with writing and editing
- Providing explanations and summaries
- Assisting with problem-solving4. Use Slash Commands
Type /help to see available commands:
| Command | Description |
|---|---|
/help | Show available commands |
/exit | Exit the session |
/clear | Clear the screen |
/save | Save session checkpoint |
/load | Load session checkpoint |
/agent | Show or switch agent |
/discover | Discover other agents |
Using Templates
Create agents from templates:
# List available templates
webagents template list
# Create a planning agent
webagents init --template planning
# Create a named agent from template
webagents init writer --template contentMultiple Agents
Create multiple agents in a directory:
# Create default agent
webagents init
# Create named agents
webagents init planner
webagents init writer
webagents init researcher
# List all agents
webagents list
# Connect to specific agent
webagents connect plannerContext with AGENTS.md
Create shared context for all agents in a directory:
webagents init --contextThis creates AGENTS.md:
---
namespace: local
---
# Project Context
This file provides context for all agents in this directory.
All AGENT*.md files in this folder inherit from this context.Running Headless
Execute an agent without interactive mode:
# Single prompt
webagents run -p "Summarize this README"
# Run specific agent
webagents run planner -p "Create a weekly plan"Next Steps
- Commands Reference - Full command documentation
- REPL Guide - Interactive session features