OpenClaw Advanced Features
Push OpenClaw beyond the basics: orchestrate multi-agent pipelines, add persistent memory, build custom tools and plugins, integrate RAG, and fine-tune models for your domain.
When to Reach for Advanced Features
Start with the basics: a single agent with a few built-in tools handles the majority of automation tasks. Reach for advanced features when your use case demands more — when a task is too large for one context window, when you need the agent to remember facts across sessions, when latency demands parallel execution, or when you want to build a product on top of OpenClaw's extension APIs.
Advanced Feature Overview
| Feature | Use Case | Complexity | Key Module |
|---|---|---|---|
| Multi-Agent | Parallel subtasks, specialist delegation, long pipelines | Medium | openclaw.multi |
| Memory Systems | Cross-session recall, personalization, knowledge accumulation | Medium | openclaw.memory |
| Custom Tools | First-party API integration, proprietary data sources | Low | @tool decorator |
| Plugin Dev | Distributable extensions with lifecycle hooks | Medium | openclaw.plugin |
| RAG Integration | Grounding agents in private or large knowledge bases | Medium | openclaw.rag |
| Event-Driven | Trigger agents from webhooks, cron, file changes | Low | openclaw.events |
| Tool Chaining | Deterministic sequential pipelines with branching | Medium | openclaw.chain |
| Fine-Tuning | Domain-specific accuracy, reduced prompt verbosity | High | Fine-tune API |
Multi-Agent Quick Example
from openclaw.multi import Coordinator, Worker
researcher = Worker(role="researcher", tools=["web_search"])
writer = Worker(role="writer", tools=["read_file", "write_file"])
pipeline = Coordinator(
workers=[researcher, writer],
strategy="sequential" # or "parallel"
)
result = pipeline.run("Research AI regulation trends and draft a summary")
print(result.output)Sections
Multi-Agent Orchestration
Coordinator/worker patterns, agent-to-agent communication, shared memory.
Read →Memory Systems
Short-term, long-term, episodic, and semantic memory with vector store backends.
Read →Custom Tool Creation
@tool decorator, async tools, input validation, error handling, and tool registry.
Read →Plugin Development
Plugin API, hook system, packaging, distribution, and official plugin registry.
Read →Event-Driven Agents
Webhooks, scheduled triggers, file watchers, and reactive agent patterns.
Read →Tool Chaining
Sequential tool pipelines, conditional branching, and complex workflow graphs.
Read →RAG Integration
Connect vector databases (Chroma, Pinecone, Weaviate) for knowledge retrieval.
Read →Fine-Tuning
Prepare datasets, run fine-tuning jobs, evaluate, and deploy custom models.
Read →Memory Systems Quick Start
Add persistent memory to let agents remember facts, completed tasks, and user preferences across separate sessions. The memory config block is the entry point:
# openclaw.yaml
memory:
backend: redis # none | redis | sqlite | chroma | pinecone
url: redis://localhost:6379/0
ttl: 86400 # seconds to keep short-term memories (0 = forever)
max_short_term: 20 # rolling window of recent messages
semantic_search: true # enable similarity search over long-term memoryThen access memory programmatically:
agent = openclaw.Agent(provider="openai", model="gpt-4o-mini")
# Store a fact
agent.memory.store("user_name", "Alice")
agent.memory.store("project", "Project Phoenix")
# Later, in another session
name = agent.memory.recall("user_name")
print(f"Welcome back, {name}") # Welcome back, Alice
# Semantic search across all stored memories
results = agent.memory.search("What projects is the user working on?", top_k=3)RAG Integration Quick Start
Connect a private knowledge base (company docs, codebase, support tickets) to your agent using built-in RAG support. OpenClaw handles chunking, embedding, and retrieval automatically:
from openclaw.rag import RAGStore
import openclaw
# Step 1: Index your documents once
store = RAGStore(backend="chroma", collection="company-docs")
store.index_directory("/path/to/docs", file_types=[".pdf", ".md", ".txt"])
# Step 2: Attach the store to an agent
agent = openclaw.Agent(
provider="openai",
model="gpt-4o",
rag_store=store,
rag_top_k=5, # inject top 5 relevant chunks into context
)
# Step 3: The agent automatically retrieves relevant context
result = agent.run("What is the refund policy for enterprise subscriptions?")
print(result.output) # Grounded answer from your documentsParallel Multi-Agent Execution
When a task can be broken into independent subtasks, use strategy="parallel" in the Coordinator to run multiple agents simultaneously and merge results:
from openclaw.multi import Coordinator, Worker
# These three workers run simultaneously
trend_researcher = Worker(role="trend_researcher", tools=["web_search"])
competitor_analyst = Worker(role="competitor_analyst", tools=["web_search", "fetch_url"])
data_aggregator = Worker(role="data_aggregator", tools=["sql_query"])
pipeline = Coordinator(
workers=[trend_researcher, competitor_analyst, data_aggregator],
strategy="parallel",
merge_strategy="llm_synthesis", # final agent synthesises all outputs
)
result = pipeline.run("Produce a competitive intelligence report for Q2 2026")
print(result.output)Event-Driven Trigger Reference
OpenClaw agents can be triggered by external events without a persistent HTTP server:
| Trigger Type | Config Key | Example Use Case |
|---|---|---|
| Cron schedule | triggers.cron | Daily report at 08:00 UTC |
| Webhook (HTTP POST) | triggers.webhook | Run agent when GitHub PR is opened |
| File watcher | triggers.file_watch | Process new CSV dropped in S3 bucket |
| Queue message | triggers.queue | Consume tasks from RabbitMQ or SQS |
| Database poll | triggers.db_poll | Process new rows inserted into a table |