# Add your AI key
Source: https://docs.opencompany.sh/add-api-keys
Connect one AI provider - or run models locally for free with Ollama or LM Studio
This takes about 2 minutes. You need OpenCompany running in your browser — finish [Installation](/installation) first.
## Why you need one key
Every AI feature in OpenCompany — agents, chat models, skills — runs on a large language model. One API key (a password-like code that lets OpenCompany use your AI account) unlocks all of them.
OpenCompany supports 12 providers (11 dedicated model nodes, plus xAI through the OpenAI-compatible path). Pick whichever provider you already have an account with.
No provider account? Skip to [Free option: local models](#free-option-local-models) and run models on your own machine at no cost.
## Add a key
Go to [http://localhost:5678](http://localhost:5678) in your browser.
The workflow canvas loads.
Click the key icon in the top toolbar — its tooltip reads **API Credentials**.
The **API Credentials** modal opens with a provider list down the left side.
Under the **AI Providers** header in the left sidebar, click your provider — for example **OpenAI** or **Anthropic**.
The provider's key form appears on the right.
Can't see your provider? Type its name into the **Search providers...** box above the sidebar.
Paste your API key into the key field.
The key appears masked, and the **Validate** button becomes active.
Click **Validate**.
The button changes to **Valid**, and a green **Connected** badge appears on the provider card.
You see the green **Connected** badge. Every AI node in OpenCompany can now use this provider.
## Where to get a key
Each provider issues keys from its own dashboard. Create an account, generate a key, and copy it before it disappears.
Create a key at [platform.openai.com/api-keys](https://platform.openai.com/api-keys). Click **Create new secret key** and copy the result immediately.
Sign in at [console.anthropic.com](https://console.anthropic.com). Open the API Keys section and generate a new key.
Get a Google Gemini key at [aistudio.google.com/apikey](https://aistudio.google.com/apikey). A Google account is all you need.
Create a key at [console.groq.com/keys](https://console.groq.com/keys). Groq offers a generous free tier for fast open-source models.
Generate a key at [openrouter.ai/keys](https://openrouter.ai/keys). One OpenRouter key routes to hundreds of models from many labs.
Sign up at [cloud.cerebras.ai](https://cloud.cerebras.ai) and create a key from the dashboard.
Create a key at [platform.deepseek.com](https://platform.deepseek.com) under the API keys section.
Generate a Moonshot AI key at [platform.moonshot.ai](https://platform.moonshot.ai) for Kimi models.
Create a key at [console.mistral.ai](https://console.mistral.ai) under API Keys.
Cloud providers bill per token used. Most new accounts include free credit, but set a spending limit in the provider's dashboard before heavy use.
## Free option: local models
Ollama and LM Studio run models on your own hardware. No key, no cost, and your prompts never leave your machine.
Install [Ollama](https://ollama.com) or [LM Studio](https://lmstudio.ai), then download a model inside the app.
The app starts a local server on your machine.
In the **API Credentials** modal, pick **Ollama** or **LM Studio** and enter the base URL — for example `http://localhost:11434/v1`.
The **Fetch** button becomes active.
Click **Fetch**.
OpenCompany detects your loaded models, and the green **Connected** badge appears.
## Your keys stay on your computer
OpenCompany encrypts every key with Fernet (strong symmetric encryption) and stores it in a local database on your machine. Keys never leave your computer and are never sent to OpenCompany servers.
## Next step
Say hello to your AI assistant and watch your first workflow run.
# Architecture
Source: https://docs.opencompany.sh/architecture
Deep dive into OpenCompany system architecture, execution engine, AI agents, and cache/security layers (plugin-first, WebSocket-first, Temporal execution)
# Architecture
A detailed look at how OpenCompany works under the hood. For contributors, system designers, and the curious. You do not need this page to use OpenCompany. For a navigable tour with hyperlinks, see the [DeepWiki page](https://deepwiki.com/zeenie-ai/OpenCompany).
## System Overview
OpenCompany is three loosely-coupled tiers talking over a single persistent WebSocket connection:
```
+------------------------------------------------------------------------+
| Frontend tier (client/) |
| React 19 + TypeScript + Vite + React Flow + Zustand |
| Tailwind v4 + shadcn/ui + Radix + TanStack Query |
| Themed canvas, parameter panel, credentials modal |
+------------------------------------------------------------------------+
|
WebSocket | /ws/status (single long-lived connection)
v
+------------------------------------------------------------------------+
| Backend tier (server/) |
| FastAPI + WebSocket handlers + dependency injection container |
| Plugin-first nodes (BaseNode folders) -> backend NodeSpec is SSOT |
| WorkflowService (facade) -> NodeExecutor -> per-node execute() |
| ParameterResolver -> template {{node.field}} substitution |
| AuthService -> encrypted credentials (Fernet + PBKDF2) |
+------------------------------------------------------------------------+
|
v
+------------------------------------------------------------------------+
| Execution tier |
| Temporal workers (distributed) or local asyncio decide loop |
| Redis (cache, locks, streams) SQLite (workflow.db, credentials.db)|
| Node.js executor (JS/TS, :5682, on demand) WhatsApp RPC (:5683, |
| optional, on demand) |
| Android relay WebSocket Temporal server (gRPC :5681, UI :5680) |
+------------------------------------------------------------------------+
|
v
External services: OpenAI, Anthropic, Gemini, OpenRouter, xAI, DeepSeek,
Kimi, Mistral, Groq, Cerebras, plus local Ollama / LM Studio servers,
Google Workspace, WhatsApp, Telegram, Twitter/X, Brave, Serper,
Perplexity, Apify, Stripe, residential proxies, webhooks.
```
AI, agents, social, Android, documents, Google Workspace, code, browser, proxies, utilities
OpenAI, Anthropic, Gemini, OpenRouter, xAI, DeepSeek, Kimi, Mistral, Groq, Cerebras, plus local Ollama and LM Studio
Android, Coding, Web, Task, Social, Travel, Tool, Productivity, Payments, Consumer, Autonomous, Orchestrator, AI Employee, RLM, Claude Code, Codex
A single persistent connection carries all frontend-backend RPC and push updates
Dozens of skills across many categories, DB-backed with SKILL.md defaults
Temporal distributed, Redis parallel, sequential fallback
## Execution Engine
### Conductor's Decide Pattern
Workflow orchestration is a single function with fork/join parallelism:
```
_workflow_decide(ctx):
1. Find ready nodes (all dependencies satisfied)
2. asyncio.gather() the ready layer -> run in parallel
3. Checkpoint state to Redis/SQLite
4. Recurse until every node terminal (completed / skipped / failed)
```
Each workflow run has its own isolated `ExecutionContext`. No shared global state between concurrent runs. Decide loops serialize per execution via Redis `SETNX` distributed locks.
### Three Execution Modes
```
workflow.execute(workflow_id, workflow_data)
|
v
TEMPORAL_ENABLED and server reachable?
|
yes -> _execute_temporal() -- per-node activities,
retries, horizontal scaling
(primary production mode)
no -> Redis available?
|
yes -> _execute_parallel() -- decide loop + Kahn layers
+ Prefect-style input hash cache
+ DLQ + heartbeat recovery
no -> _execute_sequential() -- topological walk
(fallback for minimal env)
```
### Layer Computation via Kahn's Algorithm
Before execution, the DAG is sorted into layers. Layer 0 is the set of nodes with no dependencies; each subsequent layer depends only on earlier layers. Parallel execution runs each layer with `asyncio.gather()`:
```
Layer 0: [start, cronScheduler]
Layer 1: [httpRequest, whatsappReceive]
Layer 2: [aiAgent]
Layer 3: [whatsappSend, console]
```
Toolkit sub-nodes (e.g., Android service nodes connected to `androidTool`) are detected and excluded from execution layers -- they run only when the parent toolkit invokes them via tool calling.
### Result Caching, Recovery, and DLQ
* **Prefect-style caching**: every node result is stored in Redis/SQLite keyed by `hash_inputs(inputs)`. Re-running an identical node returns the cached result with status `TaskStatus.CACHED`.
* **Heartbeat recovery**: `RecoverySweeper` scans `executions:active` every 60s; nodes with stale heartbeats (> 5 min) are marked stuck and recovered on next startup.
* **Dead Letter Queue**: failed nodes (after retry exhaustion) are quarantined with full input snapshot. Inspect, replay, or purge via the `get_dlq_*` / `replay_dlq_entry` / `purge_dlq` WebSocket handlers.
### Edge Conditions
Edges carry optional conditions for runtime branching with 20+ operators (`eq`, `neq`, `gt`, `lt`, `contains`, `exists`, `matches`, `in`, ...). Unmatched branches are marked `TaskStatus.SKIPPED`.
## Event-Driven Deployment
Deployments are event-driven: each trigger event spawns an **independent concurrent execution run**. There is no iteration loop.
```
deploy_workflow(workflow_id)
|
v
Set up triggers, return
|
+-> cronScheduler fires -> ExecutionRun 1 (isolated context)
+-> cronScheduler fires -> ExecutionRun 2 (isolated context)
+-> whatsappReceive fires -> ExecutionRun 3 (isolated context)
+-> webhookTrigger fires -> ExecutionRun 4 (isolated context)
+-> telegramReceive fires -> ExecutionRun 5 (isolated context)
+-> taskTrigger fires -> ExecutionRun 6 (from delegated agent)
```
Multiple runs execute simultaneously with no interference. The firing trigger is marked complete before downstream execution starts; every other trigger node in the same run is auto-marked `_pre_executed` with `{not_triggered: True}` so they never block as event waiters.
### Push vs Polling Triggers
```
Push triggers (fire on an inbound event):
whatsappReceive, webhookTrigger, chatTrigger, taskTrigger,
telegramReceive, emailReceive
Polling triggers (poll an API on an interval):
googleGmailReceive (Gmail push requires paid Google Cloud setup)
twitterReceive (X API has no webhook on the free tier)
Scheduler:
cronScheduler (cron-expression schedule)
```
Under the default Temporal execution path, each deployed trigger runs as a listener workflow that spawns an isolated child run per event. On the legacy local path, push triggers register a waiter with a filter closure and suspend until an external service dispatches a matching event (in-memory `asyncio.Future`, or Redis Streams for multi-worker deployments).
## AI Agent System
### 12 LLM Providers
Each provider below has its own chat-model node and appears in every agent's provider dropdown. (xAI is the exception: it is reachable on the native chat path through the shared OpenAI-compatible client, but it is not a standalone chat-model node.)
| Provider | Native SDK Path | LangChain Path | Notes |
| ---------- | --------------------------- | --------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| OpenAI | Yes | Yes | GPT-5.5/5.4/5.2, GPT-4.1 family, o3/o4-mini reasoning, GPT-4o/4o-mini |
| Anthropic | Yes | Yes | Claude Fable 5, Opus 4.8/4.7, Sonnet 4.6, Haiku 4.5 (extended thinking via `budget_tokens`) |
| Gemini | Yes | Yes (fallback) | Gemini 3.5-flash, 3.1-pro/flash-lite, 3-flash, 2.5-pro/flash/flash-lite; native path bypasses a LangChain Windows hang |
| OpenRouter | Yes | Yes | 200+ models through one API |
| xAI | Yes (shared OpenAIProvider) | No (native chat only) | Grok models; no standalone chat-model node |
| DeepSeek | Yes (shared OpenAIProvider) | Yes | deepseek-v4-flash, deepseek-v4-pro (chat/reasoner legacy) |
| Kimi | Yes (shared OpenAIProvider) | Yes | Moonshot kimi-k2.6, kimi-k2.5, kimi-k2.7-code |
| Mistral | Yes (shared OpenAIProvider) | Yes | Large / Medium / Small / Codestral (latest) |
| Groq | No (LangChain only) | Yes | Llama 3.3-70b, Llama 3.1-8b, GPT-OSS-120b/20b, Qwen3-32b |
| Cerebras | No (LangChain only) | Yes | GPT-OSS-120b, Qwen-3-235b, GLM-4.7 |
| Ollama | Yes (shared OpenAIProvider) | Yes | Local server; whatever models the user has pulled |
| LM Studio | Yes (shared OpenAIProvider) | Yes | Local server; whatever models the user has loaded |
### Dual-Path Architecture
```
execute_chat(parameters) execute_agent(parameters)
direct chat completions tool-calling agent loop
| |
v v
is_native_provider(provider)? create_model(provider, ...)
| |
yes -+-- create_provider() -> LLMResponse v
| LangChain ChatOpenAI /
no -+-- create_model() -> chat_model ChatAnthropic /
.invoke() -> LLMResponse ChatGoogleGenerativeAI
|
v
bind_tools(...)
|
v
_run_agent_loop
(LLM step <-> tool exec loop)
```
The native path returns a normalized `LLMResponse` dataclass across all providers. Agent tool-calling still uses the LangChain chat-model wrappers (`bind_tools`) driven by the plain-async `_run_agent_loop`; the native SDK path powers direct chat completions and model discovery. Groq and Cerebras remain LangChain-only for chat as well.
### 16 Specialized Agents
All specialized agents share the same handle architecture (`input-main`, `input-memory`, `input-skill`, `input-tools`, `input-task`) and dispatch through the same `BaseNode.execute()` plugin path. They mostly differ in icon, title, theme color, and default prompt.
```
android_agent coding_agent web_agent task_agent
social_agent travel_agent tool_agent productivity_agent
payments_agent consumer_agent autonomous_agent orchestrator_agent
ai_employee rlm_agent claude_code_agent codex_agent
```
Routing:
* Most agents run the shared plain-async agent loop (`_run_agent_loop`) for tool calling and delegation.
* **`rlm_agent`** routes to `RLMService` (REPL-based recursive LM with `llm_query` / `rlm_query` / `FINAL`).
* **`claude_code_agent`** and **`codex_agent`** run through the multi-provider CLI agent framework (Claude Code / Codex CLIs) instead of the standard LLM loop.
### Agent Teams Topology
`orchestrator_agent` and `ai_employee` have an extra `input-teammates` handle. Connected agents become `delegate_to_` tools automatically:
```
+-------------------------+
| AI Employee |
| (orchestrator_agent) |
+-----+------+------+-----+
| | | input-teammates
+-------------+ | +------------+
| | |
+------v------+ +-------v-----+ +-------v-----+
| coding_agent| | web_agent | | task_agent |
+-------------+ +-------------+ +-------------+
delegate_ delegate_ delegate_
to_coding_ to_web_ to_task_
agent tool agent tool agent tool
```
The team lead's LLM decides when to delegate based on task context. Under the default Temporal execution path, delegation spawns the teammate as a child workflow whose progress mirrors onto the parent's canvas badge and whose result flows back into the parent's loop. On the legacy local path, delegation is fire-and-forget: the child spawns as `asyncio.create_task()`, the parent continues, and the child broadcasts its own status independently. Either way, child completion can be consumed by `taskTrigger` nodes elsewhere in the workflow.
### Agent Loop Flow
```
+---------+
START ---> | agent |
| (LLM) |
+----+----+
|
any tool_calls?
/ \
tools / \ end
v v
+---------+ END
| tools |
| (exec) |
+----+----+
|
+---------> loop back to agent
```
The loop routes purely on the model's `tool_calls`. A recursion limit guards against infinite tool loops, and a token-based compaction threshold summarizes the transcript before it overflows the model's context. Tools are built as Pydantic-schema `StructuredTool` instances with the node's parameter schema.
## Memory, Skills, Tokens, and Cost
### Markdown-Based Memory
The `simpleMemory` node stores conversation history as editable Markdown in the parameter panel. The AI Agent handler reads, parses to LangChain messages, executes, appends the new exchange, trims to a window, and archives removed messages to an `InMemoryVectorStore` (optional) using HuggingFace `BAAI/bge-small-en-v1.5` embeddings.
```
AI Agent reads memoryContent (Markdown)
|
v
_parse_memory_markdown() -> LangChain Messages
|
v
(optional) vector store similarity_search(prompt, k=retrievalCount)
|
v
Execute LLM with full history + retrieved context
|
v
Append human + ai messages to Markdown
|
v
_trim_markdown_window(windowSize) -> (kept, removed)
|
v
If longTermEnabled: store.add_texts(removed)
|
v
Save updated Markdown back to node parameters
```
### Skill System
Dozens of built-in skills organized into folders under `server/skills/`. Each top-level folder appears as an option in the Master Skill node's folder dropdown:
```
assistant/ android_agent/ autonomous/
coding_agent/ productivity_agent/ rlm_agent/
social_agent/ task_agent/ travel_agent/
web_agent/ terminal/ payments_agent/
```
Each skill is a folder with a `SKILL.md` file containing YAML frontmatter (name, description, allowed-tools, metadata) and Markdown instructions. First load seeds the database; after that the database is source of truth so users can edit skill instructions in the UI. "Reset to Default" reloads the original `SKILL.md`.
The `masterSkill` node aggregates multiple skills with enable/disable toggles. A split-panel editor shows the skill list on the left and the selected skill's Markdown on the right. When connected to an agent, the backend expands the `skillsConfig` parameter into individual skill entries injected into the agent's system message.
### Token Tracking and Compaction
Every AI execution stores a `TokenUsageMetric` row with input/output/cache/reasoning token counts and calculated costs (USD) based on `server/config/pricing.json`. Cumulative state per session lives in `SessionTokenState`.
Compaction threshold priority (highest to lowest):
1. Per-session `custom_threshold` (user-set)
2. Per-user `UserSettings.compaction_ratio` x the model's context window
3. Environment `COMPACTION_RATIO` (default **0.8**) x the model's context window (e.g., \~838K for Claude Sonnet 4.6 with 1M context)
4. JSON fallback `llm_defaults.json` ratio x context window
When the cumulative session tokens cross the threshold, `CompactionService.compact_context()` generates a 5-section summary (Task Overview, Current State, Important Discoveries, Next Steps, Context to Preserve) following the Claude Code pattern and replaces the memory content. Anthropic and OpenAI also have native compaction APIs (`context_management` edits, `compact_threshold`) that are configured transparently.
## Communication Layer
A single persistent WebSocket at `/ws/status` handles most frontend-backend communication. Handlers live in the `MESSAGE_HANDLERS` map in `server/routers/websocket.py` plus plugin-registered handlers that self-wire through `services.ws_handler_registry` (each self-contained plugin folder can own its own WebSocket commands). Together they cover: node parameters, tool schemas, node execution, triggers, dead letter queue, deployment, AI operations, API keys, OAuth flows (Claude, Twitter, Google), Android, WhatsApp, Telegram, workflow storage, chat messages, console logs, skills, memory, user settings, pricing, agent teams, and model registry.
### Request/Response Pattern
```
Frontend Backend
| |
|-- {type: "execute_node", data: ...}-->|
| |-- dispatch to handle_execute_node()
| |-- run node handler
| |
|<-- {type: "node_status", ... }---------| (broadcast)
|<-- {type: "node_output", ... }---------| (broadcast)
|<-- {type: "execute_node_response", ...}| (direct reply, request_id matched)
```
### Broadcast Message Types
```
node_status workflow_status api_key_status
node_output android_status token_usage_update
variable_update compaction_starting node_parameters_updated
variables_update compaction_completed
```
### Auto-Reconnect and Keepalive
Frontend sends `{"type": "ping"}` every 30 seconds. Reconnection uses PartySocket with jittered exponential backoff and message replay, so a dropped socket recovers automatically and queued requests replay on the new connection. Connection is gated on `isAuthenticated` so logged-out users never connect.
## Cache, Persistence, and Security
### Cache Fallback Hierarchy
OpenCompany follows the n8n cache pattern with automatic environment-based fallback:
```
Production: Redis -> SQLite (cache_entries) -> in-memory dict
Local dev: SQLite (cache_entries) -> in-memory dict
(Redis disabled via REDIS_ENABLED=false)
```
`CacheService` in `server/core/cache.py` checks each backend in order. TTL expiration is supported across all three. A background `cleanup_expired_cache()` task removes expired SQLite rows.
### Encrypted Credentials
API keys and OAuth tokens live in a **separate SQLite database** (`credentials.db`) isolated from the main workflow database (`workflow.db`). Encryption uses Fernet (AES-128-CBC + HMAC-SHA256) with keys derived from a server-scoped config key via PBKDF2HMAC (600K iterations, OWASP 2024 recommendation).
```
API_KEY_ENCRYPTION_KEY (.env) + salt (from credentials.db, 256 bits)
|
v
PBKDF2HMAC-SHA256
(600,000 iterations)
|
v
urlsafe_b64encode -> Fernet key
|
v
held in memory only
|
v
encrypt() / decrypt() inside EncryptionService
```
Two separate credential systems inside `credentials.db`:
* **API key system** (`EncryptedAPIKey` table): provider keys the user enters manually
* **OAuth token system** (`EncryptedOAuthToken` table): tokens from OAuth flows (Google, Twitter, Claude.ai)
All routers access credentials through `AuthService` only. Direct database access is forbidden. Decrypted values are cached in `AuthService` memory dicts and never written to disk or Redis.
For cloud deployments, `CREDENTIAL_BACKEND` can be switched to `keyring` (OS-native) or `aws` (Secrets Manager) via the `CredentialBackend` abstraction.
### Authentication
JWT in HttpOnly cookies following the n8n pattern. Two modes:
* `AUTH_MODE=single` - first user becomes owner, registration disabled after
* `AUTH_MODE=multi` - open registration for cloud deployments
* `VITE_AUTH_ENABLED=false` - bypass login entirely for local development
WebSocket connections check the JWT cookie before accepting. Auth context has exponential-backoff retry (5 attempts) to survive race conditions where the frontend starts before the backend is ready.
## Related
Browse all workflow nodes by category
12 LLM providers with native SDK and LangChain paths
16 specialized agents with teams and delegation
Source code and in-repo `docs-internal/` deep dives
# The canvas
Source: https://docs.opencompany.sh/canvas
The workflow editor: palette, modes, console, shortcuts, and the Command Palette
The canvas is where you build. This page names every part of the editor so the rest of the docs can say "press **Start**" and you know exactly where to look.
## The component palette
The palette on the left lists every node you can drag onto the canvas, grouped into sections. A search box at the top matches node names and descriptions.
### Normal mode vs Dev mode
The palette has two views, switched by the **Mode:** toggle in the top toolbar. **Normal** shows only the four AI sections. **Dev** shows everything — including **Utilities**, home of the Chat Trigger and Console nodes the [quickstart](/quickstart) uses. Dev mode changes nothing else; it just reveals more nodes.
| Section | Visible in |
| ---------------------------------------------------- | -------------- |
| AI Agents, AI Models, AI Skills, AI Tools | Normal and Dev |
| Utilities (Chat Trigger, Console, HTTP, webhooks...) | Dev |
| Workflows, Triggers, Schedulers | Dev |
| WhatsApp, Social, Chat, Email | Dev |
| Google Workspace, Search, Scrapers, Browser | Dev |
| Code, Filesystem, Documents, Text, Memory | Dev |
| Android, Location, Proxy, Services | Dev |
| Payments, Deployment, Version Control | Dev |
## Working with nodes
* **Add** a node by dragging it from the palette onto the canvas.
* **Connect** nodes by dragging from the small circle on one node's right edge to the circle on the next node's left edge. Agents have extra left-edge handles for memory and tools.
* **Configure** a node by clicking it. The parameter panel opens with three areas: **Input** (what flows in from connected nodes), **Parameters** (the node's settings), and **Output** (what it produced last run). The panel's own **Run** button executes just that node for testing.
* **Rename** a node with F2, or double-click its label. Clear names keep big workflows readable.
* **Copy** with Ctrl+C, **delete** with the Delete key, and right-click for the context menu with the same actions.
## Node states
| What you see | What it means |
| ------------------------- | ------------------------------------------------------------- |
| Plain node | Idle — not running |
| Gentle pulse on a trigger | Listening — the workflow is started and waiting for its event |
| Glow / highlight | Running right now |
| Green tint | Finished successfully |
| Red tint | Failed — click the node to read the error in its Output |
## The top toolbar
* **Start** (green) deploys the workflow: triggers begin listening and stay on until you press **Stop**.
* **Save** stores your changes; the pill next to it reads **Modified** or **Saved**.
* **Mode:** toggles the palette between **Normal** and **Dev**.
* The key icon opens **API Credentials** ([Credentials](/credentials)).
* **File** menu: **New Workflow**, **Open**, **Export**, **Import**, **Copy as JSON**.
* Click the workflow name to rename it.
## The Chat / Console panel
The collapsible bar at the bottom of the screen opens the panel:
* **Chat** (left) sends messages to Chat Trigger nodes. The input reads **Type a message...**; Enter or **Send** submits. With several Chat Triggers, a dropdown (default **All Triggers**) picks the target.
* **Console** tab (right) shows everything your Console nodes print — including AI replies in the quickstart pipeline. Empty state: "Add a Console node to see debug output."
* **Terminal** tab (right) streams the server's own logs, useful when something misbehaves.
## The Command Palette
Press **Ctrl+K** (Windows/Linux) or **Cmd+K** (macOS) to open the Command Palette — a searchable list of editor actions. Type to filter, Enter to run.
## Keyboard shortcuts
| Shortcut | Action |
| --------------- | --------------------------------------------- |
| Ctrl+K / Cmd+K | Open the Command Palette |
| F2 | Rename the selected node |
| Ctrl+C | Copy the selected node |
| Delete | Delete the selected node |
| Enter (in Chat) | Send the message (Shift+Enter for a new line) |
## Run vs Start, and testing one node
**Start** (toolbar) runs the whole workflow continuously — triggers listen until you press **Stop**. The **Run** button inside a node's parameter panel executes only that node once, with whatever input it currently has — handy for testing a single step without starting everything.
## Related
Put the canvas to work in ten minutes.
Every node, grouped the way the palette groups them.
# Choose how to run OpenCompany
Source: https://docs.opencompany.sh/choose-how-to-run
Run it on your computer, on a cloud server, or from source - pick the path that fits you
There are three ways to run OpenCompany yourself, all free. Most people should start with the first one. If you would rather not run it at all, the [Pro and Max plans](https://opencompany.sh/pricing/) are hosted by opencompany and priced on usage, never per seat.
## Option 1: On your computer (recommended)
Install it once, open your browser, and everything runs privately on your machine.
* **You need:** Node.js 22+ and Python 3.12+ (the install guide walks you through both)
* **Takes:** 2-10 minutes and about 1 GB of disk space
* **Costs:** nothing — and nothing leaves your computer
The step-by-step install guide, including one-command installers.
## Option 2: On a cloud server
Want your workflows running around the clock, even with your laptop closed? One command provisions a cloud server (a rented computer that never sleeps) with a login screen in front of it:
```bash theme={null}
company deploy up --provider gcp --owner-email you@example.com
```
You need a Google Cloud account and the `gcloud` command-line tool. The deploy prints your server's address and a one-time password when it finishes.
The full cloud deployment guide.
## Option 3: From source (for developers)
Clone the code, build it yourself, and hack on it with hot reload. This path needs a few extra developer tools.
The contributor setup in the install guide.
## Compare
| | On your computer | Cloud server | From source | Hosted (Pro / Max) |
| --------------- | ------------------ | ------------------- | ------------------ | ------------------------ |
| Cost | Free | Cloud provider fees | Free | Monthly, on usage |
| Difficulty | Easy | Moderate | Developer-level | None |
| Always on | Only while running | Yes | Only while running | Yes |
| Your data lives | On your machine | On your server | On your machine | In your hosted workspace |
| Login screen | None (private) | Yes (owner account) | None | Yes |
Whichever path you pick, you bring your own AI keys — or run free local models. See [Add your AI key](/add-api-keys).
# Credentials
Source: https://docs.opencompany.sh/credentials
How OpenCompany stores and connects accounts: API keys, OAuth sign-in, CLI logins, and device pairing
Every external account OpenCompany uses — AI providers, messaging apps, developer tools — connects in one place. Click the **key icon** in the toolbar (tooltip **API Credentials**) to open it.
Connect a service once and every node and agent on the canvas can use it. You never paste a key inside an individual node.
## The Credentials modal
The modal is titled **API Credentials**, with a badge showing how many providers are available. Type in **Search providers...** to filter the list.
The layout has two panels:
* **Left sidebar** — providers grouped into categories: **AI Providers**, **Social Media**, **Productivity**, **Email**, **Android**, **Search**, **Scrapers**, **Services**, **Payments**, **Deployment**, and **Developer Tools**.
* **Right panel** — the selected provider's connection form, status, and actions.
Each provider shows its live state: **Connected** or **Not Connected** for the account, and **Configured** or **Not configured** for saved secrets.
## Four ways services connect
Different services authenticate differently. The modal handles all four styles with the same look and feel.
### API keys
Most providers take a single key. Paste it and click **Validate**. OpenCompany checks the key against the provider, stores it encrypted, and the button flips to **Valid** with a green **Connected** badge.
For AI providers, validation also fetches the live model list, which fills the model dropdowns on your canvas nodes.
| Category | API-key providers |
| ------------ | ------------------------------------------------------------------------------ |
| AI Providers | OpenAI, Anthropic, Gemini, Groq, Cerebras, OpenRouter, DeepSeek, Kimi, Mistral |
| Search | Brave Search, Perplexity |
| Scrapers | Apify, Serper |
| Services | Google Maps |
Google Maps and Apify also use API keys but validate through their own dedicated checks, not the generic model probe. Serper keys save directly without an upstream check.
Local models are free and keyless. For **Ollama** or **LM Studio**, enter the server's **Base URL** and click **Fetch** — the panel shows **Connected** once the model list loads.
Two panels extend the key pattern with extra fields. **Email (IMAP/SMTP)** takes an address, password, and server settings for custom providers — see [Email](/nodes/email). **Telegram Bot** takes a token from @BotFather, then starts the bot connection — see the [Telegram tutorial](/tutorials/telegram-bot).
### OAuth sign-in
OAuth means signing in with your existing account instead of pasting a key. **Google Workspace** and **Twitter/X** use it:
1. Enter the **Client ID** and **Client Secret**, then click **Save Credentials**. Saved secrets display as **Configured** — the value is never shown again.
2. Click **Login with Google Workspace** (or **Login with Twitter/X**). Your browser opens the provider's consent screen.
3. Approve access. The panel flips to **Connected** and shows the signed-in account.
Access tokens refresh automatically in the background, so you sign in once. **Disconnect** revokes the tokens; **Refresh** forces a fresh status check.
Google Workspace requires your own OAuth app in the Google Cloud Console, with the Gmail, Calendar, Drive, Sheets, Tasks, and People APIs enabled. The [Google Workspace guide](/nodes/google-workspace) walks through creating it.
Twitter/X credentials come from the X Developer Portal. Create an app with OAuth 2.0 enabled. The **Client Secret** is optional — the flow uses PKCE.
### CLI logins
Some services authenticate through their own official command-line tool. Click **Login with ** and OpenCompany launches that tool's login for you. The CLI holds the credentials in its own storage; OpenCompany records only a connected marker.
* **Stripe** — login opens the Stripe Dashboard. After you authorize, the CLI keeps its credentials in its own config file, and webhook listening starts automatically.
* **GitHub** — the gh CLI (installed automatically) opens `github.com/login/device` in your browser. The one-time code appears in the modal; copy it in, since that page cannot pre-fill it. The token lives in your system credential store, and `gh auth setup-git` runs so git remotes authenticate too.
* **Vercel** — a browser device flow via the auto-installed Vercel CLI. Alternatively, paste an **Access Token (optional)** for headless use; the **Login with Vercel** button works without it.
* **Claude Code CLI** — runs the CLI's browser login in an isolated subprocess. You authorize on claude.ai, and the CLI stores its credentials under OpenCompany's data directory, separate from any personal Claude Code session. The panel flips to **Connected** shortly after the browser step completes.
* **Codex CLI** — follows the same CLI-managed login pattern for OpenAI's Codex tool.
GitHub tokens are never stored by OpenCompany. If you prefer, run `gh auth login` yourself in a terminal on the same machine — the modal picks up the result.
### Device pairing
Two providers pair a physical device by QR code instead of storing a secret:
* **WhatsApp Personal** — click **Start**, then scan the QR code with the WhatsApp mobile app (Linked Devices). **Restart** regenerates the code; **Refresh** re-checks status. The session lives inside the bundled WhatsApp service, not in OpenCompany's credential database.
* **Android Device** — save the relay **API Key** first, then click **Connect** and scan the QR with the Android companion app. The panel tracks two states: the relay link (**Connected**) and the device itself (**Paired**).
Follow the [WhatsApp](/nodes/whatsapp) and [Android](/nodes/android) guides for full pairing walkthroughs.
## Your credentials stay local
Everything you save here lives in a separate encrypted database file, `credentials.db`, on your own machine. Secrets are encrypted with Fernet, an authenticated encryption scheme, and are only decrypted in memory while the server runs. Nothing is ever sent to OpenCompany servers — keys travel only to the provider you are connecting. The encryption key comes from the `API_KEY_ENCRYPTION_KEY` value in your server `.env` file. Keeping credentials in their own file also means workflow exports and database dumps never contain secrets.
If `API_KEY_ENCRYPTION_KEY` changes or goes missing, existing credentials cannot be decrypted. You will need to re-enter them.
## Costs and usage
Provider panels show spend where OpenCompany tracks it. AI provider panels include a collapsible **Usage & Costs** section with token usage and estimated cost per model. **Twitter/X**, **Google Workspace**, and **Google Maps** panels include an **API Usage** section with per-operation request costs. Both sections load their data when you expand them.
## Related pages
Connect one AI provider, or run models locally for free
Create the OAuth app and connect Gmail, Calendar, and Drive
Pair your phone and automate messages
# Production Deployment
Source: https://docs.opencompany.sh/deployment/production
Deploy OpenCompany to a cloud VM with one command using company deploy
# Production Deployment
Not sure you need a server? Most people run OpenCompany on their own computer — see [Choose how to run](/choose-how-to-run).
The recommended way to run OpenCompany in production is the built-in self-deploy CLI. One command provisions a login-gated OpenCompany VM on a cloud provider, installs the app, and runs it behind the login screen.
```bash theme={null}
company deploy up --provider gcp --owner-email you@example.com
```
Behind the scenes this runs two stages:
1. **Cloud CLI (auth + context)** - the provider adapter (currently `gcloud`; AWS is a follow-on) verifies your cloud CLI is installed and authenticated, resolves the project/region/zone, checks Application Default Credentials, and enables the required cloud APIs.
2. **Terraform** - generates fresh secrets and owner credentials, packages your local build, then creates all resources: the VM (resource id `opencompany` for new deployments; pre-rebrand deployments keep `machinaos`, retained for upgrade compatibility), firewall rule, artifact bucket, and service account. A cloud-init startup script installs Node.js and uv, installs the package, and runs `company serve` under systemd on a single public port.
`company serve` fronts the API, WebSocket, and the built single-page app on one port (optional daemons like the Node.js executor and WhatsApp are backend-managed and spawn on demand on their own loopback ports). No separate frontend container or reverse proxy is required for the standard path.
## Prerequisites
* A cloud account (Google Cloud for the `gcp` provider).
* The `gcloud` CLI installed and authenticated:
```bash theme={null}
gcloud auth login
gcloud auth application-default login
gcloud config set project
```
* Node.js 22+ and npm on your local machine (used to package the local build via `npm pack`).
* Terraform is auto-installed by the deploy CLI if it is not already on PATH.
## Deploy
```bash theme={null}
company deploy up --provider gcp --owner-email you@example.com
```
When it finishes it prints the external IP, the URL, and the owner login credentials. If you did not pass `--owner-password`, a strong password is generated and printed once - save it.
The generated login password is shown only once at the end of `deploy up`. Copy it immediately; it is not stored where you can read it back later.
### Common options
Cloud provider. `gcp` today; AWS is a follow-on.
Login email for the owner account (single-owner mode).
Login password (min 8 chars). Generated and printed once if omitted.
VM size.
Public port the app binds and the firewall opens.
Firewall source range. Restrict to your own IP with something like `203.0.113.4/32`.
Cloud region (provider default if omitted).
Cloud zone (provider default if omitted).
GCP project (defaults to your `gcloud` config).
## The Login Gate
The deploy path always provisions a login-gated, single-owner instance:
* `VITE_AUTH_ENABLED=true` and `AUTH_MODE=single`.
* The owner credential is generated at deploy time and seeded on first boot.
* Fresh `JWT_SECRET_KEY`, `SECRET_KEY`, and `API_KEY_ENCRYPTION_KEY` are minted per deployment.
By default the VM is reached over plain HTTP on its IP, so `JWT_COOKIE_SECURE` is set to `false`. Put a domain and TLS terminator in front and flip `JWT_COOKIE_SECURE=true` once HTTPS is in place.
## Status and Health
```bash theme={null}
company deploy status
```
Prints the deployment's URL and polls `/health`. The VM takes a few minutes on first boot to install Node, npm, and build the app.
## Updating
Re-running `deploy up` re-applies Terraform safely (the VM keeps its durable resource id). To ship a new local build, run `company deploy up` again from an updated checkout.
## Tearing Down
```bash theme={null}
company deploy destroy
```
This runs `terraform destroy` and clears the local deployment state.
Deployment state lives at `/deploy/opencompany/` (pre-rebrand deployments keep `deploy/machinaos/`, retained for upgrade compatibility). It is preserved by `company clean` - only `company deploy destroy` removes it, because it tracks live cloud resources.
## Verify
```bash theme={null}
# Check health endpoint (URL printed by deploy up / status)
curl http://:5678/health
```
## Security Checklist
Owner login credentials are saved somewhere safe (password shown once)
Firewall source range restricted with --allow-cidr where possible
A TLS terminator + domain in front, with JWT\_COOKIE\_SECURE=true, before exposing publicly
SSH key authentication only on the VM (disable password auth)
***
## Self-Managed Deployment
Earlier releases shipped a Docker Compose topology; Docker support has been removed. Deploy with `company deploy` (Terraform -> GCP VM -> systemd) as described above.
## Related
Environment variables and local setup
# FAQ
Source: https://docs.opencompany.sh/faq
Frequently asked questions about OpenCompany
# Frequently Asked Questions
Common questions and troubleshooting for OpenCompany.
## General
OpenCompany is an open-source workflow automation platform inspired by n8n. It lets you create visual workflows that connect AI models, messaging services, devices, and APIs using a drag-and-drop interface.
Yes, OpenCompany is open-source and free to self-host. You only pay for external services you use (AI API calls, cloud hosting, etc.).
OpenCompany is inspired by n8n's node-based approach but focuses on:
* Deep AI integration (12 LLM providers with memory, tools, and skills)
* WhatsApp, Telegram, and Twitter/X automation
* Android device control
* Real-time WebSocket communication
OpenCompany is built with React and Python, while n8n uses Node.js.
Yes, OpenCompany is released under an open-source license. Check the repository for specific license terms.
## Installation
**Minimum:**
* 2GB RAM
* 2 CPU cores
* 10GB disk space
**Recommended:**
* 4GB+ RAM
* 4+ CPU cores
* SSD storage
Yes. OpenCompany runs natively on Windows with Node.js 22+ and Python 3.12+ installed. macOS, Linux, WSL2, and Git Bash are also supported. All launch scripts are cross-platform.
```bash theme={null}
cd opencompany
git pull
company clean
company start
```
`company start` auto-installs any new dependencies before launching.
Change the app port in your `.env` file:
```
PYTHON_BACKEND_PORT=6678
```
Then restart the services. Default ports (one continuous block): app 5678 (always what you open in the browser), dev-mode backend 5679, Temporal UI 5680 + gRPC 5681, Node.js executor 5682, WhatsApp 5683, plus Redis 6379.
## Workflows
* **Save**: Persists your workflow to the database. The workflow is not running.
* **Deploy**: Activates triggers and starts listening for events. Required for cron schedules, webhooks, and message triggers.
1. Make sure the workflow is **deployed** (not just saved)
2. Check if filters are too restrictive
3. Verify external services are connected (WhatsApp, Android)
4. Check backend logs for errors
Use template variables:
```
{{nodeName.fieldName}}
```
Example: `{{webhookTrigger.body.message}}`
Yes, each deployed workflow runs independently. Multiple workflows can have triggers active at the same time.
1. Use the **Run** button on individual nodes to test them
2. Check the output panel for node results
3. Use the Console tab in the bottom panel to view node execution logs
4. Add Python Executor nodes with `print()` statements
5. Check the backend Terminal tab or the server logs for errors
## AI Integration
Click the **key icon** in the toolbar to open the **API Credentials** modal — the [Add your AI key](/add-api-keys) page walks through it step by step. OpenCompany supports 12 providers (11 dedicated model nodes, plus xAI through the OpenAI-compatible path):
* OpenAI, Anthropic, Gemini
* OpenRouter, xAI, Groq, Cerebras, DeepSeek, Kimi, Mistral
* Ollama and LM Studio (local servers — enter the server URL, no cloud key needed)
Service credentials (Google Workspace, Google Maps, Twitter/X, Telegram, WhatsApp, and more) live in the same modal — see [Credentials](/credentials).
Yes, API keys are:
* Encrypted before storage
* Stored locally in SQLite
* Never sent to OpenCompany servers
* Only transmitted to the respective AI providers
The Simple Memory node stores conversation history as editable markdown, keyed by session ID. Connect it to an AI Agent's memory handle to enable multi-turn conversations. It keeps a rolling window of recent exchanges and can optionally archive older messages to a vector store for long-term semantic retrieval.
| Use Case | Recommended |
| ----------------- | ---------------------------------------------------------- |
| General chat | GPT-5.2, Claude Sonnet 4.6, Gemini 3.5 Flash |
| Complex reasoning | Claude Opus 4.8, GPT-5.5, o3 |
| Fast responses | Claude Haiku 4.5, Gemini 3.5 Flash, Groq (Llama 3.3-70b) |
| Long context | Claude Opus 4.8 (1M), GPT-5.5 (1M+), Gemini 3.5 Flash (1M) |
| Cost-effective | Gemini 3.5 Flash, DeepSeek V4 Flash, Groq / Cerebras |
| Local / private | Ollama or LM Studio (whatever model you have loaded) |
Model availability changes over time — the model dropdown on each AI Model node always reflects the current supported list.
## WhatsApp
1. Click the WhatsApp/Android icon in the toolbar
2. A QR code appears
3. Open WhatsApp on your phone
4. Go to Settings > Linked Devices > Link a Device
5. Scan the QR code
* Ensure your phone has stable internet
* Don't use WhatsApp Web simultaneously
* Keep the OpenCompany server running continuously
* Check if you're logged out on your phone
Yes, WhatsApp Business accounts work the same way as regular accounts.
Use the group's JID (ends with `@g.us`) as the recipient. The WhatsApp Receive node provides `group_info.group_jid` for incoming group messages.
## Android
**Local (USB):**
1. Enable Developer Options and USB Debugging on your phone
2. Connect via USB
3. Run `adb devices` to verify
4. Select device in Android Device Setup node
**Remote:**
1. Configure relay URL in .env
2. Add API key in Credentials
3. Install companion app on device
4. Scan QR code to pair
```bash theme={null}
# Check connection
adb devices
# Restart ADB
adb kill-server
adb start-server
# Try different USB cable/port
```
Also ensure USB debugging is enabled in Developer Options.
Some Android automation features require root or special permissions:
* Airplane mode toggle
* Some system settings
* Protected app access
Use automation apps like Tasker for restricted features.
## Webhooks
Local: `http://localhost:5678/webhook/{path}`
Production: `https://your-domain.com/webhook/{path}`
Replace `{path}` with the path you set in the Webhook Trigger node.
* Verify the workflow is **deployed**
* Check the path matches exactly (case-sensitive)
* Ensure backend is running on the correct port
Use authentication in the Webhook Trigger node:
* Basic auth (username/password)
* Bearer token
* API key header
## Deployment
The current path is the built-in `company deploy` CLI, which provisions a login-gated VM and installs OpenCompany automatically:
```bash theme={null}
company deploy up --provider gcp --owner-email you@example.com
company deploy status
company deploy destroy
```
This uses your cloud CLI plus Terraform to stand up a single-port server running `company serve` under systemd, with authentication enabled and an owner credential generated at deploy time. See [Production Deployment](/deployment/production) for details. Docker support was removed; deployment is `company deploy` (Terraform provisioning a GCP VM).
Yes. The requirements are Node.js 22+ and Python 3.12+. The backend uses `uv` for Python dependencies (not pip). For local development, the simplest path is:
```bash theme={null}
company start # or: company dev
```
`company start` frees ports, auto-installs dependencies (`uv sync` for Python, `npm` for the frontend and Node executor), and launches everything. Environment variables bootstrap from `.env.template`.
OpenCompany can run on a small VM:
* GCP e2-micro / e2-small: low single-digit dollars per month
* AWS EC2 t3.micro / small: \~\$10/month
* Self-hosted: hardware cost only
Plus costs for AI API calls and domain/SSL.
OpenCompany keeps its state under the data directory (`~/.opencompany/` by default; a pre-rebrand `~/.machina/` directory is still auto-discovered for upgrades): the SQLite databases (`workflow.db`, `credentials.db`, `temporal.db`), per-workflow workspaces, and the WhatsApp session. To back up, copy that directory while the server is stopped. API keys and OAuth tokens live encrypted in `credentials.db`.
## Something broken?
Install failures, port conflicts, blank pages, and workflow problems all live on the dedicated [Troubleshooting](/troubleshooting) page, with exact commands and expected output for each fix.
## Getting Help
Report bugs and request features
Browse the full documentation
# Your first chat
Source: https://docs.opencompany.sh/first-chat
Say hello to your AI assistant and see a workflow run for the first time
This takes about 2 minutes. You need OpenCompany [installed](/installation) and one AI key added (or a local model connected) — see [Add your AI key](/add-api-keys).
## What you'll see on first launch
The first time you open `http://localhost:5678`, the **Welcome Guide** opens over the canvas. It has five short steps: **Welcome**, **Concepts**, **API Keys**, **Canvas**, and **Get Started**. Click **Next** to walk through them, or **Skip for now** — you can bring it back any time from Settings, under Help, with the **Replay** button next to **Replay Welcome Guide**.
The API Keys step has an **Open Credentials** button that jumps straight to the key setup from [the previous page](/add-api-keys).
## The three example workflows
OpenCompany ships with three ready-made workflows. They load automatically on first launch and appear in the left sidebar.
* **AI Assistant** — a personal assistant with chat, web search, and file tools. Start here: its core works with just one AI key.
* **AI Employee** — a multi-agent showcase that coordinates specialist agents. It needs several extra accounts; explore it later.
* **Claude Assistant** — the same idea built around the Claude Code agent; it needs a Claude subscription or API access.
## Run your first chat
You need one AI key first. If you skipped it, do [Add your AI key](/add-api-keys) now — it takes 2 minutes.
Click **AI Assistant** in the left sidebar.
The workflow's nodes appear on the canvas.
Press the green **Start** button in the top toolbar.
The button changes to **Stop**, and the Chat Trigger node begins a gentle pulse — it is listening.
Click the **Chat / Console** bar at the bottom of the screen.
The panel expands: a **Chat** box on the left, **Console** and **Terminal** tabs on the right.
Type `Hello! What can you do?` into the box that reads **Type a message...** and press **Send** (or Enter).
Your message appears in the Chat pane.
Click the **Console** tab on the right side of the panel.
The AI's answer appears there within a few seconds.
The reply appears in the **Console** tab, not as a chat bubble. The Chat pane shows what you sent; the workflow's Console node prints what the AI answered.
You sent a message, the nodes lit up as they worked, and the AI answered in the Console tab. You have run your first workflow.
## What just happened
Your message woke the **Chat Trigger** node. The trigger handed your text to the **AI Agent**, which asked your chosen model for an answer. The agent passed that answer to the **Console** node, which printed it in the Console tab.
## Next step
Recreate that chat pipeline yourself, from an empty canvas, in about ten minutes.
# How OpenCompany works
Source: https://docs.opencompany.sh/how-it-works
What happens when you run a workflow: nodes, connections, agents, and where your data lives
OpenCompany turns instructions like "when someone messages my bot, have the AI answer" into a picture you can see and edit. That picture is called a workflow. This page explains the ideas behind it — no technical background needed.
## The big picture
Something happens: a message arrives, or a timer fires. That event wakes up your workflow. The workflow passes the event through a chain of steps. The last step delivers a result — a reply, a file, a log entry.
## Workflows, nodes, and connections
| Term | What it means |
| ---------- | ------------------------------------------------------------------------------- |
| Workflow | The whole automation, drawn as a diagram on the canvas |
| Node | One box in the diagram — one job, like "receive a chat message" or "ask the AI" |
| Connection | The line between two nodes — it carries the output of one node into the next |
You build workflows by dragging nodes onto the canvas and drawing lines between them. No code required.
## Where the AI comes in
**AI Agents** are the thinking nodes. Each agent has a built-in choice of AI provider and model. It takes whatever text flows into it and produces an answer.
**Models** are the brains agents use — OpenAI, Anthropic, Gemini, and others. OpenCompany supports 12 providers (11 dedicated model nodes, plus xAI through the OpenAI-compatible path), including free local options like Ollama.
**Tools** are extra abilities you plug into an agent — web search, file access, code execution. The agent decides on its own when to use them.
## Everything runs on your computer
OpenCompany is not a cloud service. The app, your workflows, and your API keys (the password-like codes that let OpenCompany use your AI account) all live on your machine. Keys are stored encrypted and are only ever sent to the AI provider you chose.
No account or sign-up is required. You open `http://localhost:5678` in your browser, and everything you see is served from your own computer.
## What's next
On your computer, on a cloud server, or from source.
Two commands and about five minutes.
# Install OpenCompany
Source: https://docs.opencompany.sh/installation
Two commands and about five minutes - no login, no account, everything on your machine
**Takes:** 2-10 minutes, mostly automatic downloads. **You need:** Node.js 22+ and Python 3.12+ (checked below). **Disk:** about 1 GB. No git, no build tools, no account.
No command-line experience? You only need to copy and paste three lines into the terminal (the text command app — **Terminal** on macOS, **PowerShell** on Windows). Each step below tells you exactly what you should see.
## Before you install
OpenCompany needs two free tools. Check whether you already have them:
```powershell Windows theme={null}
node --version
```
```bash macOS theme={null}
node --version
```
```bash Linux theme={null}
node --version
```
You should see `v22` or higher. Then:
```powershell Windows theme={null}
python --version
```
```bash macOS theme={null}
python3 --version
```
```bash Linux theme={null}
python3 --version
```
You should see `Python 3.12` or higher.
Missing one? Install Node.js from [nodejs.org](https://nodejs.org) (choose the LTS version) and Python from [python.org/downloads](https://www.python.org/downloads/). On Windows, tick **Add python.exe to PATH** in the Python installer. Then open a new terminal window and re-check.
Everything else — including the uv Python package manager — installs itself automatically.
## Install (3 steps)
```bash theme={null}
npm install -g @zeenie-ai/opencompany
```
Downloads run for a few minutes (Python packages and the workflow engine, \~1 GB total). At the end you should see `Run: company start`.
```bash theme={null}
company start
```
You should see:
```
OpenCompany v0.0.96
App: http://localhost:5678 (API + WebSocket + SPA)
```
Go to [http://localhost:5678](http://localhost:5678) in your browser.
The workflow canvas appears — no login needed — and the **Welcome Guide** walks you through the basics.
You see the canvas with a component palette on the left and three example workflows in the sidebar. You're in.
## One-command installers
Don't want to install Node and Python yourself? These scripts install the prerequisites AND OpenCompany in one go:
```powershell Windows theme={null}
iwr -useb https://raw.githubusercontent.com/zeenie-ai/OpenCompany/main/install.ps1 | iex
```
```bash macOS theme={null}
curl -fsSL https://raw.githubusercontent.com/zeenie-ai/OpenCompany/main/install.sh | bash
```
```bash Linux theme={null}
curl -fsSL https://raw.githubusercontent.com/zeenie-ai/OpenCompany/main/install.sh | bash
```
When the script finishes, run `company start` and open `http://localhost:5678`.
Windows Defender scans every new Python file, which can make the first install or start slow. If it drags: open **Windows Security** → **Virus & threat protection** → **Manage settings** → **Exclusions**, and add the `server\.venv` folder inside your OpenCompany install. A reboot after first install also helps.
## Everyday commands
| Command | What it does |
| ---------------------------------- | ------------------------------------------------------------------- |
| `company start` | Start everything (production mode) |
| `company stop` | Stop everything |
| `company doctor` | Check system dependencies and project health |
| `company build` | Rebuild after an update |
| `company clean` | Remove build artifacts for a fresh rebuild |
| `company deploy up/status/destroy` | Put OpenCompany on a cloud server ([guide](/deployment/production)) |
| `company version` | Show the installed version |
The old `machina` command still works as a deprecated alias of `company`.
## Settings you might change later
OpenCompany creates its settings file (`.env`) automatically — you do not need to touch it to get started. Two settings people ask about:
The app runs on a single port, 5678 (backend and browser UI together), with the other services on the ports right after it (5679-5683). If another program owns one, edit the `.env` file inside the install folder and change `PYTHON_BACKEND_PORT` (and friends), then restart.
Local installs have no login (`VITE_AUTH_ENABLED=false` by default) — the app is only reachable from your own machine. Cloud deployments created with `company deploy` turn the login gate on automatically. To require a login locally, set `VITE_AUTH_ENABLED=true` in `.env` and restart.
## For developers
This path needs git and [bun](https://bun.sh) in addition to Node 22+ and Python 3.12+:
```bash theme={null}
git clone https://github.com/zeenie-ai/opencompany.git
```
```bash theme={null}
cd opencompany
```
```bash theme={null}
npm install -g bun
```
```bash theme={null}
bun run build
```
```bash theme={null}
bun run dev
```
`bun run dev` starts the hot-reload dev stack (Vite + backend + workflow engine). The package scripts are thin wrappers over the `company` CLI (`python -m cli dev`). The backend environment is managed by [uv](https://docs.astral.sh/uv/) against `server/uv.lock` — `bun run build` sets it up for you (including `bun install`). Handy dev flags: `company dev --force` (re-bundle frontend dependencies) and `company dev --daemon` (expose the backend on your network).
## If something went wrong
Version checks, port conflicts, Defender slowdowns, and clean rebuilds — with exact commands.
## Next step
Connect one AI provider (2 minutes) — or run free local models.
# What is OpenCompany?
Source: https://docs.opencompany.sh/introduction
Your own AI assistant that does real work - free on your machine with your keys, or hosted on a usage-based plan
OpenCompany is a free, open-source app that lets you build AI-powered automations by drawing them. Drag boxes onto a canvas, connect them with lines, press **Start** — and your AI answers messages, searches the web, reads files, sends emails, and more. Everything runs on your own computer.
## What you can build
* A chat assistant that answers you in the app — or through a **Telegram bot** you set up in ten minutes.
* A morning digest: read your calendar, have the AI summarize the day, email it to you.
* A research helper: an agent that searches the web on its own and reports back with sources.
* A WhatsApp auto-responder that drafts replies in your tone.
* A scheduled job that watches a folder, summarizes new files, and logs the result.
## Why people pick it
Free under the MIT licence, with no account and no usage limits. Your workflows, data, and keys stay local. Prefer not to run it yourself? [Pro and Max](https://opencompany.sh/pricing/) are hosted plans, priced on usage rather than per seat.
12 providers (11 dedicated model nodes, plus xAI through the OpenAI-compatible path) — or run free local models with Ollama and LM Studio.
Messaging, Google Workspace, email, search, browsers, code, files, payments, Android, and more.
Agents with memory and tools that decide for themselves when to search, read, or act — plus 16 ready-made specialist agents.
## Who it's for
**If you've never automated anything:** the [Get Started path](/how-it-works) assumes nothing. Install with two commands, chat with an AI in minutes, then build your first workflow by dragging three boxes.
**If you're a developer:** it's a plugin-first Python/FastAPI backend with a React Flow canvas, Temporal-backed durable execution, and one-folder-per-node plugins. The [Architecture](/architecture) page has the internals, and the [source is on GitHub](https://github.com/zeenie-ai/opencompany).
## Start here
Workflows, nodes, and agents in plain language.
Your computer, a cloud server, or from source.
Two commands, about five minutes.
See it work before you build anything.
# AI Agents & Memory
Source: https://docs.opencompany.sh/nodes/ai-agent
Build intelligent agents with conversation memory, skills, and tool calling
# AI Agents & Memory
OpenCompany provides two general-purpose AI agents plus a set of specialized, pre-configured agents, all sharing a memory node for conversation context.
## Agent Types
| Agent | Purpose | Special Features |
| ------------------- | ----------------------------------- | ---------------------------------------------- |
| AI Agent | Complex reasoning with tool calling | Iterative agent loop, tool calling, delegation |
| Chat Agent (Zeenie) | Conversational AI with skills | Skill-driven behavior, multi-turn chat |
| Simple Memory | Conversation history storage | Markdown format, long-term vector storage |
### Specialized Agents
Pre-configured agents for specific domains. Each is a self-contained plugin that inherits full AI Agent behavior (provider, model, prompt, system message, thinking) while being tailored for a domain. Most run the shared agent loop; `rlm_agent`, `claude_code_agent`, and `codex_agent` have dedicated engines.
| Agent | Description | Theme |
| --------------------- | --------------------------------------------------------------------- | ------ |
| Android Control Agent | Android device control via ADB | Green |
| Coding Agent | Python / JavaScript / TypeScript code execution | Cyan |
| Web Control Agent | Web automation and scraping | Pink |
| Task Management Agent | Task automation and scheduling | Purple |
| Social Media Agent | WhatsApp, Telegram, Twitter messaging | Green |
| Travel Agent | Location and maps services | Orange |
| Tool Agent | Flexible tool orchestration | Yellow |
| Productivity Agent | Google Workspace workflows | Cyan |
| Payments Agent | Payment processing | Green |
| Consumer Agent | Customer support interactions | Purple |
| Autonomous Agent | Code Mode with agentic loops (81-98% token savings) | Purple |
| Orchestrator Agent | Team lead for multi-agent coordination | Cyan |
| AI Employee | Team lead (alternate branding) | Purple |
| RLM Agent | Recursive Language Model via REPL (`llm_query`, `rlm_query`, `FINAL`) | Orange |
| Claude Code Agent | Claude Code CLI integration (interactive mode) | Purple |
| Codex Agent | Codex CLI integration | Purple |
Three additional Vertex nodes (Vertex Agent, Cloud Tool, Vertex Agent Admin) appear in the Dev palette. They are experimental — behavior and parameters may change, and they are not yet documented here.
### Agent Teams Pattern
`orchestrator_agent` and `ai_employee` have an extra `input-teammates` handle. Connected agents become `delegate_to_` tools automatically:
```
Team Lead (AI Employee / Orchestrator)
|
| input-teammates
+----------------+----------------+
| | |
Coding Agent Web Agent Task Agent
(delegate_to_ (delegate_to_ (delegate_to_
coding_agent) web_agent) task_agent)
```
Delegation is fire-and-forget: the child agent spawns as a background task, the parent continues working, and the child broadcasts its status independently. Completion results can be consumed by a `taskTrigger` node connected to the parent's Task handle.
***
## AI Agent Node
The AI Agent runs an iterative agent loop with tool calling and delegation.
### Input Handles
| Handle | Position | Purpose |
| ------------------------- | ---------------- | ------------------------------------------- |
| Main Input (`input-main`) | Left | User prompt/data from upstream nodes |
| Memory (`input-memory`) | Left (diamond) | Connect Simple Memory |
| Task (`input-task`) | Left (diamond) | Connect taskTrigger for delegation feedback |
| Skill (`input-skill`) | Bottom (diamond) | Connect Master Skill |
| Tools (`input-tools`) | Bottom (diamond) | Connect Tool nodes or dual-purpose nodes |
Team lead agents (Orchestrator Agent, AI Employee) add an extra `input-teammates` handle for delegation.
### Parameters
AI provider: openai, anthropic, gemini, openrouter, groq, cerebras, deepseek, kimi, mistral, ollama, lmstudio
Model to use (options based on provider)
Instructions that define the agent's behavior and personality
The user message. Supports template variables like `{{nodeName.field}}`
Optional per-node cap on agent loop steps. When unset, falls back to your Settings recursion limit (default 200).
### Output
```json theme={null}
{
"response": "The agent's final response",
"thinking": "Reasoning process (if thinking enabled)",
"iterations": 2,
"tool_calls": [
{"tool": "calculator", "input": {"operation": "add", "a": 5, "b": 3}, "output": 8}
]
}
```
### Tool Calling
Connect Tool nodes to the **input-tools** handle (bottom diamond) to give the agent capabilities:
```
[Calculator Tool] --+
+--> [AI Agent] --> [Output]
[Web Search Tool] --+
```
The agent will automatically use tools when needed based on the user's request.
***
## Chat Agent Node (Zeenie)
The Chat Agent is designed for conversational interactions with skill-based behavior extension.
### Input Handles
| Handle | Position | Purpose |
| ------------------------- | ---------------- | ------------------------------------------- |
| Main Input (`input-main`) | Left | User message (e.g., from Chat Trigger) |
| Memory (`input-memory`) | Left (diamond) | Connect Simple Memory |
| Task (`input-task`) | Left (diamond) | Connect taskTrigger for delegation feedback |
| Skills (`input-skill`) | Bottom (diamond) | Connect Skill nodes |
| Tools (`input-tools`) | Bottom (diamond) | Connect Tool nodes |
### Parameters
AI provider: openai, anthropic, gemini, openrouter, groq, cerebras, deepseek, kimi, mistral, ollama, lmstudio
Model to use (options based on provider)
Base system instructions (extended by connected skills)
User message. If empty, reads from connected input node's `message`, `text`, or `content` field.
### Skill Support
Connect Skill nodes to the **input-skill** handle to extend the Chat Agent's capabilities:
```
[WhatsApp Skill] --+
+--> [Chat Agent] --> [Response]
[Maps Skill] ------+
```
Skills provide domain-specific instructions and allowed tools to the Chat Agent.
### Input Methods
1. **Template Variable (Explicit)**:
```
Prompt: {{chatTrigger.message}}
```
2. **Auto-Fallback (Implicit)**: Leave Prompt empty - the agent reads from the connected input node automatically.
### Output
```json theme={null}
{
"response": "Chat Agent's response",
"thinking": "Reasoning (if enabled)",
"model": "claude-sonnet-4-6",
"provider": "anthropic"
}
```
***
## Simple Memory Node
Stores conversation history in markdown format for AI agents.
### Connection
Simple Memory connects to the **memory handle** (diamond shape on bottom-left):
```
[Simple Memory] ---(diamond)---> [AI Agent or Chat Agent]
```
Connect to the diamond handle, not the main input. The main input is for data flow.
### Parameters
Unique identifier for the conversation session. Use dynamic values for multi-user scenarios.
Number of message pairs to keep in short-term memory
Editable conversation history in markdown format. View and edit directly in the parameter panel.
Archive old messages to vector DB for semantic retrieval
Number of relevant memories to retrieve from long-term storage (shown when longTermEnabled is true)
### Memory Format
Conversation history is stored in markdown:
```markdown theme={null}
# Conversation History
### **Human** (2025-01-30 14:23:45)
What is the weather like today?
### **Assistant** (2025-01-30 14:23:48)
I don't have access to real-time weather data...
```
### Memory Flow
1. Agent reads `memoryContent` markdown from connected Simple Memory node
2. Parses markdown into message history
3. (If enabled) Retrieves relevant context from vector store
4. Executes with conversation history
5. Appends new messages to markdown
6. Trims to keep last N pairs (windowSize)
7. Archives removed messages to vector store (if longTermEnabled)
8. Saves updated markdown back to node parameters
### Dynamic Session IDs
For multi-user scenarios, use template variables:
```
Session ID: {{webhookTrigger.body.user_id}}
```
This creates separate memory for each user.
***
## Building Agent Workflows
### Basic AI Agent with Tools
```
[Webhook Trigger] --> [AI Agent] --> [Webhook Response]
^
|
[Simple Memory]
[Calculator Tool]
|
v
[AI Agent]
```
### Chat Agent with Skills
```
[Chat Trigger] --> [Chat Agent] --> [Console]
^
|
[Simple Memory]
[WhatsApp Skill]
|
v
[Chat Agent]
```
### Step-by-Step Setup
1. **Add AI Agent or Chat Agent** from AI Agents category
2. **Add Simple Memory** and connect to memory handle (diamond)
3. **Add Tools/Skills** and connect to respective handles
4. **Add Trigger** (Webhook, Chat, WhatsApp) connected to main input
5. **Add Response** node connected to agent output
***
## AI Agent vs Chat Agent
| Feature | AI Agent | Chat Agent (Zeenie) |
| -------------- | -------------------------- | ---------------------------------- |
| Primary Use | Complex reasoning tasks | Conversational interactions |
| Tool Calling | Yes (agent loop) | Yes (agent loop) |
| Memory Support | Yes | Yes |
| Skill Support | Yes | Yes |
| Bottom Handles | Skill, Tools | Skill, Tools |
| Left Handles | Input, Memory, Task | Input, Memory, Task |
| Best For | Task automation, reasoning | Chat interfaces, multi-turn dialog |
***
## Async Agent Delegation
Agents can delegate tasks to other agents connected via the `input-tools` handle. The parent agent continues immediately while the child works in the background.
### How It Works
1. Connect a specialized agent to a parent agent's `input-tools` handle
2. Parent agent calls `delegate_to_(task="...", context="...")`
3. Child agent spawns as background task
4. Parent receives `{"status": "delegated", "task_id": "..."}` immediately
5. Child executes independently with its own tools
### Example
```
[AI Agent] <--tools-- [Android Control Agent] <--tools-- [Battery Monitor]
<--tools-- [WiFi Automation]
```
When the AI Agent needs Android control:
* Calls `delegate_to_android_agent(task="Check battery and enable WiFi if low")`
* Android Agent spawns in background with its own connected tools
* AI Agent continues with other work
***
## Multi-Turn Conversation Example
### First Request
```bash theme={null}
curl -X POST http://localhost:5678/webhook/chat \
-d '{"user_id": "user123", "message": "My name is Alex"}'
```
Response: "Nice to meet you, Alex! How can I help you today?"
### Second Request
```bash theme={null}
curl -X POST http://localhost:5678/webhook/chat \
-d '{"user_id": "user123", "message": "What is my name?"}'
```
Response: "Your name is Alex, as you told me earlier."
***
## Tips
Use descriptive **system prompts** to define agent behavior clearly.
Set **Max Iterations** based on task complexity. Simple Q\&A: 1-2, Complex reasoning: 3-5.
Use unique **Session IDs** per user/conversation for proper isolation.
Connect **Skills** to Chat Agent for domain-specific behavior (WhatsApp, Maps, HTTP, etc.).
Long conversations with large window sizes can exceed model context limits. Use appropriate windowSize for your use case.
***
## Troubleshooting
* Verify Simple Memory is connected to diamond handle (not main input)
* Check Session ID is consistent across requests
* Ensure workflow is deployed (not just saved)
* Verify Tool nodes are connected to the input-tools diamond handle
* Check tool node has proper schema/description
* Ensure the prompt requires tool usage
* Verify Skill nodes are connected to input-skill handle
* Check skill SKILL.md content is valid
* Ensure skill's allowed-tools match connected tool nodes
* Reduce windowSize setting (10-20 messages recommended)
* Enable long-term memory to archive old messages
* Consider clearing sessions periodically
***
## Related
12 chat model providers with thinking modes
Skill nodes for AI and Chat Agents
Tool nodes for AI agents
Step-by-step agent tutorial
# AI Chat Models
Source: https://docs.opencompany.sh/nodes/ai-models
12 providers - 11 dedicated model nodes plus xAI through the OpenAI-compatible path - with models fetched live from each provider
# AI Chat Models
OpenCompany supports **12 providers** (11 dedicated model nodes, plus xAI through the OpenAI-compatible path), with models fetched dynamically from each provider's API (and, for the local nodes, from your running server). The backend uses a hybrid architecture: a native SDK layer in `server/services/llm/` for direct chat completions, and a LangChain + LangGraph path for agent tool-calling.
## Available Chat-Model Nodes
| Node | Models | Best For |
| ------------- | ----------------------------------------------------------------------- | --------------------------------------------- |
| OpenAI | GPT-5.5/5.4/5.2, GPT-4.1/4.1-mini/nano, o3, o4-mini, GPT-4o/4o-mini | General purpose, reasoning |
| Anthropic | Claude Fable 5, Opus 4.8/4.7, Sonnet 4.6, Haiku 4.5 | Coding, analysis, extended thinking |
| Google Gemini | Gemini 3.5-flash, 3.1-pro/flash-lite, 3-flash, 2.5-pro/flash/flash-lite | Multimodal, long context (1M) |
| OpenRouter | 200+ models | Access multiple providers via single API |
| xAI | Grok models | Direct chat via the OpenAI-compatible xAI API |
| Groq | Llama 3.3-70b, Llama 3.1-8b, GPT-OSS-120b/20b, Qwen3-32b | Ultra-fast inference (LPU) |
| Cerebras | GPT-OSS-120b, Qwen-3-235b, GLM-4.7 | Ultra-fast on wafer-scale hardware |
| DeepSeek | deepseek-v4-flash, deepseek-v4-pro | V4 with reasoning modes, up to 1M context |
| Kimi | kimi-k2.6, kimi-k2.5, kimi-k2.7-code | 256K context, thinking on by default |
| Mistral | mistral-large/medium/small-latest, codestral-latest | Up to 256K context |
| Ollama | Whatever you've pulled locally | Local models, no API key |
| LM Studio | Whatever you've loaded locally | Local models, no API key |
xAI (Grok) is native-chat-only: it runs through the shared OpenAI-compatible provider with `base_url=https://api.x.ai/v1` and is not wired as an agent provider. **Ollama** and **LM Studio** connect to a local server running on your machine.
## Adding API Keys
1. Click the **key icon** in the toolbar
2. Select the provider
3. Enter your API key
4. Click **Validate** to test
API keys are encrypted and stored locally. They're never sent to OpenCompany servers.
***
## OpenAI Chat Model
### Models
| Model | Best For |
| ----------------------------- | -------------------------------- |
| gpt-5.5 | Most capable, up to \~1M context |
| gpt-5.4 | High capability, long context |
| gpt-5.2 | Capable, 400K context |
| gpt-4.1 / 4.1-mini / 4.1-nano | Fast, 1M context |
| o3 | Advanced reasoning |
| o4-mini | Fast, efficient reasoning |
| gpt-4o / gpt-4o-mini | Multimodal, cost-effective |
### Parameters
The model to use
The message to send. Supports template variables.
Randomness (0 = deterministic, 1 = creative)
Maximum response length
Output format: text or json\_object
For o-series and GPT-5 hybrid reasoning: low, medium, high (GPT-5 also supports xhigh)
### Output
```json theme={null}
{
"response": "The AI's response text",
"model": "gpt-5.5",
"thinking": "Reasoning process (o-series / GPT-5 only)",
"usage": {
"prompt_tokens": 50,
"completion_tokens": 100,
"total_tokens": 150
}
}
```
***
## Anthropic Claude Model
### Models
| Model | Best For |
| ----------------- | --------------------------------------------- |
| claude-opus-4-8 | Most capable, detailed analysis, 1M context |
| claude-opus-4-7 | High capability, 1M context |
| claude-sonnet-4-6 | Best for coding and complex tasks, 1M context |
| claude-fable-5 | Capable, 1M context |
| claude-haiku-4-5 | Fast responses, simple tasks, 200K context |
### Parameters
Claude model to use
The message to send
System instructions for the model
Randomness (0-1)
Maximum response length
Enable extended thinking mode (all Claude 4.x models)
Token budget for thinking (1024-16000). Shown when thinkingEnabled is true.
### Extended Thinking
Claude's extended thinking mode shows the model's reasoning process:
```json theme={null}
{
"response": "Claude's final response",
"thinking": "Let me analyze this step by step...",
"model": "claude-opus-4-8",
"stop_reason": "end_turn"
}
```
Anthropic model IDs use hyphens, not dots (`claude-sonnet-4-6`, not `claude-sonnet-4.6`).
When thinking is enabled, `max_tokens` must be greater than `thinkingBudget`. Temperature is automatically set to 1.
***
## Google Gemini Model
### Models
| Model | Best For |
| --------------------------------- | -------------------------------------- |
| gemini-3.5-flash | Fast, frontier performance, 1M context |
| gemini-3.1-pro-preview | Most intelligent, complex tasks |
| gemini-3.1-flash-lite | Fast, cost-effective |
| gemini-3-flash-preview | Fast, multimodal |
| gemini-2.5-pro | Complex tasks, thinking support |
| gemini-2.5-flash / 2.5-flash-lite | Fast, thinking support |
### Parameters
Gemini model to use
The message to send
Randomness (0-1)
Maximum response length
Content safety level
Enable thinking mode (Gemini 3.x and 2.5 models)
### Output
```json theme={null}
{
"response": "Gemini's response",
"thinking": "Reasoning process (when enabled)",
"model": "gemini-3.5-flash"
}
```
***
## OpenRouter Model
OpenRouter provides access to 200+ models from multiple providers through a single API.
### Features
* **Unified API**: One API key for OpenAI, Anthropic, Google, Meta, Mistral, and more
* **Free Models**: Some models available at no cost (marked with \[FREE] prefix)
* **Fallback**: Automatic model fallback if primary is unavailable
### Models
Models are grouped by cost in the dropdown:
* **Free models**: \[FREE] prefix, no cost
* **Paid models**: Standard pricing per provider
Popular models include:
* `openai/gpt-5.5`
* `anthropic/claude-sonnet-4.6` (the OpenRouter default)
* `google/gemini-3.5-flash`
* `meta-llama/llama-3.3-70b-instruct`
* `mistralai/mistral-large-latest`
### Parameters
Model in format: provider/model-name
The message to send
Randomness (0-1)
Maximum response length
### Output
```json theme={null}
{
"response": "Model's response",
"model": "openai/gpt-5.5",
"provider": "openrouter"
}
```
***
## Groq Model
Groq provides ultra-fast inference on custom LPU (Language Processing Unit) hardware.
### Models
| Model | Best For |
| ----------------------- | ----------------------------------- |
| llama-3.3-70b-versatile | General purpose, fast |
| llama-3.1-8b-instant | Ultra-fast, simple tasks |
| openai/gpt-oss-120b | Large open model, long output |
| openai/gpt-oss-20b | Fast open model |
| qwen/qwen3-32b | Reasoning with parsed/hidden output |
### Parameters
Groq model to use
The message to send
Randomness (0-1)
Maximum response length
For Qwen3 models: "parsed" returns reasoning, "hidden" returns only final answer
### Reasoning Output
Qwen3-32b supports reasoning output:
```json theme={null}
{
"response": "The final answer",
"thinking": "Step-by-step reasoning process",
"model": "qwen/qwen3-32b"
}
```
***
## Cerebras Model
Cerebras provides ultra-fast inference on custom wafer-scale AI hardware.
### Models
| Model | Best For |
| ------------ | --------------------------------- |
| gpt-oss-120b | Capable, balanced (the default) |
| qwen-3-235b | Reasoning tasks (budget thinking) |
| zai-glm-4.7 | General purpose |
### Parameters
Cerebras model to use
The message to send
Randomness (0-1)
Maximum response length
### Output
```json theme={null}
{
"response": "Cerebras model response",
"model": "gpt-oss-120b"
}
```
***
## DeepSeek
DeepSeek V4 models with reasoning support and long context.
### Models
| Model | Best For |
| ----------------- | --------------------------------------------------------- |
| deepseek-v4-flash | General purpose, fast, up to 1M context, up to 64K output |
| deepseek-v4-pro | Higher capability, up to 1M context, up to 64K output |
The legacy `deepseek-chat` and `deepseek-reasoner` aliases still resolve (scheduled for deprecation 2026-07-24). `deepseek-reasoner` returns always-on reasoning in the `thinking` field.
### Parameters
DeepSeek model
The message to send
Randomness (0-2)
Maximum response length (up to 64K)
### Reasoning Output
DeepSeek's reasoning is mapped to the standard `thinking` field:
```json theme={null}
{
"response": "The final answer",
"thinking": "Step-by-step reasoning",
"model": "deepseek-v4-pro"
}
```
***
## Kimi (Moonshot AI)
Moonshot's Kimi models with 256K context window and thinking on by default.
### Models
| Model | Best For |
| -------------- | ----------------------------------------- |
| kimi-k2.6 | General purpose, 256K context, 32K output |
| kimi-k2.5 | General purpose, 256K context, 96K output |
| kimi-k2.7-code | Code tasks, 256K context, 96K output |
### Parameters
Kimi model
The message to send
Maximum response length (up to 96K)
Kimi models use a fixed temperature of 0.6. User-set temperature is ignored. Thinking is on by default but explicitly disabled in tool-calling agent mode for compatibility.
### Output
```json theme={null}
{
"response": "Kimi response",
"thinking": "Reasoning (when thinking is active)",
"model": "kimi-k2.6"
}
```
***
## Mistral
Mistral AI models including Large, Small, and Codestral for code tasks.
### Models
| Model | Best For |
| --------------------- | -------------------------------------------- |
| mistral-large-latest | Most capable, general purpose, 256K context |
| mistral-medium-latest | Balanced, 256K context |
| mistral-small-latest | Fast, cost-effective |
| codestral-latest | Code generation and completion, 256K context |
### Parameters
Mistral model
The message to send
Randomness (0-1.5)
Maximum response length (up to 131K)
### Output
```json theme={null}
{
"response": "Mistral response",
"model": "mistral-large-latest"
}
```
Mistral models support up to 256K context but do not have a thinking mode. Temperature range is 0-1.5 (not 0-2).
***
## Ollama (Local)
Run models locally through an [Ollama](https://ollama.com) server. No API key is needed; instead you point OpenCompany at your running server's URL in the Credentials Modal (default `http://localhost:11434/v1`).
### Models
The dropdown reflects **whatever you have pulled** into Ollama (e.g. `qwen2.5`, `llama3.x`, `phi-3`, `deepseek-r1`). OpenCompany probes your running server via the official Ollama Python SDK and reads per-model context length directly. When the server is offline the list is empty, cueing you to start it.
### Parameters
A model loaded in your local Ollama server
The message to send
Randomness (0-2)
Maximum response length (per-model, roughly context / 4, capped at 4096)
Traffic stays on your machine. OpenCompany sends requests to your local server URL, never to a cloud API.
***
## LM Studio (Local)
Run models locally through the [LM Studio](https://lmstudio.ai) server. Like Ollama, no API key is required; you set your local server URL in the Credentials Modal (default `http://localhost:1234/v1`).
### Models
The dropdown reflects **whatever you have loaded** in the LM Studio UI. OpenCompany probes the running server via the official LM Studio Python SDK and reads typed model info (context length, tool-use support, vision).
### Parameters
A model loaded in your LM Studio server
The message to send
Randomness (0-2)
Maximum response length (per-model, roughly context / 4, capped at 4096)
***
## Native SDK vs LangChain Path
OpenCompany uses a hybrid architecture for LLM access:
* **Native SDK path** (`server/services/llm/`): Used by `execute_chat()` for direct chat completions. Returns a normalized `LLMResponse` across providers. This path also serves the OpenAI-compatible providers including DeepSeek, Kimi, Mistral, xAI, Ollama, and LM Studio.
* **LangChain path**: Used by `execute_agent()` and `execute_chat_agent()` for tool-calling agents via LangGraph. All chat-model providers are supported (Groq and Cerebras use this path for direct chat too).
OpenAI-compatible providers (DeepSeek, Kimi, Mistral, xAI, Ollama, LM Studio) reuse the `OpenAIProvider` class with `base_url` read from `server/config/llm_defaults.json`. For the local nodes (Ollama, LM Studio) the `base_url` resolves to your machine's server URL, so traffic never leaves your host. Adding a new OpenAI-compatible provider is largely a config change.
***
## Thinking/Reasoning Modes
Several providers support extended thinking or reasoning modes that show the model's internal reasoning process.
| Provider | Models | Parameter |
| -------- | ----------------------------------- | --------------------------------------------------- |
| Claude | Claude 4.x models | thinkingBudget (tokens) |
| Gemini | Gemini 3.x, 2.5 Pro/Flash | thinkingBudget (tokens) |
| OpenAI | o3, o4-mini, GPT-5.x hybrid | reasoningEffort (low/medium/high; GPT-5 also xhigh) |
| Groq | Qwen3-32b | reasoningFormat (parsed/hidden) |
| Cerebras | Qwen-3-235b | budget thinking |
| DeepSeek | deepseek-v4 (legacy reasoner alias) | reasoning modes |
| Kimi | kimi-k2.6 / k2.5 / k2.7-code | On by default (off in agent mode) |
### Using Thinking Output
The `thinking` field is available in the node output for downstream nodes:
```
{{openaiChatModel.thinking}}
{{anthropicChatModel.thinking}}
```
***
## Comparing Providers
| Feature | OpenAI | Claude | Gemini | OpenRouter | Groq | Cerebras | DeepSeek | Kimi | Mistral |
| -------------- | --------------- | ----------------- | ------------- | --------------- | ---------- | ---------- | ------------ | ------------- | ---------- |
| Speed | Fast | Medium | Fast | Varies | Ultra-fast | Ultra-fast | Fast | Fast | Fast |
| Reasoning | o-series, GPT-5 | Extended thinking | Thinking mode | Model-dependent | Qwen3 | Qwen-3 | v4 reasoning | On by default | - |
| Context Window | 128K-1M | 200K-1M | 1M | Varies | 131K | 131K | up to 1M | 256K | up to 256K |
| Multimodal | Yes | Yes | Yes | Model-dependent | No | No | No | No | No |
| JSON Mode | Yes | No | No | Model-dependent | No | No | Yes | Yes | Yes |
Ollama and LM Studio are local nodes: capabilities depend entirely on the model you have pulled/loaded.
***
## Common Use Cases
### Text Generation
```
Prompt: Write a product description for: {{input.product_name}}
Temperature: 0.8
```
### Data Extraction
```
Prompt: Extract the email and phone from: {{input.text}}
Response Format: json_object
Temperature: 0
```
### Complex Reasoning (with thinking)
```
Model: claude-sonnet-4-6
Thinking Enabled: true
Thinking Budget: 4096
Prompt: Analyze this code and explain the bug: {{input.code}}
```
***
## Tips
Use **temperature 0** for deterministic outputs like data extraction.
Use **temperature 0.7-0.9** for creative writing tasks.
Enable **thinking mode** for complex reasoning tasks that benefit from step-by-step analysis.
Use **OpenRouter** to experiment with different models without managing multiple API keys.
API calls cost money. Monitor your usage in your provider's dashboard.
***
## Error Handling
| Error | Cause | Solution |
| ---------------- | ----------------- | --------------------------- |
| 401 Unauthorized | Invalid API key | Check/update API key |
| 429 Rate Limited | Too many requests | Add delay, reduce frequency |
| 500 Server Error | Provider issue | Retry later |
***
## Related
Use models with memory and tools
Extend Chat Agent capabilities
Tool nodes for AI agents
Build an AI-powered workflow
# Android Nodes
Source: https://docs.opencompany.sh/nodes/android
16 nodes for Android device automation
# Android Nodes
Control and monitor Android devices with 16 specialized nodes.
## Connection Setup
Android device connection is configured in the **Credentials modal** (Android panel), not on the workflow nodes themselves. Once a device is connected there, every Android service node in your workflow uses that connection.
There are two connection methods:
The recommended method. Open the Credentials modal, choose the Android panel, and click **Connect**. A QR code appears - scan it with the companion Android app to pair the device.
The relay uses a two-state model:
* **Connected** - the WebSocket connection to the relay server is active. A QR code is available for pairing.
* **Paired** - an Android device has scanned the QR and is paired through the relay.
Android service nodes require the device to be **paired** to execute (the node status indicator shows green when paired, red otherwise). If the device disconnects while the relay stays connected, a new QR is shown so you can re-pair.
Connect a device over USB with ADB. OpenCompany sets up ADB port forwarding automatically so the backend can reach the device.
Requirements:
* USB debugging enabled in Developer options
* `adb` available on your PATH
Connection is set up once in the Credentials modal. The service nodes below carry only their action and parameters - no connection fields.
***
## System Monitoring (4 nodes)
### Battery Monitor
Monitor battery status and health.
**Actions:** get\_status
**Output:**
```json theme={null}
{
"level": 85,
"is_charging": true,
"status": "charging",
"plugged": "ac",
"temperature": 28.5,
"health": "good",
"technology": "Li-ion"
}
```
### Network Monitor
Check network connectivity.
**Actions:** get\_status
**Output:**
```json theme={null}
{
"is_connected": true,
"type": "wifi",
"wifi_ssid": "MyNetwork",
"is_internet_available": true,
"ip_address": "192.168.1.100",
"signal_strength": -45
}
```
### System Info
Get device information.
**Actions:** get\_info
**Output:**
```json theme={null}
{
"device_model": "Pixel 7",
"manufacturer": "Google",
"android_version": "14",
"api_level": 34,
"total_memory": 8192,
"available_memory": 4096,
"total_storage": 128000,
"available_storage": 64000
}
```
### Location
Get GPS location.
**Actions:** get\_location
**Output:**
```json theme={null}
{
"latitude": 37.7749,
"longitude": -122.4194,
"accuracy": 10.5,
"altitude": 15.2,
"provider": "gps",
"timestamp": "2024-01-15T10:30:00Z"
}
```
***
## App Management (2 nodes)
### App Launcher
Launch applications by package name.
App package name (e.g., com.spotify.music)
**Output:**
```json theme={null}
{
"success": true,
"package": "com.spotify.music",
"message": "App launched"
}
```
**Common Package Names:**
| App | Package |
| -------- | -------------------------- |
| Chrome | com.android.chrome |
| YouTube | com.google.android.youtube |
| Spotify | com.spotify.music |
| WhatsApp | com.whatsapp |
| Gmail | com.google.android.gm |
### App List
Get installed applications.
**Output:**
```json theme={null}
{
"apps": [
{
"name": "Chrome",
"package": "com.android.chrome",
"version": "120.0.6099.230"
}
],
"count": 150
}
```
***
## Automation (6 nodes)
### WiFi Automation
Control WiFi settings.
**Actions:** enable, disable, get\_status, scan
**Output (scan):**
```json theme={null}
{
"networks": [
{
"ssid": "MyNetwork",
"bssid": "00:11:22:33:44:55",
"signal": -45,
"security": "WPA2"
}
]
}
```
### Bluetooth Automation
Control Bluetooth settings.
**Actions:** enable, disable, get\_status, get\_paired\_devices
**Output (paired devices):**
```json theme={null}
{
"devices": [
{
"name": "AirPods Pro",
"address": "AA:BB:CC:DD:EE:FF",
"type": "audio"
}
]
}
```
### Audio Automation
Control volume and audio.
**Actions:** get\_volume, set\_volume, mute, unmute
Volume level 0-100 (for set\_volume)
Stream: media, ringtone, notification, alarm
### Device State Automation
Control device states.
**Actions:** get\_state, set\_airplane\_mode, set\_power\_save
Enable or disable the feature
### Screen Control Automation
Control display settings.
**Actions:** get\_brightness, set\_brightness, wake\_screen, set\_timeout
Brightness level 0-255
Enable automatic brightness
### Airplane Mode Control
Toggle airplane mode.
**Actions:** get\_status, enable, disable
***
## Sensors (2 nodes)
### Motion Detection
Access motion sensors.
**Actions:** get\_accelerometer, get\_gyroscope, detect\_shake
**Output (accelerometer):**
```json theme={null}
{
"x": 0.15,
"y": 9.78,
"z": 0.23,
"timestamp": "2024-01-15T10:30:00Z"
}
```
### Environmental Sensors
Access environmental sensors.
**Actions:** get\_light, get\_pressure, get\_temperature, get\_humidity
**Output:**
```json theme={null}
{
"light": 350,
"pressure": 1013.25,
"temperature": 22.5,
"humidity": 45
}
```
Not all devices have all sensors. Output will indicate unavailable sensors.
***
## Media (2 nodes)
### Camera Control
Control camera functions.
**Actions:** get\_info, take\_photo
Camera to use: back, front
**Output (get\_info):**
```json theme={null}
{
"cameras": [
{
"id": "0",
"facing": "back",
"megapixels": 50
},
{
"id": "1",
"facing": "front",
"megapixels": 12
}
]
}
```
### Media Control
Control media playback.
**Actions:** play, pause, next, previous, get\_volume, set\_volume
***
## Example Workflows
### Battery Alert
```
[Cron (hourly)] --> [Battery Monitor] --> [Python] --> [WhatsApp Send]
```
**Python:**
```python theme={null}
level = input_data.get("level", 100)
if level < 20:
output = {"alert": True, "msg": f"Battery: {level}%"}
else:
output = {"alert": False}
```
### WiFi Toggle via Webhook
```
[Webhook Trigger] --> [WiFi Automation]
```
**Webhook path:** `/wifi`
**WiFi Action:** `{{webhookTrigger.body.action}}`
```bash theme={null}
curl -X POST http://localhost:5678/webhook/wifi \
-d '{"action": "enable"}'
```
### Morning Routine
```
[Cron (7:00 AM)] --> [WiFi Enable] --> [App Launcher (News)]
|
v
[Audio: Vol 50%]
```
***
## Troubleshooting
```bash theme={null}
# Check ADB connection
adb devices
# Restart ADB
adb kill-server
adb start-server
```
Some features require:
* USB debugging enabled
* Developer options enabled
* Specific app permissions
* Open the Credentials modal (Android panel) and check the status: the device must be **paired**, not just **connected**
* If only connected, re-scan the QR code with the companion app to pair
* Ensure the companion Android app is running on the device
* Use Reconnect in the Android panel if the relay connection dropped
***
## Related
Step-by-step guide
Trigger Android actions via HTTP
# Browser Automation
Source: https://docs.opencompany.sh/nodes/browser
Drive a real browser from your workflows: navigate, click, type, and extract
Three families of nodes touch the web, and they solve different problems. **Web search** (see [Web Search](/nodes/search)) finds pages and returns snippets. **Scraping** (see [Scraping & Proxies](/nodes/scraping)) fetches and extracts content from pages you already know. **Browser automation** -- this page -- drives an actual browser session so a workflow or agent can navigate, click, type, and read pages that require real interaction.
Two nodes live here:
| Node | Engine | Maturity |
| --------------- | ------------------------------------------------------------------------------ | -------------------- |
| Browser | `agent-browser` CLI with a bundled Chrome-for-Testing (or your system browser) | Stable |
| Browser Harness | Your real Chrome over raw CDP (`browser-use/browser-harness`) | Alpha / experimental |
Default to **Browser**. Reach for **Browser Harness** when the task needs your real Chrome profile and logins, bot-hostile or shadow-DOM-heavy sites, iframes, or raw CDP access.
***
## Browser
Interactive browser automation via the `agent-browser` CLI. Also usable as an AI agent tool (tool name `browser`).
**First-use install is automatic.** The node installs `agent-browser` from npm into OpenCompany's shared package tree on first use (`npm` must be on PATH), then fetches the Chrome-for-Testing runtime -- a roughly 150 MB Chromium download -- so expect the very first run to take a while.
### Operations
14 discrete operations plus a `batch` meta-operation:
| Operation | What it does |
| ----------------------- | ----------------------------------------------------------- |
| `navigate` | Open a URL (requires **URL**) |
| `click` | Click an element (requires **Selector**) |
| `type` | Type text keystroke-by-keystroke into an element |
| `fill` | Set an input's value directly |
| `screenshot` | Capture the page (optional full-page, annotation, png/jpeg) |
| `snapshot` | Accessibility-tree snapshot with stable `@eN` element refs |
| `get_text` / `get_html` | Extract text or HTML from an element |
| `eval` | Evaluate a JavaScript expression (requires **Expression**) |
| `wait` | Wait for a selector to appear |
| `scroll` | Scroll in a direction by an amount |
| `select` | Choose a dropdown option |
| `console` / `errors` | Read the page's console output / errors |
| `batch` | Run a JSON array of commands in one call |
Operations that act on an element -- `click`, `type`, `fill`, `get_text`, `get_html`, `wait`, `select` -- require **Selector** (a CSS selector or an `@eN` ref from a snapshot).
The recommended agent loop is `navigate` -> `snapshot` -> `click`/`fill` using the `@eN` refs the snapshot returned -> `snapshot` again to verify.
### Key parameters
One of the operations above
Target URL (required for `navigate`)
CSS selector or `@eN` ref from a snapshot (required for element operations)
Session id. Leave empty to use a per-run session -- cookies, open tabs, and auth persist across sequential operations that share the same session, and every browser call in one workflow/agent run (including delegated sub-agents) reuses one browser instance.
`chrome`, `edge`, `chromium`, `bundled_explicit` (the bundled Chrome-for-Testing), or `custom` (set **Executable Path**)
Show the browser window; disable for headless runs
Per-action timeout in seconds (1-600)
Additional knobs: `full_page` / `annotate` / `screenshot_format` / `screenshot_quality` (screenshots), `direction` / `amount` (scroll), `commands` (batch JSON), `auto_connect` (reuse an already-running CDP browser), `chrome_profile`, `user_agent`, `proxy`, `action_delay`, `executable_path`, `new_window`.
### Output
```json theme={null}
{
"operation": "get_text",
"data": "...the CLI's result for the operation...",
"session": "opencompany_a1b2c3d4"
}
```
`data` is whatever `agent-browser` returned for the operation (parsed JSON when available, raw text otherwise). Responses larger than 100 KB are truncated.
### Sessions and limits
* Concurrent browser instances are capped by `BROWSER_MAX_INSTANCES` (default 3); when the cap would be exceeded, the oldest session is closed first.
* Idle browsers shut themselves down after `BROWSER_IDLE_TIMEOUT_MS` (default 600000 ms; 0 disables).
***
## Browser Harness
**Browser Harness is alpha and experimental.** It wraps the upstream `browser-use/browser-harness` project (v0.1.x) and executes agent-authored Python with your real, logged-in Chrome attached. Treat it as a power tool: it is visible in dev mode only, and its operations are marked destructive. Default to the stable **Browser** node.
Browser Harness drives your **real Chrome** over the Chrome DevTools Protocol (CDP) -- no Playwright, no bundled Chromium. That means it sees your actual profile, cookies, and logins, which is exactly why it exists: sites that defeat headless automation or need your session state.
It is a sibling of the **Browser** node, not a replacement:
| | Browser (agent-browser) | Browser Harness |
| ------------- | -------------------------------------------------------- | ---------------------------------------- |
| Engine | npm CLI + bundled Chrome-for-Testing (or system browser) | Your real Chrome over raw CDP |
| Interaction | Accessibility tree, `@eN` refs | Screenshots + coordinate clicks + `js()` |
| Sessions | Named sessions, instance cap, idle timeout | One shared browser |
| Agent surface | Structured operations | Freeform Python against helpers |
| Maturity | Stable | Alpha (v0.1.x) |
### Chrome must be started with remote debugging
The harness needs a CDP-reachable Chrome. It discovers one in this order:
1. A `BU_CDP_URL` (or `BU_CDP_WS`) environment variable pointing at a dedicated automation Chrome.
2. The `DevToolsActivePort` file Chrome writes when you enable **chrome://inspect/#remote-debugging** ("Allow remote debugging for this browser instance").
3. A port probe on 9222/9223 -- e.g. Chrome launched with `--remote-debugging-port=9222`.
If calls fail with connection guidance, run the **doctor** operation first -- it returns the full connection checklist.
### Operations
`run_python` (primary), `goto`, `screenshot`, `js`, `tabs`, or `doctor`
Python for `run_python`. Roughly 25 helpers are pre-imported (`goto_url`, `click_at_xy`, `capture_screenshot`, `js`, `fill_input`, `wait_for_load`, ...). Print a JSON object as the final line for structured output.
URL to open (for `goto`)
JavaScript to evaluate in the page (for `js`)
Capture the full scrollable page (for `screenshot`)
Script timeout in seconds (5-600)
The driving model is "the LLM writes Python": agents follow a see-act-verify loop of `capture_screenshot()` to see the page, `click_at_xy(x, y)` to interact, `wait_for_load()`, then `js(...)` for DOM reads.
### Output
```json theme={null}
{
"operation": "run_python",
"data": "…whatever the script printed…"
}
```
### Install
Install is lazy: first use runs `uv tool install --python 3.12 browser-harness`, so `uv` must be on PATH. If the node reports that browser-harness could not be installed, install uv and retry -- it installs automatically on the next use.
***
## Example: check a page and summarize
Fetch a live page in a real browser, extract the visible text, and have an agent summarize it:
```
[Cron Scheduler] --> [Browser (navigate)] --> [Browser (get_text)] --> [AI Agent] --> [Console]
```
1. **Browser** #1 -- **Operation**: `navigate`, **URL**: `https://news.ycombinator.com`.
2. **Browser** #2 -- **Operation**: `get_text`, **Selector**: `body`. Leave **Session** empty on both nodes; they share the per-run session automatically, so the second node reads the page the first one opened.
3. **AI Agent** -- prompt it to summarize the extracted text.
Alternatively, connect a single **Browser** node to the agent's tools input and let the agent drive the navigate/snapshot/click loop itself.
***
## Tips
Prefer `snapshot` + `@eN` refs over hand-written CSS selectors when an agent drives the browser -- the refs are stable within a page state and survive minor DOM differences.
Leave **Session** empty in agent workflows. Every call in the same run reuses one browser automatically, while separate runs stay isolated.
The very first Browser run downloads the Chrome-for-Testing runtime (\~150 MB). Later runs start fast.
***
## Related
Fetch and extract known pages without a full browser
Find pages before you open them
Let an agent drive the browser as a tool
Post-process extracted content
# Code Executors
Source: https://docs.opencompany.sh/nodes/code
Run Python, JavaScript, TypeScript, and sandboxed Monty code inside workflows
Code executor nodes run short scripts as workflow steps -- the glue for transforms, conditionals, and formatting that would be awkward as separate nodes. Data from connected upstream nodes arrives in an `input_data` dictionary, anything you `print()` (or `console.log()`) is captured as `console_output`, and every executor doubles as an AI agent tool when connected to an agent's tools input.
## Choosing an executor
| Node | Language | Sandboxed? | Runtime |
| ------------------- | ------------- | ------------------------------------------------------- | ------------------------------------- |
| Python Executor | Python | No -- trusted input only | Backend Python process |
| Monty Executor | Python subset | Yes -- deny-by-default, enforced time and memory limits | Monty interpreter (Rust) |
| JavaScript Executor | JavaScript | No | Persistent Node.js server |
| TypeScript Executor | TypeScript | No | Persistent Node.js server (via `tsx`) |
Rule of thumb: **Monty Executor** for AI-generated or untrusted code (its limits are actually enforced), **Python Executor** for your own quick transforms, **JavaScript/TypeScript Executor** when the logic is more natural in JS or needs npm-ecosystem idioms.
***
## Python Executor
Runs Python directly in the backend process. Assign your result to a variable named `output` -- that value becomes the node's output.
### Parameters
Python source. Must assign to `output` to emit a value.
Accepted and validated (1-600 seconds) but **not enforced** -- a hanging script blocks the backend. Use **Monty Executor** when you need an enforced limit.
### Pre-injected names
A fixed set of names is available in the namespace without importing:
* `math` -- mathematical functions
* `json` -- JSON parsing
* `datetime` -- date/time handling
* `re` -- regular expressions
* `random` -- random number generation
* `Counter`, `defaultdict` -- collections helpers
Reference them directly, for example `math.sqrt(4)` or `json.loads(raw)`.
### Imports are blocked
`import` statements are not available -- the sandboxed builtins have no `__import__`, so `import requests` fails with an error explaining that imports are not allowed and listing the pre-injected names. The fix: use the pre-injected modules directly, or reach for the **Process Manager** node when you genuinely need another module or an external program.
### Output
```json theme={null}
{
"output": {"word_count": 12, "has_question": true},
"console_output": "debug line printed with print()\n"
}
```
If the code raises, the error message includes the exception type and line number -- and any `print()` output captured before the failure is preserved in the error.
### Example: data processing
```python theme={null}
# Access input data
message = input_data.get("text", "")
# Process
word_count = len(message.split())
has_question = "?" in message
# Set output
output = {
"word_count": word_count,
"has_question": has_question,
"summary": f"Message has {word_count} words"
}
```
The Python Executor is **not** a security boundary. Code runs in the server process with its full OS privileges, and the builtins whitelist can be escaped by determined code. Treat it as trusted-input only; use **Monty Executor** for untrusted or AI-generated code.
***
## Monty Executor
A hard-sandboxed alternative that runs code through [Monty](https://github.com/pydantic/monty), a Python subset implemented in Rust. It is deny-by-default -- no filesystem, no network, no host access -- unless you grant specific capabilities, and its time and memory limits are **enforced** by the interpreter. Exposed to agents as the `sandboxed_python` tool.
Unlike the other executors, you do not assign to `output`: the program's **last expression** becomes the output.
### Parameters
Python (Monty subset) source. The last expression is returned as `output`.
Wall-clock limit in seconds (1-600), enforced
Memory limit in MB (16-2048), enforced
Opt-in grants; empty means fully isolated. `http_get` enables an SSRF-guarded `http_get(url)` function for public hosts; `workspace_read` / `workspace_write` mount the per-workflow workspace at `/workspace` (read-only / read-write).
### Language subset
Supported: `def`, closures, `lambda`, `if`/`for`/`while`, `try`/`except`, comprehensions, f-strings, `async def`/`await`, and `import math`, `import json`, `import re`.
Not supported: `class`, `yield`/generators, `with`, `match`, and imports of `random`, `collections`, or `os`. Unsupported features fail with a clear error suggesting the Python Executor instead.
### Output
```json theme={null}
{
"output": [1, 4, 9, 16],
"console_output": ""
}
```
### Example
```python theme={null}
values = input_data.get("numbers", [1, 2, 3, 4])
[v * v for v in values]
```
The list comprehension is the last expression, so it becomes `output`.
***
## JavaScript Executor
Runs JavaScript on a persistent Node.js executor server that the backend starts on demand at the first JS/TS node execution (default `http://localhost:5682`) -- no per-call process spawn. Assign your result to `output`; `console.log` and friends are captured as `console_output`.
### Parameters
JavaScript source. Must assign to `output`.
Script timeout in seconds (1-600), forwarded to the Node.js server as milliseconds
### Output
```json theme={null}
{
"output": {"items": 3},
"console_output": "processing...\n"
}
```
### Example
```javascript theme={null}
const items = input_data.items || [];
const total = items.reduce((sum, i) => sum + (i.price || 0), 0);
output = {
count: items.length,
total: Math.round(total * 100) / 100
};
```
If the executor server is not running, the node fails with a clear "executor unavailable at localhost:5682" error rather than hanging.
***
## TypeScript Executor
Identical to the JavaScript Executor except the script runs through `tsx`, so TypeScript type annotations parse without error. Same parameters (**Code**, **Timeout**), same output shape, same Node.js server. Types are erased at runtime -- interfaces and type aliases are compile-time only, and the returned `output` is still plain JSON.
```typescript theme={null}
interface Item { name: string; price: number }
const items: Item[] = input_data.items || [];
output = items.filter(i => i.price > 10).map(i => i.name);
```
Compile errors from `tsx` surface verbatim as the node's error message.
***
## Passing data in and out
**In: `input_data`.** Each executor receives the outputs of its connected upstream nodes as a dictionary keyed by the source node's id. Inspect it defensively (`input_data.get(...)` / `input_data.x || fallback`) since the exact keys depend on what is wired in.
**Out: the return contract.**
| Executor | How to emit a result |
| -------------------------------- | ------------------------------- |
| Python Executor | Assign to the `output` variable |
| JavaScript / TypeScript Executor | Assign to the `output` variable |
| Monty Executor | The program's last expression |
All four return the same payload shape: `{output, console_output}`. Downstream nodes can reference the result with template variables (`{{.output}}`).
**Workspace access.** The per-workflow workspace directory is available too: the Python Executor exposes a `workspace_dir` variable in the namespace; the JavaScript/TypeScript Executors inject it as `input_data.workspace_dir`; the Monty Executor sees the workspace at `/workspace` only when a `workspace_read` / `workspace_write` capability is granted.
**JSON-only transport (JS/TS).** The `output` value must survive `JSON.stringify` -- functions, `undefined`, `BigInt`, and circular references are stripped or rejected.
***
## Example: transform JSON from a webhook
Receive a webhook, reshape its payload, and respond:
```
[Webhook Trigger] --> [Python Executor] --> [Webhook Response]
```
Python Executor code:
```python theme={null}
# The webhook trigger's output arrives in input_data
payload = {}
for value in input_data.values():
if isinstance(value, dict) and "body" in value:
payload = value.get("body") or {}
orders = payload.get("orders", [])
total = sum(o.get("amount", 0) for o in orders)
output = {
"order_count": len(orders),
"total_amount": total,
"status": "ok" if orders else "empty"
}
```
The Webhook Response node can then return the executor's `output` to the caller via a template variable.
***
## Tips
Use the **Python Executor** for conditional logic instead of multiple workflow branches -- one small script often replaces a tangle of nodes.
Wiring an executor to an AI Agent's tools input turns it into a code tool (`python_code`, `sandboxed_python`, `javascript_code`, `typescript_code`). For agent-written code, prefer **Monty Executor** -- its limits are enforced.
`print()` / `console.log` liberally while developing: everything lands in `console_output`, and on Python errors the output captured before the failure is preserved in the error message.
Only the **Monty Executor** enforces its timeout. Python Executor scripts run until they finish -- a tight infinite loop blocks the backend for everyone.
***
## Related
Read and write workspace files, run shell commands
Trigger workflows over HTTP and respond
Give agents code execution as a tool
Run transforms on a schedule
# Discord Nodes
Source: https://docs.opencompany.sh/nodes/discord
Discord bot messaging, server actions, message triggers, and slash commands
# Discord Nodes
Send messages, manage servers, react to incoming messages, and handle slash commands through a Discord bot.
## Available Nodes
| Node | Type | Purpose |
| ------------------- | ---------------- | --------------------------------------------------------------------- |
| Discord Send | Action / AI Tool | Send text, embeds, and a file attachment to a channel or user |
| Discord API | Action / AI Tool | Servers, channels, messages, reactions, threads, attachment downloads |
| Discord Receive | Trigger | Fire a workflow when a message arrives |
| Discord Interaction | Trigger | Fire a workflow on a slash command or button click |
Discord Send and Discord API are dual-purpose: they work as standalone workflow nodes **and** as AI Agent tools when connected to an agent's tools handle.
## Setup Requirements
1. Create an application in the [Discord Developer Portal](https://discord.com/developers/applications)
2. Open **Bot** in the left sidebar and copy the token
3. Under **Bot > Privileged Gateway Intents**, enable **Message Content Intent**
4. Under **OAuth2 > URL Generator**, select the `bot` scope and the permissions you need, then open the generated URL to invite the bot to your server
**Enable the Message Content intent before connecting.** Without it the bot still connects normally, but every incoming message arrives with empty text and no error is reported anywhere. Discord only exempts messages that mention the bot directly or are sent in DMs. The credential check tells you whether the intent is enabled.
### Connecting
There is no "connect" workflow node. The bot is managed from the Credentials panel:
1. Open the **Credentials** modal and select the **Discord** panel
2. Paste the bot token and validate it. A successful check shows the bot's username and whether the Message Content intent is on
3. Click **Connect** to open the gateway connection that Discord Receive listens on
Discord Send and Discord API work as soon as the token is saved. Only the triggers need the connection.
### Finding IDs
Discord addresses everything by numeric ID. Enable **Developer Mode** under **User Settings > Advanced**, then right-click any server, channel, user, or message and choose **Copy ID**.
### Multiple bots
Every Discord node has an **Account** dropdown. Leave it blank to use the bot saved in the Credentials panel. To run more than one bot, save additional tokens under separate accounts; each account keeps its own gateway connection and its own status.
An AI agent cannot change which bot a node acts as. The account is operator configuration, and it is removed from anything the model supplies. This matters because an incoming Discord message is the most likely source of a prompt injection.
***
## Discord Send
Post a message to a channel, or open a direct message with a user.
### Parameters
`channel` posts in a channel; `user` opens a DM with a user
Channel ID. Shown when target type is `channel`
User ID. Shown when target type is `user`. A DM channel is opened automatically
Message text. Text longer than 2000 characters is split across several messages
Up to 10 embed objects, in Discord's embed format
A file from the workflow workspace to attach
Reply to an existing message by ID
Hide link previews on this message
Send as a text-to-speech message
### Output
```json theme={null}
{
"message_id": "1234567890123456789",
"channel_id": "9876543210987654321",
"parts": 2,
"message_ids": ["1234567890123456789", "1234567890123456790"]
}
```
`parts` and the full `message_ids` list appear only when the text was long enough to split. `message_id` is always the first message.
***
## Discord API
The rest of the REST surface, selected by the **Operation** dropdown.
| Operation | What it does |
| ---------------------- | ------------------------------------------------------ |
| `list_guilds` | Servers the bot is a member of |
| `list_channels` | Channels in a server |
| `get_channel` | One channel's details |
| `list_messages` | Recent messages in a channel |
| `get_message` | One message |
| `edit_message` | Replace a message's text |
| `delete_message` | Delete a message |
| `add_reaction` | React to a message with an emoji |
| `pin_message` | Pin a message |
| `create_thread` | Start a public thread from a channel |
| `download_attachments` | Save files from an incoming message into the workspace |
| `interaction_respond` | Answer a slash command or button click |
| `execute_webhook` | Post through a Discord webhook URL, without a bot |
| `custom` | Call any Discord API route |
### Downloading attachments
Discord Receive reports attachments as metadata only. To get the files, connect it to a Discord API node with the `download_attachments` operation and map the trigger's `attachments` output into the **Attachments** field. Each file is saved into the workflow workspace and returned as a reference the rest of the workflow can use.
Discord's download links are signed and expire after a day, so download in the same workflow run that received the message rather than storing the link.
### Webhooks
`execute_webhook` posts through a Discord **webhook URL** (Server Settings > Integrations > Webhooks). No bot token is involved, so it can reach channels the bot is not in. The URL is the credential: keep it out of shared workflow exports.
### Custom routes
`custom` calls any path under Discord's API with the bot's token, for example `users/@me` or `channels/123/messages`. Only relative paths are accepted; a full URL or a path containing `..` is refused.
***
## Discord Receive
Trigger node that fires when a message arrives in a server channel or a DM. Requires the bot to be **connected** from the Credentials panel.
### Parameters
`all`, `guild` (server channels only), or `dm` (direct messages only)
Only fire for messages in this server
Only fire for messages in this channel
Only fire for messages from this user
Comma-separated words. Fires only if the message contains one of them
Only fire when the bot is mentioned. Works even without the Message Content intent
Only fire for messages that include a file
Ignore messages from other bots. Turning this off can create a loop between two bots replying to each other
### Output
```json theme={null}
{
"message_id": "1234567890123456789",
"channel_id": "9876543210987654321",
"channel_name": "general",
"guild_id": "1111111111111111111",
"guild_name": "My Server",
"is_dm": false,
"author_id": "2222222222222222222",
"author_name": "alice",
"author_display_name": "Alice",
"author_is_bot": false,
"content": "hello there",
"timestamp": "2026-08-14T10:00:00+00:00",
"attachments": [
{
"id": "3333333333333333333",
"filename": "photo.png",
"size": 48213,
"url": "https://cdn.discordapp.com/attachments/...",
"content_type": "image/png",
"width": 800,
"height": 600
}
],
"has_attachments": true,
"mentions_me": false,
"reply_to_message_id": null
}
```
All IDs are strings. `guild_id` is `null` for a direct message. The bot's own messages never fire the trigger.
***
## Discord Interaction
Trigger node that fires on a slash command, button click, select menu, or modal submit. Interactions arrive over HTTP rather than the gateway, so this needs extra setup.
### Setup
1. In the Developer Portal, under **General Information**, copy the **Public Key** and paste it into the Discord credential's **Public Key** field
2. Set the application's **Interactions Endpoint URL** to `https:///api/discord/interactions`. Discord tests the URL when you save it; the server must be reachable from the internet
3. Register your slash commands with Discord (the Developer Portal or the API)
Setting an Interactions Endpoint URL changes where Discord delivers **all** interactions for that application. They arrive at the URL and stop arriving over the gateway. This is a per-application setting on Discord's side.
For a second bot account, use `https:///api/discord/interactions/`.
### Parameters
`all`, `command` (slash commands), `component` (buttons and menus), or `modal`
Only fire for this slash command. A leading `/` is fine
Only fire for the button, menu, or modal with this custom ID
Only fire for interactions in this server
### Output
```json theme={null}
{
"interaction_id": "4444444444444444444",
"interaction_type": 2,
"command_name": "ping",
"custom_id": null,
"options": { "target": "world" },
"channel_id": "9876543210987654321",
"guild_id": "1111111111111111111",
"user_id": "2222222222222222222",
"user_name": "alice",
"interaction_ref": "k3Jd8...opaque"
}
```
`options` contains the slash command's arguments by name. `interaction_type` is `2` for a command, `3` for a component, `5` for a modal.
### Replying to an interaction
Discord requires an acknowledgement within three seconds, so the trigger sends one immediately and the workflow replies afterwards. Connect a **Discord API** node with the `interaction_respond` operation, map the trigger's `interaction_ref` into its **Interaction reference** field, and set the reply text. The reply must be sent within 15 minutes of the interaction.
`interaction_ref` is an opaque handle, not Discord's interaction token. The token can post messages as your app, so it never appears in workflow output. References are held in memory and do not survive a server restart.
***
## User authorization (OAuth2)
To act on behalf of a Discord user rather than the bot, fill in the credential's **OAuth2 Client ID** and **Client Secret** (Developer Portal > OAuth2), add `https:///api/discord/callback` as a redirect URI there, then use **Connect** on the user panel. Only the `identify` and `guilds` scopes are requested.
***
## Troubleshooting
The Message Content intent is not enabled. Turn it on under **Bot > Privileged Gateway Intents** in the Developer Portal, then reconnect. Messages that mention the bot, and all DMs, carry text regardless.
Connect the bot from the Credentials panel before deploying. A deployed trigger listens on the gateway connection, and refuses to arm if there is none.
Discord verifies the URL by sending a test request that must be rejected with a signature error. Check that the **Public Key** in the credential matches the application, and that the server is reachable from the internet over HTTPS.
Discord limits each bot to 50 requests per second, and separately blocks hosts that send too many invalid requests. Short waits are handled automatically. A long block usually means a wrong token or a channel the bot cannot see; fix the underlying error rather than retrying.
Check the bot's role and the channel's permission overrides in Discord. The bot needs **View Channel** and **Send Messages** at minimum, and **Attach Files** to send attachments.
# Document Processing
Source: https://docs.opencompany.sh/nodes/documents
RAG pipeline nodes for document ingestion, processing, and vector storage
# Document Processing
OpenCompany provides a complete RAG (Retrieval-Augmented Generation) pipeline for processing documents, generating embeddings, and storing vectors for semantic search.
## Pipeline Overview
```
[HTTP Scraper] --> [File Downloader] --> [Document Parser] --> [Text Chunker] --> [Embedding Generator] --> [Vector Store]
```
| Stage | Node | Purpose |
| ----------- | ------------------- | ---------------------------------- |
| 1. Collect | HTTP Scraper | Scrape URLs from web pages |
| 2. Download | File Downloader | Download files in parallel |
| 3. Parse | Document Parser | Extract text from documents |
| 4. Chunk | Text Chunker | Split text into overlapping chunks |
| 5. Embed | Embedding Generator | Generate vector embeddings |
| 6. Store | Vector Store | Store and query vectors |
***
## HTTP Scraper
Scrapes links from web pages with support for pagination and date ranges.
### Modes
| Mode | Description | Use Case |
| ------ | ---------------------------- | ---------------------------- |
| single | One request to the URL | Simple page scraping |
| date | Iterate through a date range | News archives, dated content |
| page | Iterate through page numbers | Multi-page listings |
### Parameters
URL template. Use `{date}` (date mode) or `{page}` (page mode) placeholders for iteration.
Iteration mode: single, date, or page
CSS selector for links to extract from each fetched page
JSON string of request headers
Start date for date mode (YYYY-MM-DD)
End date for date mode (YYYY-MM-DD)
Token in the URL replaced with each date (date mode)
First page number (page mode)
Last page number, inclusive (page mode)
Safety cap on the number of pages fetched (1-1000)
Route requests through a residential proxy provider. When enabled, exposes `proxy_provider`, `proxy_country`, and `session_type` (rotating/sticky).
### Output
```json theme={null}
{
"items": [
{"url": "https://example.com/article1.pdf", "text": "Article 1", "source_url": "https://news.site/archive/2025-01-01"},
{"url": "https://example.com/article2.pdf", "text": "Article 2", "source_url": "https://news.site/archive/2025-01-01"}
],
"item_count": 2,
"errors": []
}
```
### Example: Scrape News Archive
```
URL: https://news.site/archive/{date}
Iteration Mode: date
Start Date: 2025-01-01
End Date: 2025-01-31
Link Selector: a.article-link
```
***
## File Downloader
Downloads files from URLs in parallel using semaphore-based concurrency.
### Parameters
Directory to save downloaded files. Defaults to a `downloads/` folder inside the workflow workspace.
Maximum parallel downloads (1-32)
Skip files that already exist
Download timeout in seconds (1-600)
### Input
Accepts an array of `items` with a `url` field (from HTTP Scraper), or a plain `urls` list:
```json theme={null}
{
"items": [
{"url": "https://example.com/file1.pdf"},
{"url": "https://example.com/file2.pdf"}
]
}
```
### Output
Counts plus a `files` array describing the successful downloads:
```json theme={null}
{
"downloaded": 2,
"skipped": 0,
"failed": 0,
"files": [
{"status": "downloaded", "url": "...", "path": "/output/file1.pdf", "filename": "file1.pdf", "size": 1024000},
{"status": "downloaded", "url": "...", "path": "/output/file2.pdf", "filename": "file2.pdf", "size": 2048000}
],
"output_dir": "/output"
}
```
***
## Document Parser
Parses documents to extract text content using configurable parsers.
### Parsers
| Parser | Description | Supported Formats |
| ------------- | -------------------- | ------------------------ |
| PyPDF | Fast PDF parsing | PDF |
| Marker | GPU-accelerated OCR | PDF (scanned documents) |
| Unstructured | Multi-format parsing | PDF, DOCX, HTML, TXT, MD |
| BeautifulSoup | HTML parsing | HTML |
### Parameters
Parser to use: pypdf, marker, unstructured, beautifulsoup
Single file path to parse (takes precedence over `input_dir`)
Directory to scan for files matching `file_pattern`
Glob pattern used when scanning `input_dir` (e.g. `*.pdf`, `*.html`)
### Input
Set `file_path` for a single file, or `input_dir` + `file_pattern` for a directory scan.
### Output
```json theme={null}
{
"documents": [
{
"source": "/output/file1.pdf",
"filename": "file1.pdf",
"content": "Extracted text content...",
"length": 24500,
"parser": "pypdf"
}
],
"parsed_count": 2,
"failed": []
}
```
### Parser Comparison
| Feature | PyPDF | Marker | Unstructured | BeautifulSoup |
| ------------ | ----- | --------- | ------------ | ------------- |
| Speed | Fast | Slow | Medium | Fast |
| Accuracy | Good | Excellent | Good | Good |
| OCR | No | Yes (GPU) | Optional | No |
| Formats | PDF | PDF | Many | HTML |
| GPU Required | No | Yes | No | No |
***
## Text Chunker
Splits text into overlapping chunks for embedding generation.
### Strategies
| Strategy | Description | Best For |
| --------- | ------------------------------------- | ---------------------- |
| recursive | Split by paragraphs, sentences, words | Most documents |
| markdown | Preserve markdown structure | Markdown files |
| token | Falls back to recursive splitting | Consistent chunk sizes |
### Parameters
Chunking strategy: recursive, markdown, or token
Target chunk size in characters (100-8000)
Overlap between chunks (0-1000)
### Input
Accepts a `documents` array (with a `content` field, from Document Parser) or a plain `text` string:
```json theme={null}
{
"documents": [
{"source": "...", "content": "Long document text..."}
]
}
```
### Output
```json theme={null}
{
"chunks": [
{
"source": "/output/file1.pdf",
"chunk_index": 0,
"content": "Chunk 1 text...",
"length": 1000
}
],
"chunk_count": 50
}
```
### Choosing Chunk Size
| Document Type | Recommended Size | Overlap |
| -------------- | ---------------- | ------- |
| Technical docs | 500-1000 | 100-200 |
| Articles | 1000-1500 | 200-300 |
| Books | 1500-2000 | 300-400 |
| Code | 500-800 | 100-150 |
***
## Embedding Generator
Generates vector embeddings from text chunks using various providers.
### Providers
| Provider | Model | Dimensions | Cost |
| ----------- | ---------------------- | ---------- | ------------ |
| HuggingFace | BAAI/bge-small-en-v1.5 | 384 | Free (local) |
| HuggingFace | BAAI/bge-large-en-v1.5 | 1024 | Free (local) |
| OpenAI | text-embedding-3-small | 1536 | Paid |
| OpenAI | text-embedding-3-large | 3072 | Paid |
| Ollama | nomic-embed-text | 768 | Free (local) |
### Parameters
Embedding provider: huggingface (local), openai, or ollama (local server)
Model name for the chosen provider. Override when switching provider (e.g. `text-embedding-3-small` for OpenAI).
Batch size for embedding generation (1-256)
OpenAI API key. Passed as a node parameter (only used when provider is openai).
### Input
Accepts a `chunks` array (from Text Chunker), each with a `content` field:
```json theme={null}
{
"chunks": [
{"content": "Chunk text...", "source": "...", "chunk_index": 0}
]
}
```
### Output
Parallel arrays: `embeddings` (one vector per chunk) plus the original `chunks` echoed back for pairing.
```json theme={null}
{
"embeddings": [[0.123, -0.456, ...]],
"embedding_count": 50,
"dimensions": 384,
"chunks": [{"content": "Chunk text...", "source": "...", "chunk_index": 0}],
"provider": "huggingface",
"model": "BAAI/bge-small-en-v1.5"
}
```
***
## Vector Store
Stores and queries vector embeddings using various backends.
### Backends
| Backend | Description | Best For |
| -------- | ------------------ | --------------------------- |
| ChromaDB | Local SQLite-based | Development, small datasets |
| Qdrant | High-performance | Production, large datasets |
| Pinecone | Cloud-hosted | Serverless, managed service |
### Operations
| Operation | Description |
| --------- | -------------------------------- |
| store | Add embeddings to the store |
| query | Search for similar documents |
| delete | Remove documents by ID or filter |
### Parameters
Vector store backend: chroma, qdrant, or pinecone
Operation: store, query, or delete
Collection/index name
Number of results for the query operation (1-100)
Single query vector for the query operation (from Embedding Generator)
Vector IDs to remove for the delete operation
ChromaDB persistence directory (chroma backend)
Qdrant server URL (qdrant backend)
Pinecone API key, passed as a node parameter (pinecone backend)
### Store Operation
Input (from Embedding Generator) — pass both `embeddings` and `chunks`:
```json theme={null}
{
"embeddings": [[0.123, -0.456, ...]],
"chunks": [{"content": "...", "source": "file1.pdf", "chunk_index": 0}]
}
```
Output:
```json theme={null}
{
"stored_count": 50,
"collection_count": 50,
"collection_name": "documents",
"backend": "chroma",
"operation": "store"
}
```
### Query Operation
Query with a precomputed embedding vector (embed your question first, then feed it here):
```json theme={null}
{
"query_embedding": [0.123, -0.456, ...],
"top_k": 5
}
```
Output — the match shape differs by backend (`distance` for Chroma, `score` for Qdrant/Pinecone):
```json theme={null}
{
"matches": [
{
"id": "a1b2c3...",
"document": "Relevant chunk text...",
"metadata": {"source": "file1.pdf", "chunk_index": 5},
"distance": 0.11
}
],
"collection_name": "documents",
"backend": "chroma",
"operation": "query"
}
```
***
## Complete RAG Pipeline Example
### Workflow
```
[HTTP Scraper] --> [File Downloader] --> [Document Parser] --> [Text Chunker] --> [Embedding Generator] --> [Vector Store]
```
### Configuration
1. **HTTP Scraper**
* URL: `https://docs.example.com/api/{page}`
* Iteration Mode: page
* Link Selector: `a.pdf-link`
2. **File Downloader**
* Output Dir: `./downloads`
* Max Workers: 10
3. **Document Parser**
* Parser: pypdf
4. **Text Chunker**
* Strategy: recursive
* Chunk Size: 1000
* Overlap: 200
5. **Embedding Generator**
* Provider: huggingface
* Model: BAAI/bge-small-en-v1.5
6. **Vector Store**
* Backend: chroma
* Operation: store
* Collection: api-docs
### Querying the Pipeline
Create a separate workflow for querying:
```
[Webhook Trigger] --> [Embedding Generator] --> [Vector Store (query)] --> [AI Agent] --> [Webhook Response]
```
The AI Agent receives relevant context from the vector store to answer questions.
***
## Tips
Start with **ChromaDB** for development - no setup required.
Use **HuggingFace** embeddings for free local processing without API keys.
Adjust **chunk size** based on your embedding model's context window.
Include meaningful **metadata** (source, page, section) for better retrieval context.
GPU is required for the **Marker** parser (OCR). Use **PyPDF** for non-scanned documents.
***
## Related
Use RAG context with AI agents
Trigger and respond over HTTP
AI providers for generation
Run the RAG pipeline on a schedule
# Email
Source: https://docs.opencompany.sh/nodes/email
Send, read, and react to email over IMAP and SMTP with any mail provider
# Email
Three provider-agnostic email nodes that work with any IMAP/SMTP mail account: send messages, read and manage your mailbox, and trigger workflows when new mail arrives. Under the hood they drive the [Himalaya](https://github.com/pimalaya/himalaya) CLI, so anything Himalaya can talk to, these nodes can too.
If your mail lives in Gmail and you want richer, API-native operations (labels, Gmail search syntax, OAuth sign-in), use the dedicated [Google Workspace](/nodes/google-workspace) nodes instead. The nodes on this page are the right choice for Outlook, Yahoo, iCloud, ProtonMail, Fastmail, self-hosted servers — or Gmail over plain IMAP.
| Node | Kind | What it does |
| ------------- | ----------------- | ------------------------------------------------------------- |
| Email Send | Action + AI tool | Send an email over SMTP |
| Email Read | Action + AI tool | List, search, read, move, delete, and flag messages over IMAP |
| Email Receive | Trigger (polling) | Fires when a new email lands in a watched folder |
***
## Set up an email account
Click the key icon to open **API Credentials** and select **Email (IMAP/SMTP)** under the Email category. The panel provides:
* A **provider** dropdown with built-in presets: Gmail, Outlook, Yahoo, iCloud, ProtonMail, Fastmail, and custom. Presets fill in the IMAP/SMTP host, port, and encryption for you.
* **Email address** and **password** inputs.
* A custom IMAP/SMTP block (host + port for each) that appears only when the provider is **custom** — for self-hosted or unlisted servers.
* **Save** writes the credentials; **Remove** clears them.
Most providers expect an app password here rather than your regular login. An app password is a single-purpose password your mail provider generates specifically for third-party apps, so you never hand out your real account password.
| Provider | Password to use | Notes |
| -------------------- | ---------------------------- | ---------------------------------------------------------------------- |
| Gmail | App Password | Requires 2-Step Verification; generate under Google Account → Security |
| Outlook / Office 365 | Account or App Password | |
| Yahoo | App Password | |
| iCloud | App-Specific Password | Generate at appleid.apple.com |
| ProtonMail | Bridge password | Requires ProtonMail Bridge running locally |
| Fastmail | App Password | Generate under Settings → Privacy & Security |
| Custom | Whatever your server accepts | Fill in the IMAP/SMTP host and port fields |
The `himalaya` CLI must be installed and on your PATH — install via `brew install himalaya`, `cargo install himalaya`, or the pre-built binaries on its GitHub releases page. If it is missing, the nodes return an error with install instructions.
You can also override any credential field per node: a node parameter always wins over the provider preset, which wins over the stored credential.
***
## Email Send
Send an email over SMTP. Also usable as an AI tool (`email_send`) — wire it to an AI Agent's tools handle and the agent fills the same parameters.
### Parameters
`gmail`, `outlook`, `yahoo`, `icloud`, `protonmail`, `fastmail`, or `custom` — picks the connection preset
Recipient(s), comma-separated
Email subject line
Email body — plain text or HTML depending on `body_type`
CC recipients
BCC recipients
`text` or `html`. HTML sends a `multipart/alternative` MIME message.
### Output
```json theme={null}
{
"from": "you@example.com"
}
```
The result includes `from` (the resolved sender address) merged with whatever the underlying send command returns — often an empty object on success, or `raw_output` when the CLI output is not JSON.
### Example: Send a status update
```
Provider: gmail
To: team@example.com
Subject: Nightly build finished
Body: The nightly build completed successfully.
Body Type: text
```
Attachments are not supported — the node composes a single text or HTML part.
***
## Email Read
Read and manage an IMAP mailbox: list envelopes, search, fetch a full message, list folders, move, delete, and flag. One node, seven operations selected by the **Operation** parameter. Also usable as an AI tool (`email_read`).
| Operation | Description |
| --------- | ------------------------------------------ |
| list | List envelopes in a folder (paginated) |
| search | Search a folder with Himalaya query syntax |
| read | Fetch one full message by ID |
| folders | List all folders |
| move | Move a message to another folder |
| delete | Delete a message |
| flag | Add or remove a flag on a message |
### Parameters
Connection preset (same choices as Email Send)
`list`, `search`, `read`, `folders`, `move`, `delete`, or `flag`
IMAP folder to operate on
Operation-specific parameters:
| Parameter | Used by | Default | Description |
| --------------- | ------------------------ | ------- | ------------------------------------------------------------- |
| `query` | search | | Himalaya search expression, e.g. `from:alice subject:invoice` |
| `message_id` | read, move, delete, flag | | IMAP message ID |
| `target_folder` | move | | Destination folder |
| `flag` | flag | | `Seen`, `Answered`, `Flagged`, `Draft`, or `Deleted` |
| `flag_action` | flag | `add` | `add` or `remove` |
| `page` | list, search | `1` | 1-based page number |
| `page_size` | list, search | `20` | Items per page (1-500) |
### Output
```json theme={null}
{
"operation": "list",
"folder": "INBOX",
"data": [
{"id": "1042", "from": "alice@example.com", "subject": "Invoice #204", "date": "2026-07-15"}
]
}
```
The result always echoes `operation` and `folder`. When the CLI returns a JSON object its keys are merged in; a list is wrapped under `data`; non-JSON output lands in `raw_output`.
### Example: Find invoices
```
Operation: search
Folder: INBOX
Query: from:billing subject:invoice
Page Size: 20
```
The `delete` operation is permanent and does not ask for confirmation — treat it carefully, especially when this node is exposed to an AI agent as a tool.
***
## Email Receive
Polling trigger that fires when a new email lands in a watched IMAP folder. The first poll establishes a baseline so existing mail is not replayed; subsequent polls diff message IDs to detect new arrivals.
### Parameters
Connection preset (same choices as Email Send)
IMAP folder to watch
Seconds between polls (clamped to 30-3600)
Reserved — not currently applied during polling
Add the `Seen` flag to the new message after fetching it
### Output
```json theme={null}
{
"message_id": "1043",
"folder": "INBOX",
"from": "customer@example.com",
"to": "support@example.com",
"subject": "Order question",
"date": "2026-07-15T09:12:00Z",
"body": "Hi, I have a question about my order..."
}
```
`message_id` and `folder` are always present; the remaining fields are whatever the message read returns (`from`, `to`, `subject`, `date`, `body`, ...).
### Example: Watch the support inbox
```
Provider: fastmail
Folder: INBOX
Poll Interval: 60
Mark As Read: true
```
Only the first new message per poll cycle is emitted — others arriving in the same window are absorbed into the baseline. The baseline is in-memory, so mail arriving while the server is offline will not fire the trigger after a restart.
***
## Example: Auto-reply triage
Answer incoming support mail automatically:
```
[Email Receive] --> [AI Agent] --> [Email Send]
```
1. **Email Receive**
* Folder: `INBOX`
* Poll Interval: 60
* Mark As Read: true
2. **AI Agent**
* Prompt: "Read the incoming email and draft a short, polite reply. If it is a billing question, say the billing team will follow up within one business day."
3. **Email Send**
* To: the sender of the incoming message
* Subject: `Re:` plus the original subject
* Body: the agent's draft
Deploy the workflow so the trigger keeps polling continuously instead of running once.
***
## Tips
Provider presets cover the connection details — for the seven built-in providers you only ever enter your address and an app password.
ProtonMail requires the ProtonMail Bridge running locally; the preset already points at the Bridge's local IMAP/SMTP ports.
Wire Email Send and Email Read to the same AI Agent to build a full mailbox assistant: the agent can search, read, and reply within a single conversation.
***
## Related
API-native Gmail nodes with OAuth sign-in
Use the email nodes as AI tools
Combine email with scheduled workflows
Telegram, Twitter/X, and social nodes
# Filesystem & Shell
Source: https://docs.opencompany.sh/nodes/filesystem
Read, modify, and search files, and run shell commands from workflows
Four nodes give workflows (and AI agents) a filesystem: **File Read**, **File Modify**, **FS Search**, and **Shell**. All four operate inside the workflow's own workspace folder and double as agent tools (`file_read`, `file_modify`, `fs_search`, `shell_execute`) when connected to an AI Agent's tools input.
These nodes touch **real files on disk** -- everything inside the workflow's workspace folder is genuinely created, overwritten, edited, and deleted. The sandbox confines paths to the workspace; it does not undo anything.
## Where files live
Each workflow gets a persistent workspace directory at `/workspaces//` -- by default `~/.opencompany/workspaces//`. The directory is created automatically on first use and persists across runs, so files written in one execution are readable in the next.
Every path you pass is interpreted **relative to that workspace root**:
* Absolute anchors are stripped -- `/reports/data.csv`, `C:\reports\data.csv`, and UNC paths all resolve to `reports/data.csv` inside the workspace.
* Traversal is rejected -- paths containing `..` or `~` fail with a clear error telling you to use a workspace-relative path.
* `path: "."` in FS Search means the workspace root, not the server's working directory.
Other nodes share the same folder: code executors receive it as `workspace_dir`, and the File Downloader saves into it -- so a file another node produced is immediately visible here.
***
## File Read
Reads a text file from the workspace.
### Parameters
File path relative to the workspace root
0-indexed starting line
Maximum lines to read (1-10000)
### Output
```json theme={null}
{
"content": "line one\nline two\n...",
"line_count": 128,
"file_path": "reports/data.csv"
}
```
Missing files, directories passed as `file_path`, and paths escaping the workspace all fail with a clean, actionable error. Binary files are not supported -- the node reads text.
***
## File Modify
Creates, overwrites, or edits a file. Two operations:
### Parameters
`write` (create or overwrite) or `edit` (string find-and-replace)
Target file path
File content (required for `write`)
Text to find (required for `edit`)
Replacement text (`edit`)
Replace every occurrence. When `false`, `old_string` must appear **exactly once** in the file -- zero or multiple matches fail the edit.
### Output
Write:
```json theme={null}
{"operation": "write", "file_path": "notes/summary.md"}
```
Edit:
```json theme={null}
{"operation": "edit", "file_path": "notes/summary.md", "occurrences": 1}
```
`write` always overwrites -- there is no "fail if exists" flag. An existing file at the target path is replaced wholesale. And `replace_all` with an empty **New String** deletes every occurrence of **Old String**, with no safeguard.
***
## FS Search
Three query modes over the workspace, selected by **Mode**:
### Parameters
`ls` (list a directory), `glob` (find files by pattern), or `grep` (search file contents by regex)
Directory to search in, workspace-relative
Glob pattern (`glob` mode, e.g. `**/*.md`) or regex (`grep` mode). Required for both; unused by `ls`.
### Output
```json theme={null}
// ls -- directory entries
{"path": ".", "entries": ["...file info objects..."], "count": 4}
// glob -- files matching the pattern
{"path": ".", "pattern": "**/*.csv", "matches": ["...file info objects..."], "count": 2}
// grep -- lines matching the regex
{"path": ".", "pattern": "TODO", "matches": ["...match objects..."], "count": 3}
```
`**` globs work. There is no result cap -- a `**/*` glob over a huge workspace returns every match, so keep patterns specific.
***
## Shell
Runs a short-lived shell command inside the workspace. The command grammar is **Nushell** (`nu`), chosen so commands behave identically on Windows, macOS, and Linux -- common file operations (`ls`, `cp`, `mv`, `mkdir`, `rm`, `open`) are Nushell builtins. When `nu` is not installed, the node falls back to the system shell.
The environment is inherited from the server, so external tools on your PATH -- `npm`, `node`, `python`, `git` -- are reachable.
### Parameters
Nushell command to run
Maximum seconds (1-600). On timeout the process is killed and `exit_code` is 124.
### Nushell is not bash
* `&&` and `||` are rejected up-front with a corrective error -- use `;` for sequencing or `try { ... } catch { ... }` for error handling.
* `$VAR`, backticks, and `>` redirection differ from bash. Nushell has its own idioms for each.
### Output
```json theme={null}
{
"stdout": "3\n",
"exit_code": 0,
"truncated": false,
"command": "ls reports | length"
}
```
Notes on the payload:
* `stdout` combines the command's output (stderr lines are prefixed `[stderr]`) and is stripped of ANSI colour codes.
* **A non-zero `exit_code` still counts as a successful node run** -- the node reports that the command finished, not that it succeeded. Branch on `exit_code` downstream.
* `exit_code: 124` means the command hit **Timeout** and was killed.
* Very long output is capped, with `truncated: true` set.
* Stdin is empty -- upstream `input_data` does not reach the command. Write inputs to a file first if a command needs them.
For long-running processes (dev servers, watchers), use the **Process Manager** node instead -- Shell kills its command at **Timeout**.
***
## Example: summarize new files on a schedule
Periodically check the workspace for reports and have an agent summarize what is there:
```
[Cron Scheduler] --> [FS Search] --> [AI Agent] --> [Console]
```
1. **Cron Scheduler** -- e.g. every hour.
2. **FS Search** -- **Mode**: `glob`, **Path**: `.`, **Pattern**: `reports/**/*.md`.
3. **AI Agent** -- prompt: "Here is a file listing from the workspace. Note any files added since your last summary and describe what the folder contains." Connect **File Read** to the agent's tools input so it can open files it finds interesting.
4. **Console** -- shows the summary each run.
This is **polling**: the schedule re-lists matching files on every tick, and the agent compares against what it saw before. There is no filesystem watch trigger -- a file appearing between ticks is picked up on the next run, not instantly.
***
## Tips
Give an agent all four nodes as tools and it can manage the workspace end-to-end: `fs_search` to explore, `file_read` to inspect, `file_modify` to write, `shell_execute` to run tools against the results.
Not sure what exists? Run **FS Search** with **Mode** `ls` first -- the error messages for bad paths also point you there.
Prefer **File Modify**'s `edit` with a unique **Old String** over rewriting whole files -- the uniqueness check catches accidental multi-replacements before they happen.
Shell's `exit_code` is where failures live. A failing command does not fail the node -- check `exit_code != 0` in downstream logic.
***
## Related
Transform file contents with Python, JS, or TS
Poll the workspace on a schedule
Let agents read, write, and search files as tools
Download and parse documents into the workspace
# Google Workspace
Source: https://docs.opencompany.sh/nodes/google-workspace
Gmail, Calendar, Drive, Sheets, Tasks, and Contacts nodes with one Google sign-in
# Google Workspace
OpenCompany ships seven Google Workspace nodes that share a single Google sign-in: connect once and every node below authenticates through the same stored OAuth tokens. Six of them are dual-purpose — drop them on the canvas as workflow steps, or wire them to an AI Agent's tools handle and the agent can call them directly (tool names `google_gmail`, `google_calendar`, `google_drive`, `google_sheets`, `google_tasks`, `google_contacts`).
| Node | Kind | What it does |
| ------------- | ----------------- | ------------------------------------------------ |
| Gmail | Action + AI tool | Send, search, and read email |
| Gmail Receive | Trigger (polling) | Fires when a new email matching a filter arrives |
| Calendar | Action + AI tool | Create, list, update, and delete calendar events |
| Drive | Action + AI tool | Upload, download, list, and share files |
| Sheets | Action + AI tool | Read, write, and append spreadsheet values |
| Tasks | Action + AI tool | Manage personal to-do items |
| Contacts | Action + AI tool | Create, search, and manage contacts |
***
## Connect your Google account
OpenCompany does not ship a shared Google app. You create your own OAuth client in Google Cloud Console (free), then paste its Client ID and Client Secret into OpenCompany. You only do this once.
Plan for roughly 15-20 minutes the first time through. Because your OAuth client is brand new, Google shows an "unverified app" warning screen during sign-in — this is expected for a personal client and safe to proceed through, since the app is your own. Adding your own Google account as a test user (step 3) is what lets you continue past it.
Go to [console.cloud.google.com](https://console.cloud.google.com) and create a new project (any name works).
In **APIs & Services → Library**, enable each of: **Gmail API**, **Google Calendar API**, **Google Drive API**, **Google Sheets API**, **Google Tasks API**, and **People API** (the People API backs the Contacts node).
In **APIs & Services → OAuth consent screen**, choose the **External** user type, fill in the required app fields, and add your own Google account as a **Test User**. Test-user status is what lets you sign in to an unverified app.
In **APIs & Services → Credentials**, create an **OAuth client ID** of type **Web application**. Add this authorized redirect URI, exactly as written:
```
http://localhost:5678/api/google/callback
```
Copy the generated Client ID and Client Secret.
In OpenCompany, click the key icon to open **API Credentials**, select **Google Workspace**, paste the Client ID and Client Secret, then click **Save Credentials**. Click **Login with Google Workspace** and approve the request in your browser (clicking through the unverified-app screen).
One sign-in covers all seven nodes: OpenCompany requests the combined scopes for Gmail, Calendar, Drive, Sheets, Tasks, and Contacts in a single consent, with offline access so tokens refresh automatically in the background.
***
## Gmail
Send, search, and read Gmail messages. One node, three operations selected by the **Operation** parameter. As an AI tool it is exposed as `google_gmail`.
### Parameters
Operation to perform: send, search, or read
**Send**
| Parameter | Type | Default | Required | Description |
| ----------- | ------ | ------- | -------- | ----------------------------------- |
| `to` | string | | yes | Recipient email(s), comma-separated |
| `cc` | string | | no | CC recipients |
| `bcc` | string | | no | BCC recipients |
| `subject` | string | | yes | Email subject |
| `body` | string | | yes | Email body content |
| `body_type` | select | `text` | no | `text` or `html` |
**Search**
| Parameter | Type | Default | Required | Description |
| -------------- | ------- | ------- | -------- | -------------------------------------------------------------------------------------------- |
| `query` | string | | yes | Gmail search query — same syntax as the Gmail web UI (`from:`, `subject:`, `is:unread`, ...) |
| `max_results` | number | `10` | no | Maximum messages (capped at 100) |
| `include_body` | boolean | `false` | no | Fetch the full body per result (one extra API call per message) |
**Read**
| Parameter | Type | Default | Required | Description |
| ------------ | ------ | ------- | -------- | -------------------------------------------- |
| `message_id` | string | | yes | Gmail message ID (e.g. from a search result) |
| `format` | select | `full` | no | `full`, `minimal`, `raw`, or `metadata` |
### Output
```json theme={null}
{
"operation": "send",
"message_id": "18c1a2b3d4e5f6a7",
"thread_id": "18c1a2b3d4e5f6a7",
"to": "team@example.com",
"subject": "Build finished"
}
```
Search returns `{operation, messages: [...], count, query, result_size_estimate}`; read returns `{operation}` plus the formatted message fields.
### Example: Search unread billing mail
```
Operation: search
Query: is:unread from:billing@stripe.com
Max Results: 10
Include Body: true
```
***
## Gmail Receive
Polling trigger that fires when a new Gmail message matching your filter arrives. Gmail has no simple push channel, so this node polls at a configurable interval, diffs message IDs against a baseline, and emits the first new message it finds.
### Parameters
Gmail search query (same syntax as the Gmail web UI)
Label name to watch, or `all` to disable label filtering. When set, it is prepended to the query as `label:`.
Remove the UNREAD label from the matched message after fetching it
Seconds between polls (clamped to 10-3600)
Which OAuth token store to use: `owner` or `customer` (`customer_id` is required in customer mode)
### Output
```json theme={null}
{
"message_id": "18c1a2b3d4e5f6a7",
"thread_id": "18c1a2b3d4e5f6a7",
"from": "billing@stripe.com",
"to": "you@example.com",
"subject": "Your invoice is ready",
"date": "Tue, 14 Jul 2026 08:12:00 +0000",
"snippet": "Your July invoice...",
"body": "Full message body...",
"labels": ["INBOX", "UNREAD"],
"size_estimate": 4523
}
```
An `attachments` array (`filename`, `mime_type`, `size`, `attachment_id` per entry) is included when the message has attachments.
### Example: Watch for invoices
```
Filter Query: from:billing@stripe.com has:attachment
Label Filter: INBOX
Mark As Read: true
Poll Interval: 120
```
The baseline of already-seen messages is kept in memory. Emails that arrive while the server is offline are treated as pre-existing and will not fire the trigger, and only the first new message per poll cycle is emitted.
***
## Calendar
Create, list, update, and delete Google Calendar events. As an AI tool it is exposed as `google_calendar`.
### Parameters
Operation to perform: create, list, update, or delete
Target calendar (all operations)
**Create**
| Parameter | Type | Default | Required | Description |
| ------------------ | ------ | ------- | -------- | ------------------------------- |
| `title` | string | | yes | Event summary |
| `start_time` | string | | yes | ISO 8601 datetime |
| `end_time` | string | | yes | ISO 8601 datetime |
| `description` | string | | no | Event description |
| `location` | string | | no | Location text |
| `attendees` | string | | no | Comma-separated attendee emails |
| `reminder_minutes` | number | `30` | no | Popup reminder lead time |
| `timezone` | string | `UTC` | no | Event timezone |
**List**
| Parameter | Type | Default | Description |
| --------------- | ------- | ----------- | ----------------------------------------------------- |
| `start_date` | string | today | `today` or an ISO datetime |
| `end_date` | string | +7 days | ISO datetime or `today+Nd` shortcut (e.g. `today+7d`) |
| `max_results` | number | `10` | Maximum events (capped at 250) |
| `single_events` | boolean | `true` | Expand recurring events into instances |
| `order_by` | select | `startTime` | `startTime` or `updated` |
**Update** takes `event_id` (required) plus any of `title`, `start_time`, `end_time`, `description`, `location` as patch fields. **Delete** takes `event_id` (required) and `send_updates` (`all` or `none` — whether attendees get cancellation emails).
### Output
```json theme={null}
{
"events": [
{
"event_id": "7ac3k9d1",
"title": "Team standup",
"start": "2026-07-15T09:00:00Z",
"end": "2026-07-15T09:30:00Z",
"status": "confirmed",
"html_link": "https://www.google.com/calendar/event?eid=..."
}
],
"count": 1,
"time_range": {"start": "2026-07-15T00:00:00Z", "end": "2026-07-22T00:00:00Z"}
}
```
Create and update return `{event_id, title, start, end, html_link, status}`; delete returns `{deleted: true, event_id}`.
### Example: Today's agenda
```
Operation: list
Start Date: today
End Date: today+1d
Order By: startTime
```
***
## Drive
Upload, download, list, and share Google Drive files. Uploads accept either a source URL (fetched fully into memory and re-uploaded — avoid very large files) or base64-inlined content. As an AI tool it is exposed as `google_drive`.
### Parameters
Operation to perform: upload, download, list, or share
**Upload**
| Parameter | Type | Default | Required | Description |
| -------------- | ------ | -------------------------- | -------- | ----------------------------------------------------------------------------------------- |
| `filename` | string | | yes | Target filename in Drive |
| `file_url` | string | | one of | Source URL to fetch (this or `file_content`) |
| `file_content` | string | | one of | Base64-encoded file bytes |
| `folder_id` | string | | no | Parent folder ID; empty uploads to the root |
| `mime_type` | string | `application/octet-stream` | no | When uploading from a URL and left at the default, the response's Content-Type is adopted |
| `description` | string | | no | File description |
**Download**
| Parameter | Type | Default | Required | Description |
| --------------- | ------ | -------- | -------- | ---------------------------------------------------------------------------------------------------------- |
| `file_id` | string | | yes | Drive file ID |
| `output_format` | select | `base64` | no | `base64` returns bytes inline; `url` returns metadata plus a download link (still requires authentication) |
**List**
| Parameter | Type | Default | Description |
| ------------- | ------ | ------------------- | ------------------------------------------------------ |
| `folder_id` | string | | Restrict to a parent folder |
| `query` | string | | Drive query DSL (e.g. `name contains 'report'`) |
| `max_results` | number | `20` | Maximum files (capped at 1000) |
| `file_types` | select | `all` | `all`, `folder`, `document`, `spreadsheet`, or `image` |
| `order_by` | string | `modifiedTime desc` | Sort order |
**Share** takes `file_id` (required), `email` (required), `role` (`reader` / `writer` / `commenter`, default `reader`), `send_notification` (default `true`), and an optional `message`.
### Output
```json theme={null}
{
"file_id": "1aB2cD3eF4",
"name": "report.pdf",
"mime_type": "application/pdf",
"size": "1024000",
"web_link": "https://drive.google.com/file/d/1aB2cD3eF4/view",
"download_link": "https://drive.google.com/uc?id=1aB2cD3eF4"
}
```
Download returns `{file_id, name, mime_type, size, content_base64}` (or `download_url` + `web_link` in `url` mode); list returns `{files: [...], count, next_page_token}`; share returns `{permission_id, file_id, file_name, shared_with, role, web_link}`.
### Example: Share a report
```
Operation: share
File ID: 1aB2cD3eF4
Email: teammate@example.com
Role: reader
Send Notification: true
```
***
## Sheets
Read, write, and append cell values in Google Sheets. As an AI tool it is exposed as `google_sheets`.
### Parameters
Operation to perform: read, write, or append
Spreadsheet ID (the long token in the sheet's URL)
A1 notation, e.g. `Sheet1!A1:D10`. For write, a start cell like `Sheet1!A1` is enough — the range expands to fit the values.
**Read**
| Parameter | Type | Default | Description |
| --------------------- | ------ | ----------------- | ------------------------------------------------------------------------------------------ |
| `value_render_option` | select | `FORMATTED_VALUE` | `FORMATTED_VALUE` (user-visible strings), `UNFORMATTED_VALUE` (native types), or `FORMULA` |
| `major_dimension` | select | `ROWS` | `ROWS` or `COLUMNS` |
**Write / Append**
| Parameter | Type | Default | Required | Description |
| -------------------- | ------ | -------------- | -------- | ---------------------------------------------------------------------------------------------------------- |
| `values` | array | | yes | 2D array of cell values, or a JSON string that parses to one; a 1D array is auto-wrapped into a single row |
| `value_input_option` | select | `USER_ENTERED` | no | `USER_ENTERED` interprets input like typing in the UI (formulas evaluate); `RAW` stores literal text |
| `insert_data_option` | select | `INSERT_ROWS` | no | Append only: `INSERT_ROWS` or `OVERWRITE` |
### Output
```json theme={null}
{
"values": [["Name", "Amount"], ["Acme Inc", "2500"]],
"range": "Sheet1!A1:B2",
"rows": 2,
"columns": 2,
"major_dimension": "ROWS"
}
```
Write and append return `{updated_range, updated_rows, updated_columns, updated_cells}`.
### Example: Append a log row
```
Operation: append
Spreadsheet ID: 1x2y3z...
Range: Log!A:C
Values: [["2026-07-15", "deploy", "ok"]]
Insert Data Option: INSERT_ROWS
```
***
## Tasks
Manage personal to-do items in Google Tasks. As an AI tool it is exposed as `google_tasks`.
### Parameters
Operation to perform: create, list, complete, update, or delete
Which tasklist to use (all operations)
**Create**
| Parameter | Type | Default | Required | Description |
| ---------- | ------ | ------- | -------- | -------------------------------------------------------------------------------------- |
| `title` | string | | yes | Task title |
| `notes` | string | | no | Task description |
| `due_date` | string | | no | RFC 3339 datetime; a date-only value like `2026-07-20` is upgraded to `T00:00:00.000Z` |
**List**
| Parameter | Type | Default | Description |
| ---------------- | ------- | ------- | ----------------------- |
| `show_completed` | boolean | `false` | Include completed tasks |
| `show_hidden` | boolean | `false` | Include hidden tasks |
| `max_results` | number | `100` | Maximum tasks to return |
**Complete** and **delete** take `task_id` (required). **Update** takes `task_id` (required) plus any of `title`, `notes`, `due_date`, `status` as patch fields — only non-empty fields are applied.
### Output
```json theme={null}
{
"tasks": [
{
"task_id": "MTIzNDU2",
"title": "Send weekly report",
"due": "2026-07-18T00:00:00.000Z",
"status": "needsAction"
}
],
"count": 1
}
```
Create, complete, and update return `{task_id, title, due, status, ...}`; delete returns `{deleted: true, task_id}`.
### Example: Create a task with a due date
```
Operation: create
Title: Prepare quarterly review
Notes: Slides + numbers from Sheets
Due Date: 2026-07-20
```
***
## Contacts
Create, search, and manage contacts through the Google People API. Results are flattened into a consistent shape with primary email/phone plus the full lists. As an AI tool it is exposed as `google_contacts`.
### Parameters
Operation to perform: create, list, search, get, update, or delete
**Create**
| Parameter | Type | Required | Description |
| ------------ | ------ | -------- | ----------------- |
| `first_name` | string | yes | Given name |
| `last_name` | string | no | Family name |
| `email` | string | no | Email address |
| `phone` | string | no | Phone number |
| `company` | string | no | Organization name |
| `job_title` | string | no | Job title |
| `notes` | string | no | Free-text notes |
**List**
| Parameter | Type | Default | Description |
| ------------ | ------ | -------------------------- | ----------------------------------------------------------------------------- |
| `page_size` | number | `100` | Contacts per page |
| `page_token` | string | | Pagination cursor from a previous list call |
| `sort_order` | select | `LAST_MODIFIED_DESCENDING` | Also `LAST_MODIFIED_ASCENDING`, `FIRST_NAME_ASCENDING`, `LAST_NAME_ASCENDING` |
**Search** takes `query` (required) and `page_size` (default 30). **Get** and **delete** take `resource_name` (required, e.g. `people/c12345678`). **Update** takes `resource_name` (required) plus at least one of `first_name`, `last_name`, `email`, `phone`, `company`, `job_title`.
### Output
Each contact is returned in a flattened shape:
```json theme={null}
{
"resource_name": "people/c12345678",
"display_name": "Rosy Sparrow",
"email": "rosy@example.com",
"phone": "+1 555 0100",
"company": "Acme Inc",
"job_title": "CTO",
"emails": ["rosy@example.com"],
"phones": ["+1 555 0100"]
}
```
List returns `{contacts: [...], count, total_people, next_page_token}`; search returns `{contacts: [...], count}`; delete returns `{deleted: true, resource_name}`.
### Example: Find a contact
```
Operation: search
Query: rosy
Page Size: 10
```
Contact updates replace whole field groups — updating `email` wipes any additional emails on the contact — and deletion is immediate and final on Google's side.
***
## Example: Daily agenda email
A three-node workflow that mails you a summary of today's calendar.
```
[Calendar (list)] --> [AI Agent] --> [Gmail (send)]
```
1. **Calendar** — Operation: list, Start Date: `today`, End Date: `today+1d`, Order By: startTime
2. **AI Agent** — Prompt: "Summarize today's events into a short agenda with times and titles."
3. **Gmail** — Operation: send, To: your own address, Subject: `Today's agenda`, Body: the agent's summary
Add a scheduler in front of the Calendar node to run it automatically each morning — see [Schedulers & Triggers](/nodes/schedulers).
***
## Tips
Gmail's **search** and Gmail Receive's **filter query** both use the exact query syntax you already know from the Gmail web UI (`from:`, `subject:`, `is:unread`, `has:attachment`).
In Sheets, keep `USER_ENTERED` when you want `=SUM(A1:A5)` to become a live formula; switch to `RAW` when writing literal text that should not be interpreted.
Delete operations (Calendar events, Tasks, Contacts) execute immediately and without confirmation. Be especially careful when exposing them to AI agents as tools.
***
## Related
Provider-agnostic email nodes for non-Gmail accounts
Use the Google nodes as AI tools
Run Google workflows on a schedule
More tools to combine with Workspace nodes
# Messaging & Social
Source: https://docs.opencompany.sh/nodes/messaging
Telegram, Twitter/X, and unified social nodes for sending, receiving, and searching messages
OpenCompany ships eight messaging and social nodes across three families: platform-specific Telegram nodes (bot API), platform-specific Twitter/X nodes (OAuth), and platform-agnostic Social nodes that normalize messages across channels.
| Node | Kind | Auth | Purpose |
| ---------------- | ---------------- | ------------------ | --------------------------------------------------------- |
| Telegram Send | Action | Telegram bot token | Send text, photo, document, location, or contact messages |
| Telegram Receive | Trigger | Telegram bot token | Fire the workflow on an incoming Telegram message |
| Twitter Send | Action + AI tool | Twitter/X OAuth | Tweet, reply, quote, retweet, like, unlike, delete |
| Twitter Search | Action + AI tool | Twitter/X OAuth | Search recent tweets with enriched results |
| Twitter User | Action + AI tool | Twitter/X OAuth | Look up users, followers, and following |
| Twitter Receive | Trigger | Twitter/X OAuth | Poll for mentions, search matches, or timeline updates |
| Social Send | Action + AI tool | Platform-dependent | Platform-agnostic outbound messaging (WhatsApp today) |
| Social Receive | Action | None | Normalize any messaging trigger into one unified schema |
The Telegram and Social nodes live in the **Social** section of the component palette; switch the toolbar Mode toggle from **Normal** to **Dev** to see it.
***
## Telegram
Telegram is the fastest messaging integration to set up: a bot token is free and takes about two minutes.
1. In Telegram, message **@BotFather** and send `/newbot` to create a bot. BotFather replies with an HTTP API token.
2. In OpenCompany, click the key icon in the toolbar to open **API Credentials**, select **Telegram Bot**, paste the token into **Bot Token**, and click **Validate**. The field shows **Valid** and the provider gets a green **Connected** badge.
The **Telegram Bot** panel also has an optional **Your Chat ID (optional)** field. Fill it in to make Telegram Send's `self` recipient route to your account immediately (DM **@userinfobot** to find your id) — or leave it blank and OpenCompany auto-captures it from the first private DM you send the bot.
### Telegram Send
Sends a message through your connected bot. Supports text, photos, documents, locations, and contacts.
#### Parameters
Who receives the message: `self` (the captured bot owner), `user`, or `group`
Numeric chat id or `@username`. Required when Recipient Type is `user` or `group`.
Message kind: `text`, `photo`, `document`, `location`, or `contact`
Message text. Required when Message Type is `text`.
Remote URL or Telegram `file_id`. Required for `photo` and `document` messages.
Optional caption for `photo` and `document` messages
For `location` messages, `latitude` and `longitude` (numbers) are required. For `contact` messages, `phone_number` and `first_name` are required and `last_name` is optional.
Text formatting: `Auto` (GFM markdown converted to Telegram HTML), None, `HTML`, `Markdown`, or `MarkdownV2`. Applies to `text`, `photo`, and `document` messages.
Send without a notification sound
When set to a non-zero message id, sends the message as a reply to it
#### Output
```json theme={null}
{
"message_id": 42,
"chat_id": 123456789,
"message_type": "text",
"date": "2026-07-15T10:30:00+00:00"
}
```
Leave **Parse Mode** on `Auto`: agent replies written in markdown are converted to Telegram HTML automatically, and if Telegram rejects the formatting the node retries as plain text.
### Telegram Receive
Trigger node — waits for an incoming Telegram message that passes its filters, then starts the workflow with the message as output.
#### Parameters
Accept only one content type: `all`, `text`, `photo`, `video`, `audio`, `voice`, `document`, `sticker`, `location`, `contact`, or `poll`
Who can trigger the workflow: `all`, `self` (the bot owner), `private`, `group`, `supergroup`, `channel`, `specific_chat`, `specific_user`, or `keywords`
Numeric chat id or `@username`. Required when Sender Filter is `specific_chat`.
Numeric user id. Required when Sender Filter is `specific_user`.
Comma-separated keywords, matched case-insensitively as substrings. Required when Sender Filter is `keywords`.
Skip messages sent by other bots (not applied when Sender Filter is `self`)
#### Output
```json theme={null}
{
"message_id": 42,
"chat_id": 123456789,
"chat_type": "private",
"from_id": 123456789,
"from_username": "yourname",
"from_first_name": "Ada",
"is_bot": false,
"text": "Hello bot",
"content_type": "text",
"date": "2026-07-15T10:30:00+00:00",
"reply_to_message_id": null
}
```
Media messages add a matching block: `photo` (`file_id`, `width`, `height`, `file_size`), `document` (`file_id`, `file_name`, `mime_type`, `file_size`), `location` (`latitude`, `longitude`), or `contact` (`phone_number`, `first_name`, `last_name`, `user_id`). For captioned media, `text` carries the caption.
Keyword matching is a case-insensitive substring check with no word boundaries — `hi` matches `chicken`. The `self` filter only matches once your chat id is known (explicit field or first DM).
***
## Twitter/X
The four Twitter/X nodes authenticate with OAuth 2.0 against your own X Developer app:
1. Create an app in the X Developer Portal with OAuth 2.0 enabled and set its callback URL to `http://localhost:5678/api/twitter/callback`.
2. In **API Credentials**, select **Twitter/X** and enter the **Client ID** (and optionally the **Client Secret** — optional for PKCE).
3. Click **Save Credentials**, then **Login with Twitter/X** and approve the requested scopes in the browser.
The requested scopes are `tweet.read`, `tweet.write`, `users.read`, `follows.read`, `follows.write`, `like.read`, `like.write`, and `offline.access` (for silent token refresh). Use **Disconnect** in the same panel to revoke the stored tokens.
The three action nodes are dual-purpose: wire them to an AI Agent's tools handle and the agent can call `twitter_send`, `twitter_search`, and `twitter_user` on its own. Twitter Receive is a trigger only.
### Twitter Send
Performs write actions against your authenticated account.
#### Parameters
One of `tweet`, `reply`, `retweet`, `quote`, `like`, `unlike`, or `delete`
Tweet content. Required for `tweet`, `reply`, and `quote`. Silently truncated to 280 characters.
Target tweet ID. Required for `reply`, `retweet`, `quote`, `like`, `unlike`, and `delete`.
The form also accepts `include_media`, `media_urls` (comma-separated, max 4 images or 1 video), `include_poll`, `poll_options` (comma-separated 2-4 options, 25 characters each), and `poll_duration` (minutes, 5-10080, default 1440) — see the warning below.
#### Output
```json theme={null}
{
"action": "tweet_sent",
"data": {
"id": "1811234567890123456",
"text": "Hello from OpenCompany"
}
}
```
The `action` field reports what happened: `tweet_sent`, `reply_sent`, `quoted`, `retweeted`, `liked`, `unliked`, or `deleted`.
Media and poll parameters are accepted by the form but ignored by the current implementation — the node always sends a text-only tweet. Text longer than 280 characters is cut without warning.
### Twitter Search
Searches recent tweets and returns enriched results: expanded URLs, joined author profiles, attached media, referenced tweets, and full long-form text when a tweet exceeds 280 characters.
#### Parameters
X search query. Supports the full operator set (`from:`, `lang:`, `-is:retweet`, ...).
Number of results, clamped to 10-100 (the API minimum is 10)
The form also shows `sort_order` (default `recency`), `start_time` / `end_time` (ISO 8601), and `include_metrics` / `include_author` toggles, but the current implementation does not forward them — the full field set is always requested.
#### Output
```json theme={null}
{
"tweets": [
{
"id": "1811234567890123456",
"text": "Full tweet text...",
"display_text": "Tweet text with t.co links expanded...",
"author_id": "12345",
"created_at": "2026-07-15T10:30:00+00:00",
"public_metrics": {
"retweet_count": 3,
"like_count": 12
},
"author": {
"id": "12345",
"username": "someuser",
"name": "Some User"
}
}
],
"count": 1,
"query": "opencompany -is:retweet"
}
```
Tweets may also carry optional `urls`, `media`, and `referenced_tweets` arrays when the API returns them. Only the first result page is returned — pagination is not surfaced.
### Twitter User
Looks up users and their social graph.
#### Parameters
One of `me`, `by_username`, `by_id`, `followers`, or `following`
Handle without the `@`. Required for `by_username`.
Numeric user id. Required for `by_id`; optional for `followers` and `following` (defaults to the authenticated user).
Result count for `followers` and `following`, clamped to 1-1000
#### Output
For `me`, `by_username`, and `by_id`:
```json theme={null}
{
"operation": "by_username",
"user": {
"id": "12345",
"username": "someuser",
"name": "Some User",
"profile_image_url": "https://...",
"verified": false,
"description": "Bio text"
}
}
```
For `followers` and `following`, the output is `{ "operation": "...", "users": [...], "count": 42 }` where each entry has the same user shape. Only the first page is returned.
### Twitter Receive
Trigger node — polls the X API (no push webhooks on the free tier) and fires the workflow when a matching event arrives.
#### Parameters
What to watch: `mentions`, `search`, or `timeline`
Required when Trigger Type is `search`. Matched case-insensitively as a substring against the event's query.
For `timeline`: watch a specific user's timeline. Empty means the authenticated user.
Form-level hint; not enforced by the event filter in the current implementation
Form-level hint; not enforced by the event filter in the current implementation
Seconds between polls (15-3600). Applied when the workflow is deployed.
#### Output
```json theme={null}
{
"trigger_type": "mentions",
"tweet_id": "1811234567890123456",
"text": "@yourbot great work!",
"author_id": "12345",
"author_username": "someuser",
"created_at": "2026-07-15T10:30:00+00:00"
}
```
Search events add a `query` field; timeline events add `user_id`.
Expect up to `poll_interval` seconds of latency between a tweet being posted and the trigger firing — the default is 60 seconds.
***
## Unified Social nodes
The Social nodes decouple your workflow from any single platform. **Social Receive** sits after a platform trigger (WhatsApp Receive, Telegram Receive, Discord Receive, Chat Trigger) and normalizes whatever arrives into one schema; **Social Send** takes one payload shape and routes it to the platform selected by its `channel` parameter. Build the middle of your workflow once against the unified schema, and swap the endpoints per platform.
### Social Send
Platform-agnostic outbound messaging. The node advertises eleven channels (`whatsapp`, `whatsapp_business`, `telegram`, `discord`, `slack`, `signal`, `sms`, `webchat`, `email`, `matrix`, `teams`). Three are wired today — `whatsapp` (personal account), `whatsapp_business` (Meta Cloud API), and `discord` — and the rest return an error naming the platforms that are available. Use **Telegram Send** for Telegram in the meantime. Discord accepts `text` messages only through this node; use **Discord Send** for embeds and attachments.
It exposes four input handles — message, media, contact, and metadata — matching the four output handles on Social Receive, and can also be wired to an AI Agent as a tool.
#### Key parameters
Target platform. `whatsapp`, `whatsapp_business`, and `discord` are wired today.
How the recipient is addressed: `phone`, `group`, `channel`, `user`, or `chat`. Each choice reveals its matching id field (`phone`, `group_id`, `channel_id`, `user_id`, `chat_id`).
`text`, `image`, `video`, `audio`, `document`, `sticker`, `location`, `contact`, `poll`, `buttons`, or `list`
Message body for `text` messages
Text messages take a `format` (`plain`, `markdown`, or `html`, default `plain`) and a `disable_preview` toggle. Media messages pick a `media_source` — `url` (`media_url`), `base64` (`media_data`), or `file` (`file_path`). Additional parameter groups appear per message type: `caption` / `filename` / `mime_type` for media, `latitude` / `longitude` / `location_name` / `address` for locations, `contact_name` / `contact_phone` / `vcard` for contacts, `poll_question` / `poll_options` / `poll_allow_multiple` for polls, and `buttons` / `list_sections` (JSON) for interactive messages. Delivery flags: `reply_to_message` (+ `reply_message_id`, `reply_to_current`), `audio_as_voice`, `silent`, and `protect_content`.
#### Output
```json theme={null}
{
"success": true,
"message_id": "3EB0A1B2C3D4",
"channel": "whatsapp",
"recipient": "15551234567",
"recipient_type": "phone",
"message_type": "text",
"timestamp": "2026-07-15T10:30:00+00:00"
}
```
### Social Receive
Normalizes messages from any connected platform trigger into a unified inbound schema, applies filters, and fans the result out across four output handles so downstream nodes grab just the slice they need.
Connect a platform trigger (WhatsApp Receive, Telegram Receive, Discord Receive, Chat Trigger) to Social Receive; it detects the source platform from the upstream node and normalizes automatically.
#### Parameters
Accept only one platform: `all`, `whatsapp`, `telegram`, `discord`, `slack`, `signal`, `sms`, `webchat`, `email`, `matrix`, or `teams`
`all`, `text`, `image`, `video`, `audio`, `document`, `sticker`, `location`, `contact`, `poll`, or `reaction`
`all`, `any_contact` (no group messages), `contact` (specific phone), `group` (specific chat), or `keywords`
Exact phone match. Required when Sender Filter is `contact`.
Exact chat id match. Required when Sender Filter is `group`.
Comma-separated keywords, matched case-insensitively as substrings
Drop messages you sent yourself
Drop messages sent by bots
Include the base64 media payload in the output (memory-intensive)
#### Outputs
Social Receive is the one node in this family with four dedicated output handles:
| Handle | Shape | Contents |
| -------- | ------ | ------------------------------------------------------------------------------------------------------------- |
| Message | string | Plain message text, ready for an LLM prompt |
| Media | object | `url`, `type`, `mimetype`, `caption`, `size`, `thumbnail`, `filename` (empty when no media) |
| Contact | object | `sender`, `sender_phone`, `sender_name`, `sender_username`, `channel`, `is_group`, `group_info`, `chat_title` |
| Metadata | object | `message_id`, `chat_id`, `timestamp`, `message_type`, `is_from_me`, `is_forwarded`, `reply_to`, `thread_id` |
The main output carries the full unified message: `message_id`, `channel`, `sender`, `sender_phone`, `sender_name`, `chat_id`, `chat_type`, `message_type`, `text`, `timestamp`, `is_group`, `is_from_me`, `is_forwarded`, `is_bot`, plus the original platform payload under `raw`.
When a message fails the filters, the node still succeeds but emits `result: null` with `filtered: true` — downstream nodes must tolerate a null payload. `ignore_own_messages` defaults to true, so echo-style self-tests are silently dropped unless you turn it off.
***
## Example: cross-post an update
Send the same text to Telegram, Twitter/X, and WhatsApp from one trigger:
```
+--> [Telegram Send]
[Chat Trigger] --+--> [Twitter Send]
+--> [Social Send]
```
1. **Telegram Send**
* Recipient Type: `self`
* Message Type: `text`
* Text: `{{chattrigger.message}}`
2. **Twitter Send**
* Action: `tweet`
* Text: `{{chattrigger.message}}` (truncated to 280 characters)
3. **Social Send**
* Channel: `whatsapp`
* Recipient Type: `phone`
* Phone: your number, digits only
* Message Type: `text`
* Message: `{{chattrigger.message}}`
Click **Start** to deploy, then type your update into the Chat panel — all three sends fire from the single incoming message.
***
## Tips
Telegram is the best starting platform: the bot token is free, validation is instant, and no developer account approval is needed. Follow the [Telegram bot tutorial](/tutorials/telegram-bot) for an end-to-end build.
Wire **Twitter Search** and **Twitter User** to an AI Agent's tools handle to let the agent research accounts and topics on its own before posting with **Twitter Send**.
Put **Social Receive** between your platform triggers and the rest of the workflow — downstream nodes then read one schema regardless of where the message came from.
Receive triggers wait indefinitely once started. Click **Stop** (the **Start** button while running) to cancel a deployed workflow.
## Related
Full WhatsApp integration: QR pairing, groups, channels, and media
Build a free AI-powered Telegram bot in 10 minutes
# Node Overview
Source: https://docs.opencompany.sh/nodes/overview
Understanding OpenCompany nodes and how they connect
# Node Overview
OpenCompany uses a visual node-based system for building workflows. Each node performs a specific function and passes data to connected nodes.
## Node Categories
The node palette groups plugins by category. The exact node count grows as new plugins ship, so use the palette in the app for the live list.
| Category | Description |
| ------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| [AI Chat Models](/nodes/ai-models) | OpenAI, Anthropic, Gemini, OpenRouter, xAI, Groq, Cerebras, DeepSeek, Kimi, Mistral, Ollama, LM Studio |
| [AI Agents and Memory](/nodes/ai-agent) | AI Agent, Chat Agent (Zeenie), Simple Memory |
| Specialized Agents | Android, Coding, Web, Task, Social, Travel, Tool, Productivity, Payments, Consumer, Autonomous, Orchestrator, AI Employee, RLM, Claude Code, Codex |
| [AI Skills](/nodes/skills) | Master Skill aggregator (built-in skill library) |
| [AI Tools](/nodes/tools) | Calculator, Time, DuckDuckGo, Task Manager, Write Todos |
| [Search](/nodes/search) | Brave, DuckDuckGo, Serper, Perplexity (dual-purpose) |
| [Google Workspace](/nodes/google-workspace) | Gmail, Gmail Receive, Calendar, Drive, Sheets, Tasks, Contacts |
| [WhatsApp](/nodes/whatsapp) | Send, Receive, DB query (dual-purpose) |
| [Twitter/X](/nodes/messaging) | Send, Search, User, Receive (dual-purpose) |
| [Telegram](/nodes/messaging) | Send, Receive |
| [Social (unified)](/nodes/messaging) | Social Send, Social Receive |
| [Email](/nodes/email) | Send, Read, Receive (IMAP/SMTP, dual-purpose) |
| [Stripe](/nodes/stripe) | Stripe action (CLI pass-through), Stripe receive (webhook trigger) |
| [Android](/nodes/android) | Device control and monitoring (16 service nodes) |
| Location | Google Maps (create, geocode, nearby) |
| [Code Executors](/nodes/code) | Python, Monty (sandboxed Python), JavaScript, TypeScript (dual-purpose) |
| [Filesystem and Shell](/nodes/filesystem) | File read, file modify, shell, fs search, process manager |
| [Browser](/nodes/browser) | Browser and Browser Harness automation (dual-purpose) |
| [Webhooks and Utilities](/nodes/webhooks) | HTTP, webhook trigger/response, chat trigger, console, team monitor |
| [Proxy](/nodes/scraping) | Residential proxy request, config, status |
| [Documents](/nodes/documents) | RAG pipeline: scrape, parse, embed, store |
| [Web Scraping](/nodes/scraping) | Apify actor, Crawlee scraper |
| Chat | Chat send, chat history |
| [Schedulers](/nodes/schedulers) | Timer, cron scheduler |
| Workflow triggers | Start, task trigger |
## Node Shapes
Different shapes indicate different node types:
| Shape | Type | Description |
| ------- | ------- | ------------------------------------- |
| Diamond | Trigger | Starts a workflow (no input handle) |
| Square | Action | Performs operations |
| Circle | Config | Provides configuration to other nodes |
## Handles
Handles are connection points on nodes:
### Input Handles (Left Side)
* **Main Input** - Receives data from upstream nodes
* **Config Inputs** - Diamond shapes for memory, model, etc.
### Output Handles (Right Side)
* **Main Output** - Sends data to downstream nodes
## Data Flow
Data flows from left to right through connections:
```
[Trigger] --> [Process] --> [Action] --> [Response]
```
### Template Variables
Access upstream data using template syntax:
```
{{nodeName.fieldName}}
```
**Examples:**
```
{{webhookTrigger.body}} // Webhook request body
{{aiAgent.response}} // AI Agent's answer
{{batteryMonitor.level}} // Battery percentage
{{whatsappReceive.text}} // Message content
```
### Nested Fields
Access nested objects with dot notation:
```
{{whatsappReceive.group_info.sender_name}}
{{webhookTrigger.body.user.email}}
```
## Node Configuration
Click a node to open its parameter panel — the full editing how-to (adding, connecting, renaming, copying, deleting, shortcuts, palette modes) lives on [The canvas](/canvas).
### Parameter Types
| Type | Description |
| ------- | ---------------------- |
| Text | String input |
| Number | Numeric input |
| Boolean | Toggle on/off |
| Options | Dropdown selection |
| Slider | Range selection |
| Code | Multi-line code editor |
| JSON | JSON object input |
### Dynamic Options
Some parameters load options from the backend:
* Device lists (Android)
* AI models (based on API key)
* Groups and contacts (WhatsApp)
## Node States
During execution, nodes show their state:
| State | Indicator | Description |
| --------- | ----------- | ------------------------- |
| Idle | Default | Not running |
| Waiting | Cyan | Trigger waiting for event |
| Running | Purple glow | Currently executing |
| Completed | Green | Finished successfully |
| Error | Red | Failed with error |
## Special Node Types
### Trigger Nodes
* No input handle
* Start workflow execution
* Wait for external events
**Examples:** Webhook Trigger, WhatsApp Receive, Cron Scheduler
### Config Nodes
* Connect to special config handles (diamonds)
* Provide settings to parent nodes
* Don't execute independently
**Examples:** Simple Memory, AI Models
## Best Practices
Name your nodes descriptively. "Process Order" is better than "AI Agent 1".
Test individual nodes with the **Run** button before deploying full workflows.
Config nodes (Memory, Models) connect to diamond handles, not main inputs.
## Node Reference
12 providers: OpenAI, Claude, Gemini, OpenRouter, xAI, Groq, Cerebras, DeepSeek, Kimi, Mistral, Ollama, LM Studio
AI Agent, Chat Agent (Zeenie), and 16 specialized agents
Master Skill aggregator with a built-in skill library
Calculator, time, search, Android toolkit
Send, receive, and query messages
16 device control nodes
RAG pipeline: scrape, parse, embed, store
HTTP, webhooks, and utilities
# Schedulers & Triggers
Source: https://docs.opencompany.sh/nodes/schedulers
Start workflows on schedules, timers, and manual triggers
# Schedulers & Triggers
Control when and how workflows start execution.
## Available Nodes
| Node | Type | Purpose |
| ------------------------------ | ---------------------- | --------------------------- |
| Start | Trigger | Manual workflow start |
| Cron Scheduler | Trigger (also AI tool) | Run on a recurring schedule |
| Timer | Action (also AI tool) | Delay execution |
| [Python Executor](/nodes/code) | Action (also AI tool) | Run Python code |
***
## Start
Manually start a workflow with the Run button.
### Use Cases
* Testing workflows during development
* On-demand execution
* Entry point for manual processes
Every workflow needs at least one trigger node (Start, Cron Scheduler, a Webhook, or another event trigger) to begin execution.
***
## Cron Scheduler
Run workflows on a recurring schedule. Instead of raw cron expressions, you pick a **frequency** and then set the matching interval or time-of-day fields. The Cron Scheduler is also a **dual-purpose node** -- it can be connected to an AI Agent's `input-tools` handle so agents can schedule delayed or recurring runs programmatically.
### Parameters
How often the schedule fires: `seconds`, `minutes`, `hours`, `days`, `weeks`, `months`, or `once`. The other fields below appear based on the frequency you choose.
Seconds between fires (5-59). Shown when frequency is `seconds`.
Minutes between fires (1-59). Shown when frequency is `minutes`.
Hours between fires (1-23). Shown when frequency is `hours`.
Time of day (HH:MM). Shown when frequency is `days`.
Day of week for weekly schedules (0=Sunday … 6=Saturday). Shown when frequency is `weeks`.
Time of day for weekly schedules. Shown when frequency is `weeks`.
Day of month (1-28, or `L` for the last day). Shown when frequency is `months`.
IANA timezone identifier (UTC, America/New\_York, America/Los\_Angeles, Europe/London, Europe/Berlin, Asia/Tokyo, Asia/Kolkata).
### Frequency Examples
| Frequency | Fields you set | Result |
| --------- | --------------------------------- | ------------------------------- |
| `minutes` | interval\_minutes = 5 | Every 5 minutes |
| `hours` | interval\_hours = 1 | Every hour |
| `days` | daily\_time = 09:00 | Daily at 9am |
| `weeks` | weekday = 1, weekly\_time = 09:00 | Every Monday at 9am |
| `months` | month\_day = 1, timezone = UTC | Monthly on the 1st |
| `once` | — | Fires a single time (no repeat) |
### Output
```json theme={null}
{
"timestamp": "2026-06-15T09:00:00Z",
"iteration": 1,
"frequency": "days",
"timezone": "UTC",
"schedule": "Daily at 09:00",
"scheduled_time": "2026-06-15T09:00:00Z",
"triggered_at": "2026-06-15T09:00:00Z",
"waited_seconds": 86400,
"next_run": "Daily at 09:00",
"message": "Triggered after 1 day, will repeat: Daily at 09:00"
}
```
### Example: Daily Report
```
[Cron (Daily at 09:00)] --> [HTTP Request] --> [AI Summary] --> [WhatsApp Send]
(fetch data) (send report)
```
***
## Timer
Add a delay between nodes. The Timer is a **dual-purpose node** -- it works both as a workflow delay node and as an AI Agent tool.
### Parameters
Delay duration (1-86400).
Time unit: `seconds`, `minutes`, or `hours`.
### Use Cases
* Rate limiting API calls
* Waiting for external processes
* Scheduling sequential actions
* **AI Agent tool** -- agents can set timers programmatically when connected to `input-tools`
### As a Workflow Node
```
[For Each Item] --> [HTTP Request] --> [Timer (1s)] --> [Next Item]
```
### As an AI Agent Tool
Connect the Timer to an agent's `input-tools` handle. The agent can then invoke the timer to introduce delays during reasoning:
```
[Timer] --(tools handle)--> [AI Agent] --> [Output]
```
See [AI Tools](/nodes/tools#timer-tool) for the full tool schema and LLM interaction details.
### Output
```json theme={null}
{
"timestamp": "2026-06-15T10:30:05Z",
"elapsed_ms": 5000,
"duration": 5,
"unit": "seconds",
"message": "Timer completed after 5 seconds"
}
```
***
## Python Executor
The Python Executor moved to its own page alongside the other code nodes — see [Code Executors](/nodes/code). It pairs naturally with schedulers: a Cron Scheduler firing into a Python Executor is the classic zero-credential automation.
***
## Combining Schedulers
### Schedule with Delay
```
[Cron (hourly)] --> [HTTP Request] --> [Timer (5s)] --> [HTTP Request #2]
```
### Multiple Schedules
Deploy workflows with different schedules:
```
Workflow 1: [Cron (frequency: days)] --> [Daily Report]
Workflow 2: [Cron (frequency: hours)] --> [Hourly Check]
Workflow 3: [Webhook] --> [On-Demand Action]
```
***
## Workflow States
After deployment, trigger nodes show their state:
| State | Color | Description |
| ------- | ------- | -------------------------- |
| Idle | Default | Waiting for next trigger |
| Waiting | Cyan | Actively waiting for event |
| Running | Purple | Workflow executing |
***
## Tips
The Cron Scheduler uses a frequency dropdown -- pick `minutes`/`hours`/`days`/`weeks`/`months`/`once` and fill in the matching interval or time-of-day field. No raw cron expression is needed.
Use **Python Executor** for conditional logic instead of multiple workflow branches.
Add **Timer** nodes when calling rate-limited APIs repeatedly.
Cron schedules are in **UTC** by default. Set timezone if needed.
***
## Troubleshooting
* Verify workflow is **deployed** (not just saved)
* Check that the frequency and its interval/time fields are set
* Ensure timezone is correct
* Check server logs for errors
* Check for syntax errors
* Verify `input_data` has expected fields
* Use `try/except` for error handling
* Print debug info with `print()` (shows in logs)
* Ensure the duration is at least 1 (max 86400)
* Check the unit (seconds vs minutes vs hours)
* Verify node is connected properly
***
## Related
Trigger workflows via HTTP
Message-triggered workflows
# Scraping & Proxies
Source: https://docs.opencompany.sh/nodes/scraping
Crawlee and Apify scraping nodes, plus residential proxy configuration and monitoring
Scraping nodes fetch and extract content from pages you already know about. If that is not quite your problem, a neighbouring page probably is:
| You want to... | Use |
| ------------------------------------------ | ------------------------------------ |
| Find pages / get search snippets | [Web Search](/nodes/search) |
| Read content from known pages at scale | This page (Crawlee, Apify) |
| Click, type, and interact with a live page | [Browser Automation](/nodes/browser) |
This page also covers the residential proxy system -- provider configuration, proxied requests, and health monitoring -- which the scraping nodes can route through.
***
## Crawlee Scraper
Python-based scraping on top of the `crawlee` library. Crawlee manages concurrency, retry back-off, and request queues internally -- you feed in configuration and get back a list of pages. Also usable as an AI agent tool.
### Engines
| Engine | How it fetches | Use for |
| --------------- | ------------------------------------ | ----------------------------------------- |
| `beautifulsoup` | Plain HTTP + HTML parsing | Fast scraping of static pages |
| `playwright` | Full headless browser | JS-rendered pages that need a real render |
| `adaptive` | Currently aliased to `beautifulsoup` | (No automatic escalation today) |
### Modes
* `single` -- scrape only the seed URL (page and depth caps are forced to 1 and 0).
* `crawl` -- follow links matching **Link Selector** (defaults to `a[href]`) and an optional **URL Pattern**, up to **Max Pages** / **Max Depth**.
### Parameters
Seed URL
`beautifulsoup`, `playwright`, or `adaptive`
`single` or `crawl`
CSS selector for text/HTML extraction. Empty extracts the whole page.
`text`, `html`, or `markdown` (markdown falls back to text if the `html2text` package is not installed)
Include a `links[]` array on each page
Page cap in crawl mode (1-1000)
Link-following depth in crawl mode (0-50)
Glob-style pattern (e.g. `*/blog/*`) restricting which discovered links are followed (crawl mode)
Timeout in seconds -- applied per request handler and to the whole run (1-3600)
Playwright-only knobs: `browser_type` (`chromium` / `firefox` / `webkit`), `wait_for_selector` + `wait_timeout` (await an element before extracting), `take_screenshot` (base64 PNG per page).
Proxy knobs: `use_proxy` plus `proxy_provider` (`auto` picks by health score), `proxy_country`, `session_type` (`rotating` / `sticky`), and `sticky_duration` -- see [Proxies](#proxies) below.
### Output
```json theme={null}
{
"pages": [
{
"url": "https://example.com/article",
"title": "Article title",
"content": "Extracted text...",
"links": ["https://example.com/next"]
}
],
"page_count": 1,
"crawler_type": "beautifulsoup",
"mode": "single",
"proxied": false
}
```
Per-page content is capped at 100,000 characters.
### Example: crawl a blog
```
URL: https://blog.example.com
Crawler Type: beautifulsoup
Mode: crawl
Link Selector: a.post-link
URL Pattern: */blog/*
Max Pages: 25
Max Depth: 2
```
Proxy failures degrade gracefully: if the proxy service cannot supply a URL, the crawl proceeds **without** a proxy and reports `proxied: false` -- which means the target site sees your real IP. Check `proxied` in the output if that matters.
***
## Apify Actor
Run an [Apify](https://apify.com) actor -- a pre-built scraper or automation hosted on the Apify platform -- wait for it to finish, and return its dataset items. This is the escape hatch for platforms without a first-class OpenCompany integration: Instagram, TikTok, Twitter/X, LinkedIn, Facebook, YouTube, Google Search and Maps, and general website crawling. Also usable as an AI agent tool.
To connect your account, open **API Credentials**, choose **Apify**, paste your key (format `apify_api_...`) into the **API Key** field, and hit **Validate**.
Apify is a paid platform. Actors consume Apify usage on your account as they run (many actors also have their own per-result pricing), and heavier `memory` settings cost more per second. The `compute_units` field in the output actually reports the run's total USD usage. Check an actor's pricing on Apify before running it at scale.
### Parameters
One of 10 curated presets -- `apify/instagram-scraper`, `clockworks/tiktok-scraper`, `apidojo/tweet-scraper`, `apify/linkedin-scraper`, `apify/facebook-pages-scraper`, `streamers/youtube-scraper`, `apify/google-search-scraper`, `compass/crawler-google-places`, `apify/website-content-crawler`, `curious_coder/web-scraper` -- or `custom`
Any actor id from the Apify store (when **Actor** is `custom`)
Raw JSON run-input for the actor. Invalid JSON is silently treated as `{}`.
Maximum dataset items to fetch (1-10000)
Run timeout in seconds (1-3600)
Actor memory in MB: 128 / 256 / 512 / 1024 / 2048 / 4096 / 8192
Five presets also expose "quick helper" fields that fill the actor input for you -- e.g. `instagram_urls` (Instagram), `tiktok_profiles` / `tiktok_hashtags` (TikTok), `twitter_search_terms` / `twitter_handles` (tweet scraper), `google_search_query` / `google_search_pages` (Google Search), and `crawler_start_urls` / `crawler_max_depth` / `crawler_max_pages` (website content crawler). Quick helpers **overwrite** matching keys in your raw **Actor Input** JSON.
### Output
```json theme={null}
{
"run_id": "aBcD1234",
"actor_id": "apify/website-content-crawler",
"status": "SUCCEEDED",
"items": [{"url": "https://example.com", "text": "Page content..."}],
"item_count": 42,
"dataset_id": "xYz987",
"compute_units": 0.12,
"started_at": "2026-07-15T10:00:00Z",
"finished_at": "2026-07-15T10:03:12Z"
}
```
Runs that end `FAILED`, `TIMED-OUT`, or `ABORTED` surface as node errors with the actor's error message.
***
## Proxies
OpenCompany includes a residential proxy service: you register one or more proxy providers (gateway host/port plus a URL template), store their credentials, and the service picks the best provider per request using health scores, routing rules (domain glob -> preferred providers), geo-targeting, and rotating or sticky sessions.
The scraping and HTTP nodes opt in transparently -- **Crawlee Scraper**, **HTTP Request**, and **HTTP Scraper** all have a `use_proxy` flag; when set, the node asks the proxy service for a URL and routes traffic through it. Three dedicated nodes manage and use the service directly.
### Proxy Config
Admin node (and AI tool) for managing providers, credentials, and routing rules. Dispatches on **Operation**:
| Operation | Required params | What it does |
| --------------------- | ------------------------------------------------------ | ------------------------------------------------------------------------- |
| `list_providers` | none | List configured providers |
| `add_provider` | `name`, `gateway_host`, `gateway_port`, `url_template` | Register a provider (JSON URL template) |
| `update_provider` | `name` + changed fields | Update an existing provider |
| `remove_provider` | `name` | Delete a provider |
| `set_credentials` | `name`, `username`, `password` | Store the provider's credentials (encrypted) |
| `test_provider` | `name` | Live test via httpbin.org/ip -- returns IP and latency |
| `get_stats` | none | Aggregate usage and health statistics |
| `add_routing_rule` | `domain_pattern` | Route matching domains (glob like `*.example.com`) to preferred providers |
| `list_routing_rules` | none | List routing rules |
| `remove_routing_rule` | `rule_id` | Delete a routing rule |
Additional `add_provider` / `update_provider` fields: `cost_per_gb` (USD), `priority` (0-100, higher ranks first), `enabled`. Additional `add_routing_rule` fields: `preferred_providers` (JSON array), `required_country`, `session_type`.
### Proxy Request
A proxy-first HTTP client with explicit retry and failover. Unlike the `use_proxy` flag on other nodes (best-effort), **Proxy Request** requires the proxy service to be enabled and errors out if no provider is available. Each attempt reports latency and success back into the provider's health score, and successful requests record byte-based cost.
Target URL
GET / POST / PUT / DELETE / PATCH
Request headers
Request body for POST/PUT/PATCH -- JSON object, or a string (parsed as JSON when possible, sent raw otherwise)
Specific provider name, or `auto` for health-based selection
ISO country code for geo-targeting
`rotating` (new IP per request) or `sticky` (keep an IP for `sticky_duration` seconds, default 600)
Retry attempts with provider failover (0-10)
Request timeout in seconds (1-600)
Output:
```json theme={null}
{
"status": 200,
"data": {"ip": "203.0.113.7"},
"headers": {"content-type": "application/json"},
"url": "https://httpbin.org/ip",
"method": "GET",
"proxy_provider": "auto",
"latency_ms": 412,
"bytes_transferred": 33,
"attempt": 1
}
```
An HTTP status of 400 or above counts as a failed attempt and triggers retry/failover; when all attempts fail the node errors with the last error message.
### Proxy Status
Read-only snapshot of the proxy runtime -- useful on dashboards or as an agent tool so the agent can reason about which provider to target.
```json theme={null}
{
"enabled": true,
"providers": [
{
"name": "provider-a",
"enabled": true,
"priority": 50,
"score": 0.97,
"success_rate": 0.99,
"avg_latency_ms": 380,
"total_requests": 1204,
"total_bytes": 8123456
}
],
"stats": {}
}
```
When the proxy service is disabled the node still succeeds and returns `enabled: false` with empty collections -- check `enabled`, not the node's success state. The `provider_name` parameter is currently ignored; the node always returns all providers.
***
## Example: scrape a JS-heavy page and summarize
```
[Cron Scheduler] --> [Crawlee Scraper] --> [AI Agent] --> [Console]
```
1. **Crawlee Scraper** -- **Crawler Type**: `playwright`, **Mode**: `single`, **URL**: the page to watch, **Wait For Selector**: the element that signals the page has rendered (e.g. `.article-body`), **Output Format**: `text`.
2. **AI Agent** -- prompt: "Summarize the key points of this page in five bullets." The scraped `pages[0].content` flows in as input.
3. **Console** -- shows the summary on each scheduled run.
The playwright engine renders JavaScript before extraction, so client-side apps and infinite-scroll shells produce real content instead of an empty HTML skeleton.
The RAG pipeline's **HTTP Scraper** on [Document Processing](/nodes/documents) is a different node: it extracts *links* from listing pages to feed the download/parse/chunk/embed pipeline, while the nodes on this page extract *content*.
***
## Tips
Start with `beautifulsoup` -- it is much faster and cheaper than a browser. Switch to `playwright` only when the page genuinely needs JavaScript to render its content.
In crawl mode, always set **URL Pattern** and a sensible **Max Pages**. An unconstrained crawl of a large site burns your whole `timeout` on pages you do not need.
Use **Proxy Config**'s `test_provider` operation right after `set_credentials` -- it does a live round-trip and returns the exit IP and latency, so a typo in credentials surfaces immediately.
***
## Related
Find URLs before you scrape them
Interact with pages instead of just reading them
Feed scraped documents into the RAG pipeline
Give agents scraping tools
# Web Search
Source: https://docs.opencompany.sh/nodes/search
Brave, DuckDuckGo, Perplexity, and Serper search nodes - usable as workflow steps or AI agent tools
OpenCompany ships four web search nodes, usable in two ways:
* **As a workflow step** -- drop the node on the canvas, set the **Query** parameter, and wire its output into downstream nodes (Brave, Serper, and Perplexity are dual-purpose nodes).
* **As an AI agent tool** -- connect the node's tool output to an AI Agent's tools input. The agent sees the node as a callable tool, fills in the query itself, and decides *when* (and whether) to search during its reasoning loop. All four nodes work this way; DuckDuckGo is a pure tool node, so this is its only mode.
The same parameters documented below apply on both paths -- when an agent calls the tool, the LLM fills the same parameter schema you would fill in the parameter panel.
## Choosing a search node
| Node | API key needed | Best for |
| ----------------- | -------------------- | ------------------------------------------------------------------------- |
| DuckDuckGo Search | None (free) | Zero-setup web search; the default choice for agent tools |
| Brave Search | Brave Search API key | Ranked web results with title/snippet/URL, country and language targeting |
| Serper Search | Serper API key | Google results, including news, images, and places verticals |
| Perplexity Search | Perplexity API key | An AI-written answer with citation URLs, not a raw result list |
Paid keys are added in the credentials modal: **Brave Search**, **Serper**, and **Perplexity** each have their own entry with an **API Key** field.
***
## DuckDuckGo Search
Free web search with no API key and no credentials, via the `ddgs` Python library. This is a pure tool node -- its only entry point is an AI agent calling it through the tools connection, so it exposes a **Tool** output handle rather than a main output. The tool is exposed to the LLM as `web_search`.
### Parameters
Search query
Maximum results to return (1-20)
### Output
```json theme={null}
{
"query": "workflow automation platforms",
"results": [
{"title": "Result title", "snippet": "Result body text...", "url": "https://example.com/page"}
],
"provider": "duckduckgo"
}
```
If DuckDuckGo rejects the query (rate limit, transient network failure, bot detection), the node surfaces a clean "DuckDuckGo search failed" error that the agent can act on by retrying with a different query.
***
## Brave Search
Free-text web search via the Brave Search REST API. Returns ranked web results with title, snippet, and URL. Tool name when connected to an agent: `brave_search`.
### Parameters
Search query
Maximum results to return (1-20). Values above 20 fail validation rather than being silently capped.
ISO country code (e.g. `US`). Only sent to the API when set.
ISO language code
One of `off`, `moderate`, or `strict`
### Output
```json theme={null}
{
"query": "workflow automation platforms",
"results": [
{"title": "Result title", "snippet": "Result summary...", "url": "https://example.com/page"}
],
"result_count": 10,
"provider": "brave_search"
}
```
### Example: country-targeted search
```
Query: best coffee subscription
Max Results: 5
Country: US
Safe Search: moderate
```
***
## Serper Search
Google SERP results via the Serper API. Supports four search verticals -- web, news, images, and places -- plus optional knowledge-graph enrichment on the default web search. Tool name when connected to an agent: `serper_search`.
### Parameters
Search query
One of `search` (web), `news`, `images`, or `places`
Maximum results to return (1-100)
Country code, sent as Google's `gl` parameter. Only sent when set.
Language code, sent as Google's `hl` parameter
### Output
```json theme={null}
{
"query": "openai announcements",
"results": [
{"title": "Result title", "snippet": "Result summary...", "url": "https://example.com/page", "position": 1}
],
"result_count": 10,
"search_type": "search",
"knowledge_graph": null,
"provider": "serper"
}
```
Every result uses the same unified shape regardless of vertical; fields a vertical does not populate are left empty:
| Vertical | Populated fields |
| -------- | ------------------------------------- |
| `search` | `title`, `snippet`, `url`, `position` |
| `news` | `title`, `snippet`, `url` |
| `images` | `title`, `url` (image URL) |
| `places` | `title`, `url` (website) |
`knowledge_graph` is only set when Google returns a knowledge-graph panel for the query.
***
## Perplexity Search
An AI-generated answer with inline citations from Perplexity's Sonar models. Instead of a raw result list, you get an LLM-written markdown answer *plus* the citation URLs the model used, so downstream nodes can render references or follow the sources. Tool name when connected to an agent: `perplexity_search`.
### Parameters
Question for the model
One of `sonar`, `sonar-pro`, `sonar-reasoning`, or `sonar-reasoning-pro`
Restrict sources by recency: `all` (off), `month`, `week`, `day`, or `hour`
Request images from the API
Request related questions from the API
### Output
```json theme={null}
{
"query": "what changed in the latest React release?",
"answer": "Markdown answer with inline citations...",
"citations": ["https://react.dev/blog/..."],
"results": [{"url": "https://react.dev/blog/..."}],
"images": null,
"related_questions": null,
"model": "sonar",
"provider": "perplexity"
}
```
The `results` list is a remap of the citation URLs -- entries carry only `url`, not `title` or `snippet`. If downstream nodes need titles and snippets, use **Brave Search** or **Serper Search** instead.
***
## Give your agent search
Any search node becomes an agent tool by connecting its tool output to the AI Agent's tools input:
```
[DuckDuckGo Search] --> (tools) [AI Agent] <-- (model) [Chat Model]
```
Once connected, the agent decides when to search. It may answer directly from its own knowledge, or call the tool one or more times with queries it composes itself -- you do not script the searches. The node's tool description tells the LLM what the tool does; each node ships a sensible default.
Connect several search nodes at once and the agent picks between them (for example, DuckDuckGo for general lookups and Perplexity when it wants a synthesized, cited answer).
***
## Example: research agent
The cheapest possible research setup -- the only credential required is the API key for your chat model, because DuckDuckGo needs none:
```
[Chat Trigger] --> [AI Agent] <-- (model) [OpenAI Chat Model]
^
| (tools)
[DuckDuckGo Search]
```
1. Drop an **AI Agent** on the canvas and connect a chat model.
2. Add a **DuckDuckGo Search** node and connect its **Tool** handle to the agent's tools input.
3. Ask the agent something time-sensitive in the Chat panel, e.g. "What were the top tech headlines this week? Summarize in three bullets."
The agent calls `web_search` (possibly several times with refined queries), reads the snippets, and writes the summary.
***
## Tips
Start with **DuckDuckGo Search** -- it is free and needs no key. Add **Brave Search** or **Serper Search** when you need country/language targeting, more results, or Google's verticals.
**Perplexity Search** returns an answer, not links. Use it when the agent needs a synthesized, cited response in one call; use the other nodes when downstream logic needs structured result lists.
Keep `max_results` small for agent tools. Fewer, more relevant snippets keep the agent's context lean and its follow-up queries sharper.
Brave's `max_results` is hard-limited to 20 -- a larger value fails parameter validation instead of being clamped. Serper accepts up to 100.
***
## Related
Connect search tools to agents
Read full pages instead of snippets
Click, type, and extract from live pages
The full AI tool catalogue
# AI Skills
Source: https://docs.opencompany.sh/nodes/skills
The Master Skill node aggregates skills that extend AI Agent and Chat Agent capabilities
# AI Skills
Skills are modular capabilities that guide an agent's behavior. In OpenCompany, you add skills through the **Master Skill** node, which aggregates many individual skills behind a single split-panel editor with enable/disable toggles. The Master Skill node connects to an agent's `input-skill` handle to inject the enabled skills' instructions and tools.
## How Skills Work
Each skill is defined in a Markdown file (`SKILL.md`) with YAML frontmatter that follows the [Agent Skills specification](https://agentskills.io/specification):
```yaml theme={null}
---
name: skill-name
description: Brief description for LLM visibility
allowed-tools: tool1 tool2
metadata:
author: opencompany
version: "1.0"
category: general
icon: "🔧"
color: "#6366F1"
---
# Skill Instructions (Markdown)
Detailed instructions loaded when the skill is activated.
```
When a skill is enabled in a Master Skill node connected to an agent, the skill's instructions are added to the system prompt, and any tools it references (via `allowed-tools`) can be used when the matching Tool nodes are wired to the agent.
### Database as Source of Truth
Skill instructions follow a **DB-first architecture**:
1. **First load** reads from the `SKILL.md` file on disk and seeds it into the database
2. **After seeding**, the database is the single source of truth for all skill content
3. **User edits** in the UI are saved to the database only (not written back to disk)
4. **"Reset to Default"** reloads the original `SKILL.md` content from the filesystem
This ensures your customizations are always preserved in the database while the original `SKILL.md` files remain as defaults.
## The Master Skill Node
The Master Skill node (category: **AI Tools**) is the single node you use to attach skills to an agent. It has no Run button and no input/output data panels; it is a passive aggregator that the connected agent reads during execution.
### Connecting
The Master Skill node's **Skill** output connects to an agent's **input-skill** handle (diamond shape). You can also connect regular Tool nodes and a Simple Memory node to the same agent.
```
[Master Skill] --(skill handle)--> [AI Agent] --> [Output]
```
### Split-Panel Editor
Selecting a Master Skill node opens a split-panel editor:
* **Folder dropdown** at the top selects a skill folder (for example, `assistant`, `web_agent`, `coding_agent`).
* **Left panel** lists the skills in that folder with a checkbox for each. Enabled skills are counted in a badge, and you can search the list.
* **Right panel** shows the selected skill's Markdown instructions in an editor, with a **Reset to Default** button.
Enabled skills persist across all folders, not just the currently selected one, so switching folders never disables skills you turned on elsewhere.
### Parameters
The skill folder currently shown in the editor's dropdown.
A map of skill name to its state (`enabled`, `instructions`, `isCustomized`). This is populated by the split-panel editor as you toggle and edit skills.
***
## Built-in Skill Folders
Skills are organized in subfolders under `server/skills/`. Each top-level folder appears as an option in the Master Skill node's folder dropdown. The current folders are:
General assistant behavior — assistant personality, memory, write-todos, compaction, humanify, agent-builder, subagent
Web automation — HTTP requests, browser, DuckDuckGo/Brave/Serper/Perplexity search, Apify, Crawlee scraper, proxy config
Code and files — Python, Monty (sandboxed Python), JavaScript, file read/modify, filesystem search
Shell and processes — shell (Nushell), process manager, bash, PowerShell, WSL
Social messaging — WhatsApp send, WhatsApp DB, Twitter send/search/user
Google Workspace — Gmail, Calendar, Drive, Sheets, Tasks, Contacts
Task automation — timer, cron scheduler, task manager
Location — geocoding, nearby places
Android device control — battery, WiFi, Bluetooth, apps, camera, sensors, screen control, location
Autonomous patterns — agentic loop, code mode, progressive discovery, error recovery, multi-tool orchestration
Payments — Stripe
Recursive Language Model reasoning
The exact skills within each folder evolve over time. Use the folder dropdown in the Master Skill editor to see the live list scanned from disk.
***
## Skill Content Editor
The right panel of the Master Skill editor is a built-in Markdown editor for viewing and editing a skill's instructions:
1. Select a Master Skill node and pick a folder
2. Click a skill in the left panel to load its instructions on the right
3. Make changes as needed
4. Changes are saved to the database; click **Reset to Default** to restore the original `SKILL.md`
Edits are saved to the database only. The original `SKILL.md` file on disk is not modified.
***
## Custom Skills
You can create your own skills directly from the Master Skill editor.
Select a Master Skill node connected to your agent.
Click the **+** button in the left panel. Provide a name, display name, and instructions.
Toggle the new skill on. Its enabled state and instructions are saved to the node and persist across panel close and reload.
User-created skills are stored in the database and can be created, edited, and deleted inline. They load through the same path as built-in skills, so their instructions appear in the editor the same way.
### SKILL.md Format for Custom Skills
```yaml theme={null}
---
name: my-custom-skill
description: Description visible to the LLM
allowed-tools: httpRequest calculatorTool
metadata:
author: your-name
version: "1.0"
category: general
icon: "🔧"
color: "#6366F1"
---
# Custom Skill Instructions
You are a specialized assistant that...
## Available Actions
- Action 1: Description
- Action 2: Description
## Guidelines
- Guideline 1
- Guideline 2
```
***
## Skills and Tools Work Together
A skill's `allowed-tools` list tells the agent which tools it may use for that skill's tasks. The tools themselves come from Tool nodes wired to the agent's `input-tools` handle. In practice:
* **Skill** — teaches the agent *how* and *when* to act (instructions in the system prompt)
* **Tool** — gives the agent the actual capability to act (the executable node)
```
[Master Skill] --(skill handle)-------+
+---> [AI Agent] --> [Output]
[WhatsApp Send tool] --(tools handle)-+
[HTTP Request tool] --(tools handle)--+
```
Skills describe capabilities, but the corresponding Tool nodes must be connected to the agent's tools handle for the agent to actually perform those actions.
***
## Tips
Enable only the skills you need. Too many skills can dilute the agent's focus and grow the system prompt.
Use custom skills to create domain-specific assistants tailored to your use case.
Skill instructions should be clear and specific about when to use each capability.
***
## Related
Connect the Master Skill node to an agent
Tool nodes that skills reference in allowed-tools
LLM providers for AI Agent and Chat Agent
WhatsApp messaging nodes
# Stripe
Source: https://docs.opencompany.sh/nodes/stripe
Run Stripe operations and react to Stripe webhooks from your workflows
# Stripe
Two nodes built on the official [Stripe CLI](https://stripe.com/docs/stripe-cli): **Stripe** (action) runs any Stripe CLI command — customers, charges, payment intents, refunds, invoices, subscriptions, and more — and **Stripe Receive** (trigger) fires your workflow when a Stripe webhook event arrives. The action node is dual-purpose: wire it to an AI Agent's tools handle and the agent can call it as the `stripe_action` tool.
| Node | Kind | What it does |
| -------------- | ---------------- | ------------------------------------------------- |
| Stripe | Action + AI tool | Run any Stripe CLI command and return parsed JSON |
| Stripe Receive | Trigger | Fires on incoming Stripe webhook events |
***
## Connect Stripe
Stripe auth is handled entirely by the Stripe CLI — you never paste an API key into OpenCompany.
1. Click the key icon to open **API Credentials** and select **Stripe** under the Payments category.
2. Click **Login with Stripe**. The Stripe CLI is auto-installed on first use if it is not already on your PATH (downloaded from Stripe's GitHub releases into OpenCompany's data directory).
3. A new browser tab opens the Stripe Dashboard, and the modal shows a verification code. Confirm the code matches and authorize.
4. The CLI stores its credentials in its own config file (`~/.config/stripe/config.toml`); OpenCompany never keeps your Stripe keys.
After you authorize, webhook listening starts automatically: OpenCompany supervises a `stripe listen` process that forwards your account's events to the local server, and the webhook signing secret is captured automatically so every forwarded event is signature-verified. The **Disconnect** button stops the listener and runs `stripe logout --all`.
***
## Stripe Action
Pass-through over the Stripe CLI. Type the command exactly as you would after `stripe ` on a terminal — the CLI does its own argument parsing and validation, so every Stripe resource is supported without OpenCompany-specific wrappers.
### Parameters
Stripe CLI command, exactly as you would type after `stripe `. Examples: `customers create --email a@b.com`, `charges list --limit 10`, `trigger charge.succeeded`. Reference: [stripe.com/docs/cli](https://stripe.com/docs/cli)
The command string is split with shell-style quoting, so wrap arguments that contain spaces in quotes: `customers create --email a@b.com --name "Acme Inc"`.
| Example command | What it does |
| ----------------------------------------------------- | --------------------------- |
| `customers create --email a@b.com --name "Acme Inc"` | Create a customer |
| `customers list --limit 10` | List recent customers |
| `payment_intents create --amount 2000 --currency usd` | Create a PaymentIntent |
| `refunds create --payment-intent pi_...` | Refund a PaymentIntent |
| `charges retrieve ch_...` | Fetch a charge |
| `trigger charge.succeeded` | Fire a synthetic test event |
### Output
```json theme={null}
{
"command": "customers create --email rosy@sparrow.com",
"success": true,
"result": {
"id": "cus_ABC123",
"object": "customer",
"email": "rosy@sparrow.com"
},
"stdout": "{...}"
}
```
`result` holds the CLI's parsed JSON response; `stdout` keeps the raw output.
### Example: Create and charge a customer
```
Command: payment_intents create --amount 2000 --currency usd --customer cus_ABC123
```
As an AI tool (`stripe_action`), the LLM fills the same single `command` field — prompt an agent with "create a Stripe test customer with email [rosy@sparrow.com](mailto:rosy@sparrow.com)" and it emits the CLI call for you.
***
## Stripe Receive
Trigger that fires when the supervised `stripe listen` daemon forwards a webhook event. Events are signature-verified before they reach your workflow.
### Parameters
Event type to match: `all` for every event, an exact name (`charge.succeeded`), or a wildcard prefix (`charge.*`, `payment_intent.*`). Write the Stripe event name directly — the internal `stripe.` prefix is added automatically.
`all`, `test`, or `live` — filter on the event's livemode flag
The node refuses to start waiting if the Stripe listener daemon is not running — connect Stripe in **API Credentials** first.
### Output
```json theme={null}
{
"event_id": "evt_1PabcDEF",
"event_type": "charge.succeeded",
"created": 1767225600,
"livemode": false,
"api_version": "2026-01-01",
"request_id": "req_9XyZ",
"account": "default",
"data": {
"object": {
"id": "ch_3Pabc",
"amount": 2000,
"currency": "usd"
}
}
}
```
`data` carries the event's payload — the Stripe object that changed.
### Example: Listen for successful charges
```
Event Type Filter: charge.succeeded
Livemode Filter: all
```
To test without real payments, run `trigger charge.succeeded` through the Stripe Action node — the CLI fires a synthetic event that flows through the same webhook path.
***
## Example: Payment notification
Email yourself whenever a charge succeeds:
```
[Stripe Receive] --> [AI Agent] --> [Email Send]
```
1. **Stripe Receive**
* Event Type Filter: `charge.succeeded`
2. **AI Agent**
* Prompt: "Write a one-line summary of this Stripe charge: amount, currency, and customer if present."
3. **Email Send**
* To: your own address
* Subject: `Payment received`
* Body: the agent's summary
Deploy the workflow so the trigger stays armed for every incoming event.
Logging in through the Stripe CLI grants keys for both live mode and the test sandbox (valid 90 days). Commands you run through Stripe Action can affect real customers and real money in live mode, and Stripe Receive sees events from both modes by default — use the livemode filter to separate them.
***
## Tips
All Stripe CLI commands are supported automatically — new Stripe resources work without any OpenCompany update.
Combine Stripe Action with the payments skill on an AI agent for multi-step flows like "refund the most recent payment from [rosy@sparrow.com](mailto:rosy@sparrow.com)".
***
## Related
Generic HTTP triggers and responses
Use Stripe Action as an AI tool
Send payment notifications by mail
Scheduled reconciliation workflows
# AI Tools
Source: https://docs.opencompany.sh/nodes/tools
Tool nodes that give AI Agents capabilities to perform actions
# AI Tools
Tool nodes provide capabilities that AI Agents can invoke during reasoning. Each tool defines a schema that the LLM understands and uses to decide when and how to call the tool.
## How Tools Work
1. **Connect** Tool nodes to the AI Agent's `input-tools` handle (diamond shape)
2. **Agent discovers** connected tools and their schemas
3. **LLM decides** when to call tools based on the user's request
4. **Tool executes** and returns results to the agent
5. **Agent continues** reasoning with the tool's output
```
[Calculator Tool] --+
+--(tools handle)--> [AI Agent] --> [Output]
[Web Search Tool] --+
```
## Available Tools
| Tool | Description | Use Case |
| --------------------------- | ------------------------------- | ------------------------------------ |
| Calculator | Math operations | Calculations, arithmetic |
| Current Time | Date/time with timezone | Scheduling, time-based logic |
| Timer | Set delays and timers | Rate limiting, scheduled pauses |
| Task Manager | Track delegated sub-agent tasks | Check status/results of child agents |
| Write Todos | Structured task-list planning | Multi-step task organization |
| Agent Builder | Grow the canvas at runtime | Add tools/skills/teammates mid-run |
| DuckDuckGo Search | Free web search (no API key) | Current information, research |
| Brave / Serper / Perplexity | API-key web search | Higher-quality search, AI answers |
| Android Toolkit | Android device control | Device automation |
| Agent Delegation | Delegate to a child agent | Complex sub-tasks |
Many nodes are **dual-purpose** - they work as standalone workflow nodes AND as AI Agent tools. Search nodes (Brave, Serper, Perplexity), the code executors (Python, Monty, JavaScript, TypeScript), WhatsApp, Telegram, Google Workspace, email, and browser nodes all fill the same tool schema when connected to an agent's `input-tools` handle. See [Documents](/nodes/documents), [WhatsApp](/nodes/whatsapp), and [AI Agents](/nodes/ai-agent) for those.
***
## Calculator Tool
Performs mathematical operations including basic arithmetic and advanced functions.
### Operations
| Operation | Description | Example |
| --------- | -------------- | ------------ |
| add | Addition | 5 + 3 = 8 |
| subtract | Subtraction | 10 - 4 = 6 |
| multiply | Multiplication | 6 \* 7 = 42 |
| divide | Division | 20 / 4 = 5 |
| power | Exponentiation | 2^8 = 256 |
| sqrt | Square root | sqrt(16) = 4 |
| mod | Modulo | 17 % 5 = 2 |
| abs | Absolute value | abs(-5) = 5 |
### Parameters
Tool identifier shown to the LLM
Description of the tool's capabilities for the LLM
### Schema (LLM View)
```json theme={null}
{
"operation": "add | subtract | multiply | divide | power | sqrt | mod | abs",
"a": "number (first operand)",
"b": "number (second operand, optional for sqrt/abs)"
}
```
### Example Interaction
```
User: "What's 15% of 230?"
Agent: [Calls calculator with multiply(230, 0.15)]
"15% of 230 is 34.5"
```
***
## Current Time Tool
Gets the current date and time with timezone support.
### Parameters
Tool identifier shown to the LLM
Description of the tool's capabilities
Default timezone (e.g., "America/New\_York", "Europe/London", "Asia/Tokyo")
### Schema (LLM View)
```json theme={null}
{
"timezone": "string (optional, defaults to UTC)"
}
```
### Output
```json theme={null}
{
"iso": "2026-01-30T14:30:00-05:00",
"timezone": "America/New_York",
"unix": 1769801400
}
```
### Example Interaction
```
User: "What time is it in Tokyo?"
Agent: [Calls get_current_time with timezone="Asia/Tokyo"]
"It's currently 4:30 AM on Friday in Tokyo."
```
***
## Timer Tool
The Timer node is a **dual-purpose node** that works both as a workflow delay node and as an AI Agent tool. When connected to an agent's `input-tools` handle, the agent can set timers and delays programmatically.
### Parameters
Tool identifier shown to the LLM
Delay duration
Time unit: seconds, minutes, hours
### Schema (LLM View)
```json theme={null}
{
"delay": "number (duration to wait)",
"unit": "seconds | minutes | hours"
}
```
### Output
```json theme={null}
{
"delayed": true,
"duration_ms": 5000,
"completed_at": "2025-01-30T10:30:05Z"
}
```
### Example Interaction
```
User: "Wait 5 seconds before checking the battery again"
Agent: [Calls timer with delay=5, unit="seconds"]
[Calls battery status after timer completes]
"After waiting 5 seconds, the battery is now at 73%."
```
The Timer node appears in both the **Schedulers** section (as a workflow node) and the **Tools** section (as an AI Agent tool). See [Schedulers & Triggers](/nodes/schedulers) for workflow usage.
***
## Task Manager Tool
Tracks tasks delegated to child sub-agents. When a parent agent delegates work to a connected agent (fire-and-forget), it uses this tool to check on progress and results.
### Schema (LLM View)
```json theme={null}
{
"action": "create | list | complete | delete | update",
"task_id": "string (optional)",
"title": "string (optional)",
"description": "string (optional)",
"status": "string (optional)"
}
```
### Example Interaction
```
User: "Did the coding agent finish that JSON parser?"
Agent: [Calls task_manager with action="list"]
"The coding agent completed the task - here's the function it wrote..."
```
***
## Write Todos Tool
Structured task-list planning for complex multi-step operations. The agent maintains a checklist of pending / in-progress / completed items, updating it as it works. This helps the agent stay organized and lets you watch progress in real time.
### Schema (LLM View)
```json theme={null}
{
"todos": [
{ "content": "string (task description)", "status": "pending | in_progress | completed" }
]
}
```
### Editable Current Todos Panel
When you select a Write Todos node, its parameter panel shows the LIVE todo list (shared by all Write Todos nodes in the same workflow). You can add, remove, edit text, or click an item to cycle its status - and the agent sees your edits on its next turn.
### Example Interaction
```
User: "Build a login form with validation and tests"
Agent: [Calls write_todos to plan: 1) create form, 2) add validation, 3) write tests]
[Marks each item in_progress then completed as it works]
```
The agent only reaches for this tool on genuinely multi-step work (3+ steps). Trivial requests are handled directly without a todo list.
***
## Agent Builder Tool
Lets an agent grow its own toolset at runtime by mutating the canvas. The LLM sees a single `agentBuilder` tool with an `operation` selector.
| Operation | What it does |
| --------------- | ------------------------------------------------------------------------- |
| inspect\_canvas | Read-only snapshot of nodes, edges, and what's wired to the calling agent |
| add\_tool | Spawn a tool node and wire it into the caller's tools handle |
| add\_skill | Toggle a skill on the caller's Master Skill (creating one if needed) |
| add\_subagent | Spawn a delegate agent and wire it to a team-lead's teammates handle |
Tools added mid-run become callable on the agent's **next** turn, not the current one - the agent loop binds tools at the start of each turn. Each operation's summary ends with "Available on your next turn" so the agent knows to wait.
***
## Web Search Tools
OpenCompany ships one free web-search tool plus three dual-purpose search nodes that also work as standalone workflow nodes.
### DuckDuckGo Search
Free web search - no API key required. Exposed to the agent as the `web_search` tool.
The search query
Maximum number of results to return
```json theme={null}
{
"results": [
{ "title": "Result Title", "url": "https://example.com/page", "snippet": "Brief description..." }
]
}
```
### Brave / Serper / Perplexity (dual-purpose, API key required)
These are dual-purpose nodes - they run as normal workflow search nodes AND as AI Agent tools when connected to the tools handle.
| Node | Tool | Backend | Notes |
| ----------------- | ------------------- | --------------------- | ----------------------------------------------------------- |
| Brave Search | `brave_search` | Brave Search API | Web results with titles, snippets, URLs |
| Serper Search | `serper_search` | Google via Serper API | Web / news / images / places search types + knowledge graph |
| Perplexity Search | `perplexity_search` | Perplexity Sonar AI | AI-generated answer with inline citations and source URLs |
### Provider Comparison
| Feature | DuckDuckGo | Brave / Serper / Perplexity |
| -------------- | ---------- | --------------------------- |
| Cost | Free | Paid (API key) |
| Setup | None | API key in Credentials |
| Result Quality | Good | Excellent |
### Example Interaction
```
User: "What are the latest developments in quantum computing?"
Agent: [Calls web_search with query="quantum computing news 2026"]
"Here are the latest developments in quantum computing:
1. IBM announced a new 1000-qubit processor...
2. Google achieved quantum error correction milestone..."
```
***
## Android Toolkit
Gateway tool that aggregates Android service nodes for device control.
### Architecture
The Android Toolkit follows the **Sub-Node** pattern from n8n and **Toolkit** pattern from LangChain:
```
[Battery Monitor] --+
[WiFi Automation] --+--(main input)--> [Android Toolkit] --(tools handle)--> [AI Agent]
[Location] --------+
```
Connected Android service nodes define what the toolkit can do. The LLM sees a single `android_device` tool with capabilities based on connected services.
### Parameters
Tool identifier shown to the LLM
Description of the toolkit's capabilities
### Schema (Dynamic)
The schema is built dynamically based on connected Android service nodes:
```json theme={null}
{
"service_id": "battery | wifi_automation | location | ...",
"action": "status | enable | disable | get | set | ...",
"parameters": {
// Action-specific parameters
}
}
```
### Connecting Services
1. Add Android service nodes (Battery Monitor, WiFi Automation, etc.)
2. Connect them to the Android Toolkit's main input
3. Connect the Toolkit to the AI Agent's tools handle
Only connected services are available to the agent.
### Tool Schema Editor
The Android Toolkit includes a schema editor for customizing how the LLM sees each service:
1. Select the Android Toolkit node
2. Open the Tool Schema Editor
3. Select a connected service
4. Customize the description, fields, and types
5. Save changes
### Example Interaction
```
User: "Check the battery level and turn on WiFi if it's above 50%"
Agent: [Calls android_device with service_id="battery", action="status"]
Battery is at 72%
[Calls android_device with service_id="wifi_automation", action="enable"]
"Battery is at 72%, which is above 50%. I've enabled WiFi."
```
### Available Services
When corresponding Android service nodes are connected:
| Service | Actions | Description |
| ---------------------- | ------------------------------- | ------------------------------------- |
| battery | status | Battery level, charging state, health |
| wifi\_automation | status, enable, disable, scan | WiFi control |
| bluetooth\_automation | status, enable, disable, paired | Bluetooth control |
| location | get | GPS coordinates |
| app\_launcher | launch | Launch apps by package name |
| app\_list | list | Installed applications |
| audio\_automation | get, set, mute, unmute | Volume control |
| camera\_control | info, capture | Camera operations |
| motion\_detection | get | Accelerometer/gyroscope data |
| environmental\_sensors | get | Temperature, humidity, light |
***
## Tool Execution Flow
When the AI Agent calls a tool:
1. **Status broadcast** - `executing_tool` status sent to frontend
2. **Tool node highlighted** - Shows cyan border and pulse animation
3. **Handler executed** - Backend runs the tool's handler function
4. **Result returned** - Output sent back to the agent
5. **Agent continues** - Incorporates result into response
### Tool Output in Variables
Tool outputs are available as template variables:
```
{{calculatorTool.result}}
{{duckduckgoSearch.results}}
{{androidTool.output}}
```
***
## Agent Delegation Tool
AI Agents and specialized agents can be connected as tools to parent agents, enabling hierarchical task delegation. OpenCompany ships 16 specialized agents (Android, Coding, Web, Task, Social, Travel, Tool, Productivity, Payments, Consumer, Autonomous, Orchestrator, AI Employee) plus the RLM, Claude Code, and Codex agents.
### How It Works
1. Connect any agent to a parent agent's `input-tools` handle
2. Parent calls `delegate_to_(task, context)`
3. The child agent runs with its own connected tools, skills, and memory
4. Team-lead agents (Orchestrator, AI Employee) delegate through a dedicated `input-teammates` handle
### Schema
```json theme={null}
{
"task": "string (required) - The task to delegate",
"context": "string (optional) - Additional context"
}
```
### Example
```
[AI Agent] <--tools-- [Coding Agent] <--tools-- [Python Executor]
```
Parent delegates: `delegate_to_coding_agent(task="Write a function to parse JSON")`
Child agent executes independently with its own connected tools.
Use agent delegation for complex sub-tasks that don't need immediate results.
***
## Creating Custom Tools
Custom tools are backend plugins. Each tool is a single self-contained folder under `server/nodes/tool//` rooted at `__init__.py` - a `ToolNode` subclass whose Pydantic `Params` model drives the LLM-visible schema. The plugin auto-registers on import; no frontend edits are needed.
Key steps:
1. Create `server/nodes/tool//__init__.py` with a `ToolNode` subclass
2. Define a Pydantic `Params` model (its fields become the tool's LLM schema)
3. Implement the operation with an `@Operation` method
4. Set `component_kind = "tool"` and add `group = ("tool", "ai")`
See the Nodes Cookbook (`server/nodes/README.md`) and the Node Creation Guide in the repository for the full recipe.
***
## Tips
Connect only the tools the agent needs. Too many tools can confuse the LLM.
Provide clear **toolDescription** to help the LLM understand when to use each tool.
Use **Web Search** for current information not in the model's training data.
The **Android Toolkit** only shows services you connect - add only what you need.
Tool nodes execute when the AI Agent calls them, not when the workflow runs. They're passive until invoked.
***
## Related
Connect tools to AI Agent
Skills that use tools
16 Android service nodes
HTTP Request node
# Webhooks & HTTP
Source: https://docs.opencompany.sh/nodes/webhooks
HTTP requests and webhook handling nodes
# Webhooks & HTTP
Make HTTP requests to external APIs and receive incoming webhooks.
## Available Nodes
| Node | Type | Purpose |
| ---------------- | --------------------- | -------------------------------------- |
| HTTP Request | Action (also AI tool) | Make outgoing HTTP calls |
| Webhook Trigger | Trigger | Receive incoming HTTP requests |
| Webhook Response | Action | Send custom response to webhook caller |
OpenCompany also ships other event-based triggers that start a workflow the same way Webhook Trigger does:
| Trigger | Fires when |
| -------------- | ------------------------------------------------------------ |
| Chat Trigger | A message is sent from the Console panel's chat tab |
| Task Completed | A delegated child agent finishes its task (success or error) |
Trigger nodes only start firing once a workflow is **deployed**. Deploy from the toolbar; a saved-but-not-deployed workflow does not listen for events.
***
## HTTP Request
Make HTTP requests to external APIs and services.
### Parameters
The URL to request. Supports template variables.
HTTP method: GET, POST, PUT, DELETE, PATCH
Request headers as JSON object
Request body (JSON object or raw string). Only sent for POST, PUT, and PATCH; ignored for GET and DELETE.
Request timeout in seconds (1-600)
Route the request through a residential proxy provider. When enabled, you can also set `proxy_provider` (default `auto`), `proxy_country` (ISO code), and `session_type` (rotating or sticky).
### Output
```json theme={null}
{
"status": 200,
"data": {
"result": "response data"
},
"headers": {
"content-type": "application/json"
},
"url": "https://api.example.com/users/42",
"method": "GET",
"proxied": false
}
```
HTTP Request is also a **dual-purpose tool** — connect it to an AI Agent's tools handle and the agent can make HTTP calls on its own.
### Examples
**GET Request:**
```
URL: https://api.example.com/users/{{input.user_id}}
Method: GET
Headers: {"Authorization": "Bearer {{input.token}}"}
```
**POST Request:**
```
URL: https://api.example.com/orders
Method: POST
Headers: {"Content-Type": "application/json"}
Body: {"product": "{{input.product}}", "quantity": {{input.qty}}}
```
**External API Integration:**
```
URL: https://api.openweathermap.org/data/2.5/weather?q={{input.city}}&appid=YOUR_KEY
Method: GET
```
***
## Webhook Trigger
Receive incoming HTTP requests at a dynamic endpoint.
### Parameters
The webhook path (e.g., "orders" creates /webhook/orders)
HTTP method filter: GET, POST, PUT, DELETE, or ALL (ALL accepts any method)
How to respond to the caller. `immediate` returns 200 OK right away. `responseNode` waits for a downstream Webhook Response node to send the reply.
Auth method: `none` (no auth) or `header` (require a matching header)
Header name to check (when authentication is `header`)
Expected header value (when authentication is `header`)
### Webhook URL
Your webhook will be available at:
```
http://localhost:5678/webhook/{path}
```
For production:
```
https://your-domain.com/webhook/{path}
```
### Output
```json theme={null}
{
"method": "POST",
"path": "orders",
"headers": {
"content-type": "application/json",
"user-agent": "curl/7.68.0"
},
"query": {
"source": "website"
},
"body": "{\"order_id\": \"12345\", \"items\": [\"item1\", \"item2\"]}",
"json": {
"order_id": "12345",
"items": ["item1", "item2"]
}
}
```
`body` holds the raw request text; `json` holds the parsed object when the request has a JSON content type. Reference either in downstream nodes, e.g. `{{webhookTrigger.json.order_id}}`.
### Authentication Options
| Type | Description |
| ------ | --------------------------------------------------------------------------------------- |
| None | No authentication — any request is accepted |
| Header | Require a matching header. Set the header name (default `X-API-Key`) and expected value |
***
## Webhook Response
Send a custom response back to the webhook caller.
### Parameters
HTTP status code to return (100-599)
Response body. Supports template variables like `{{input.key}}` and `{{nodeType.key}}` resolved from connected node outputs. When left empty, the first connected output is returned as JSON.
Content-Type header (e.g., `application/json`, `text/plain`, `text/html`)
Additional response headers as a JSON object
For Webhook Response to actually reach the caller, set the Webhook Trigger's **Response Mode** to `responseNode`. In `immediate` mode the trigger returns 200 OK right away and any downstream response is ignored.
### Example Responses
**Success Response:**
```
Status Code: 200
Body: {"success": true, "message": "Order received", "id": "{{generated.id}}"}
Content Type: application/json
```
**Error Response:**
```
Status Code: 400
Body: {"error": "Invalid request", "details": "{{validation.error}}"}
Content Type: application/json
```
**HTML Response:**
```
Status Code: 200
Body: Thank you!
Content Type: text/html
```
***
## Common Workflows
### API Endpoint
Create a simple API endpoint:
```
[Webhook Trigger] --> [Python Executor] --> [Webhook Response]
(path: api) (process data) (return result)
```
**Test:**
```bash theme={null}
curl -X POST http://localhost:5678/webhook/api \
-H "Content-Type: application/json" \
-d '{"action": "calculate", "value": 100}'
```
### Third-Party Integration
Receive events from external services:
```
[Webhook Trigger] --> [HTTP Request] --> [WhatsApp Send]
(stripe/github) (fetch details) (notify admin)
```
### Data Pipeline
Forward data to multiple destinations:
```
[Webhook Trigger] --> [HTTP Request #1] (Database API)
|
--> [HTTP Request #2] (Analytics)
|
--> [WhatsApp Send] (Notification)
```
### AI-Powered API
Create an AI endpoint:
```
[Webhook Trigger] --> [AI Agent] --> [Webhook Response]
^
[Chat Model]
```
**Prompt:** `{{webhookTrigger.json.prompt}}`
**Response:** `{{aiAgent.response}}`
Wire a chat model node (OpenAI, Anthropic, Gemini, and more — see [AI Models](/nodes/ai-models)) into the AI Agent's model handle to power the endpoint.
***
## Testing Webhooks
### Using curl
```bash theme={null}
# GET request
curl http://localhost:5678/webhook/test
# POST with JSON
curl -X POST http://localhost:5678/webhook/orders \
-H "Content-Type: application/json" \
-d '{"item": "Widget", "quantity": 5}'
# With authentication
curl -X POST http://localhost:5678/webhook/secure \
-H "Authorization: Bearer your-token" \
-d '{"data": "value"}'
```
### Using HTTPie
```bash theme={null}
http POST localhost:5678/webhook/test item=Widget quantity:=5
```
### External Testing
Use services like:
* [webhook.site](https://webhook.site) - Test outgoing webhooks
* [ngrok](https://ngrok.com) - Expose local webhooks publicly
***
## Tips
Use **meaningful paths** that describe the purpose: `/webhook/orders`, `/webhook/stripe-events`
Always **validate incoming data** before processing with Python Executor or similar.
Return **appropriate status codes**: 200 (success), 400 (bad request), 500 (server error)
In production, always enable authentication on webhooks that modify data.
***
## Troubleshooting
* Verify workflow is **deployed** (not just saved)
* Check the path is correct (no leading slash)
* Ensure backend is running on correct port
* Check firewall/network settings
* Verify URL is correct and accessible
* Check headers (especially Content-Type)
* Look for CORS issues if calling from browser
* Check timeout setting for slow APIs
* Ensure Webhook Response is connected to workflow
* Verify template variables resolve correctly
* Check status code is valid (100-599)
***
## Related
Build a webhook workflow
Process webhook data with Python and other tools
# WhatsApp & Social Nodes
Source: https://docs.opencompany.sh/nodes/whatsapp
WhatsApp messaging and multi-platform social communication
# WhatsApp & Social Nodes
Automate WhatsApp messaging and multi-platform social communication.
## Available Nodes
| Node | Type | Purpose |
| ---------------- | ---------------- | -------------------------------------------------------- |
| WhatsApp Send | Action / AI Tool | Send text, media, location, contact, or sticker messages |
| WhatsApp DB | Action / AI Tool | Query chats, contacts, groups, and newsletter channels |
| WhatsApp Receive | Trigger | Wait for incoming messages |
WhatsApp Send and WhatsApp DB are dual-purpose: they work as standalone workflow nodes **and** as AI Agent tools when connected to an agent's tools handle.
## Setup Requirements
1. WhatsApp service running (optional - it spawns on demand the first time you open the WhatsApp pairing panel or run a WhatsApp node)
2. WhatsApp account for pairing
3. Scan QR code to link device
### Connecting
There is no "connect" workflow node. Pairing is managed from the Credentials panel:
1. Open the **Credentials** modal and select the **WhatsApp** panel
2. Scan the displayed QR code with your WhatsApp mobile app
3. Go to WhatsApp > Settings > Linked Devices > Link a Device
***
## WhatsApp Receive
Trigger node that fires when messages arrive.
### Parameters
Filter by message type: all, text, image, video, audio, document, location, contact
Sender filter mode: all, self, any\_contact, contact, group, channel, keywords
Specific phone number, digits only, no + prefix (when filter = contact)
Specific group JID (when filter = group)
Optional: filter group messages to a specific member (when filter = group)
Newsletter channel JID; leave empty to match any channel (when filter = channel)
Comma-separated keywords, case-insensitive (when filter = keywords)
Forwarded message handling: all, only\_forwarded, ignore\_forwarded
Skip messages sent by yourself
Download base64 media data with the event
### Filter Options
| Filter | Description |
| --------------------- | ------------------------------------------ |
| All Messages | Receive everything |
| From Self | Notes-to-self chat only |
| From Any Contact | Non-group messages only |
| From Specific Contact | Match phone number |
| From Specific Group | Match group (optionally a specific member) |
| From Channel | Match newsletter channel |
| Contains Keywords | Match keywords in message |
### Output
```json theme={null}
{
"message_id": "ABC123",
"sender": "1234567890@s.whatsapp.net",
"sender_phone": "+1234567890",
"chat_id": "1234567890@s.whatsapp.net",
"message_type": "text",
"text": "Hello!",
"timestamp": "2024-01-15T10:30:00Z",
"is_group": false,
"is_from_me": false,
"push_name": "John Doe",
"is_forwarded": false,
"forwarding_score": 0,
"group_info": null
}
```
### Group Message Output
When `is_group` is true:
```json theme={null}
{
"group_info": {
"group_jid": "123456789@g.us",
"sender_jid": "1234567890@s.whatsapp.net",
"sender_phone": "+1234567890",
"sender_name": "John Doe"
}
}
```
### Example: Reply to Specific Keywords
```
Filter: Contains Keywords
Keywords: help, support, question
```
***
## WhatsApp Send
Send messages to yourself, individual contacts, groups, or newsletter channels. Works as a workflow node or an AI Agent tool.
### Parameters
Where to send: self (connected phone), phone (individual), group, or channel (newsletter)
Recipient phone number, digits only, no + prefix (when recipient\_type = phone)
Group JID, format [123456789@g.us](mailto:123456789@g.us) (when recipient\_type = group)
Newsletter channel JID, format 120363...\@newsletter; admin/owner role required (when recipient\_type = channel)
Type of message: text, image, video, audio, document, sticker, location, contact. Channels only support text, image, video, audio, document.
Text content (when message\_type = text). Supports template variables.
Convert markdown (bold, italic, code, lists) to WhatsApp-native formatting (when message\_type = text)
Source of media data: base64, file, or url (for image / video / audio / document / sticker)
HTTPS URL to download media from (when media\_source = url)
Optional caption for image, video, or document
Location messages use `latitude` / `longitude` / `location_name` / `address`. Contact messages use `contact_name` / `vcard`. Quote a message with `is_reply` + `reply_message_id`.
### Output
```json theme={null}
{
"message_id": "XYZ789",
"sent": true
}
```
### Example: Auto-Reply
```
Recipient Type: phone
Phone: {{whatsappReceive.sender_phone}}
Message: Thanks for your message! I'll get back to you soon.
```
### Example: Forward to Admin
```
Recipient Type: phone
Phone: 1987654321
Message: New message from {{whatsappReceive.push_name}}: {{whatsappReceive.text}}
```
***
## WhatsApp DB
Query the WhatsApp database: chat history, contacts, groups, and newsletter channels. Works as a workflow node or an AI Agent tool.
### Parameters
Operation to perform (see table below)
The remaining fields depend on the selected operation (e.g. `phone`, `group_id`, `query`, `channel_jid`, `limit`, `offset`, `include_media_data`).
### Operations
| Operation | Purpose |
| ------------------------------------- | ------------------------------------------------------------------------------------------------ |
| `chat_history` | Retrieve messages from an individual or group chat (with pagination and optional media download) |
| `search_groups` | Search groups by name |
| `get_group_info` | Get group details with participant names and phone numbers |
| `get_contact_info` | Get full contact info (name, phone, profile picture) |
| `list_contacts` | List all contacts with saved names |
| `check_contacts` | Check WhatsApp registration status for phone numbers |
| `list_channels` | List subscribed newsletter channels |
| `get_channel_info` | Get channel details (name, description, subscribers) |
| `channel_messages` | Get channel message history with filters and pagination |
| `channel_stats` | Get channel subscriber/view statistics |
| `channel_follow` / `channel_unfollow` | Follow or unfollow a newsletter channel |
| `channel_create` | Create a new newsletter channel |
| `channel_mute` | Mute or unmute a channel |
| `channel_mark_viewed` | Mark channel messages as viewed |
| `newsletter_react` | React to a channel message with an emoji |
| `newsletter_live_updates` | Subscribe to live view/reaction counts |
| `contact_profile_pic` | Get profile picture for a contact or group |
### Example: Look Up a Contact
```
Operation: get_contact_info
Contact Phone: 1234567890
```
***
## Common Workflows
### Auto-Responder
```
[WhatsApp Receive] --> [AI Agent] --> [WhatsApp Send]
```
**AI Agent Prompt:**
```
Respond to this customer message: {{whatsappReceive.text}}
Be helpful and professional.
```
**Send Config:**
```
Recipient Type: phone
Phone: {{whatsappReceive.sender_phone}}
Message: {{aiAgent.response}}
```
### Group Monitor
```
[WhatsApp Receive] --> [Python Executor] --> [Webhook/Database]
(group filter) (log message)
```
**Filter Config:**
```
Filter: From Specific Group
Group: [Select your group]
```
### Keyword Bot
```
[WhatsApp Receive] --> [Python Executor] --> [WhatsApp Send]
(keywords: help) (select response)
```
**Python Code:**
```python theme={null}
text = input_data.get("text", "").lower()
if "hours" in text:
response = "We're open 9am-5pm, Mon-Fri"
elif "price" in text:
response = "Please visit our website for pricing"
else:
response = "How can I help you?"
output = {"response": response}
```
***
## Tips
Use `{{whatsappReceive.sender_phone}}` to reply to the sender automatically.
Combine with **Simple Memory** for context-aware conversations per contact.
Set `Session ID: {{whatsappReceive.sender_phone}}` in Simple Memory for per-user history.
Respect WhatsApp's terms of service. Don't send spam or bulk unsolicited messages.
***
## Troubleshooting
The WhatsApp service (whatsapp-rpc) is optional and spawns on demand — opening
the pairing panel starts it (port 5683). If the QR code doesn't appear, close
and reopen the pairing panel; as a last resort restart:
```bash theme={null}
company stop
company start
```
* Verify workflow is **deployed** (not just saved)
* Check filter settings aren't too restrictive
* Confirm `ignoreOwnMessages` setting
* Include country code in phone number
* Check WhatsApp connection status
* Verify recipient hasn't blocked you
* Check internet connectivity
* Ensure phone stays online
* Don't use WhatsApp Web simultaneously
***
## Social Nodes
Unified messaging nodes for multi-platform communication. Social Send currently routes to WhatsApp (personal and Business) and Discord; the other platforms it lists are not yet wired. Social Receive normalizes messages from any connected platform trigger.
### Social Receive
Normalizes messages from any platform trigger into a unified format.
**Output Fields:**
* `channel` - Platform name
* `message_id`, `sender_id`, `sender_name`
* `text`, `message_type`, `timestamp`
* `media` - Platform-specific media data
### Social Send (Dual-Purpose)
Send messages to any supported platform. Works as workflow node OR AI Agent tool.
**Message Types:** text, image, video, audio, document, sticker, location, contact, poll, buttons, list
```
[Social Receive] --> [AI Agent] --> [Social Send]
^
|
[Social Send as Tool]
```
***
## Related
Step-by-step guide
Add AI-powered responses
# Your first workflow
Source: https://docs.opencompany.sh/quickstart
Build a chat pipeline from an empty canvas: Chat Trigger, AI Agent, Console
About 10 minutes. You need OpenCompany [installed](/installation) and one AI key added (or a local model) — see [Add your AI key](/add-api-keys). If you have not run the ready-made example yet, [Your first chat](/first-chat) is a faster win.
You will build the same pipeline the AI Assistant example uses, from scratch: a **Chat Trigger** that receives your message, an **AI Agent** that thinks, and a **Console** that prints the answer.
```
[Chat Trigger] --> [AI Agent] --> [Console]
```
## Build it
Open `http://localhost:5678`, then click **File** in the top toolbar and choose **New Workflow**.
An empty canvas appears with the component palette on the left.
In the top toolbar, find the **Mode:** toggle and click **Dev**.
More sections appear in the palette.
The palette's **Normal** mode shows only the AI sections. The Chat Trigger and Console nodes live in the **Utilities** section, which is visible in **Dev** mode. Nothing else changes — Dev is just "show me everything."
Drag these from the palette onto the canvas, left to right:
1. **Chat Trigger** — in **Utilities** (or type "chat" in the palette search box)
2. **AI Agent** — in **AI Agents**
3. **Console** — in **Utilities**
Three boxes now sit on your canvas.
Drag from the small circle on the right edge of **Chat Trigger** to the circle on the left edge of **AI Agent**.
A line appears between them. Repeat from **AI Agent**'s right edge to **Console**'s left edge.
Click the **AI Agent** node.
Its settings panel opens. Choose your **provider** (the one you added a key for) and a **model** from the dropdowns.
Leave the **prompt** field empty — the agent automatically answers whatever message flows in from the trigger.
Model dropdown empty? Your key is missing: click the key icon (**API Credentials**) in the toolbar and [add one](/add-api-keys).
Press **Save** in the top toolbar, then press the green **Start** button.
**Start** changes to **Stop**, and the Chat Trigger begins a gentle pulse — it is listening.
Open the **Chat / Console** panel at the bottom. Type a message into **Type a message...** and press **Send**.
Then click the **Console** tab on the right — the AI's reply appears there.
Your own three-node workflow answered you. That is the core loop of everything in OpenCompany: trigger, think, deliver.
## Make it remember the conversation
Right now the agent forgets everything between messages. Give it memory:
1. In the palette, drag **Simple Memory** (in **AI Tools**) onto the canvas.
2. Connect Simple Memory's top handle to the **left-side memory handle** on the AI Agent (the middle connector on its left edge).
3. Press **Save**, then **Stop** and **Start** to restart the workflow.
Now ask a question, then a follow-up — the agent remembers what you said.
## Make it yours
* Click the AI Agent and write a **system message** like "Answer in pirate speak" — then chat again.
* Swap the model from the dropdown and compare answers.
* Add a **DuckDuckGo Search** node (in **AI Tools**) and connect it to the agent's tools handle — the agent can now search the web when it needs to. See [Web Search](/nodes/search).
Prefer to call your workflow from other software? Replace the Chat Trigger with a **Webhook Trigger** (in **Utilities**) configured with path `hello`, keep the AI Agent and Console, and press **Start**. Then send a request from the terminal:
```bash theme={null}
curl -X POST http://localhost:5678/webhook/hello -H "Content-Type: application/json" -d "{\"message\": \"Hello!\"}"
```
The agent's reply prints in the **Console** tab, exactly like the chat version. To return the reply to the caller instead, add a **Webhook Response** node after the agent. See [Webhooks & HTTP](/nodes/webhooks).
## What's next
Put this same pipeline behind a real messaging app — free.
Memory, tools, and how agents decide what to do.
Modes, panels, shortcuts, and everything on screen.
Every node you can drag onto the canvas.
# Troubleshooting
Source: https://docs.opencompany.sh/troubleshooting
Fixes for the most common install and runtime problems
Work top to bottom. Each fix takes under two minutes. Commands go in the terminal (the text command app — Terminal on macOS, PowerShell on Windows).
## First: restart cleanly
Most problems clear with a clean restart:
```bash theme={null}
company stop
```
```bash theme={null}
company start
```
You should see:
```
OpenCompany v0.0.96
App: http://localhost:5678 (API + WebSocket + SPA)
```
Still stuck? Run the built-in health check and read what it reports:
```bash theme={null}
company doctor
```
## Install problems
Check your versions:
```bash theme={null}
node --version
```
You should see `v22` or higher. Then:
```bash theme={null}
python --version
```
You should see `3.12` or higher. If either is older, install the current version from [nodejs.org](https://nodejs.org) or [python.org/downloads](https://www.python.org/downloads/), then reinstall OpenCompany.
Same fix as above: install Python 3.12+ from [python.org/downloads](https://www.python.org/downloads/).
On Windows, tick the **Add python.exe to PATH** checkbox in the installer, then open a new terminal window.
Run the build and read its first error line — that line names the real problem:
```bash theme={null}
company build
```
Windows Defender scans every new Python file, which can slow the first run badly or even hang it.
Add the app's Python folder to Defender's exclusions: open **Windows Security** → **Virus & threat protection** → **Manage settings** → **Exclusions** → **Add or remove exclusions** → **Add an exclusion** → **Folder**, and pick the `server\.venv` folder inside your OpenCompany install. A reboot after first install also helps.
## Startup problems
A port is a numbered door another app may already hold open. OpenCompany uses one continuous non-standard block so collisions are rare: 5678 (the app), 5679 (the backend when running in dev mode, behind the app's proxy), 5680 and 5681 (Temporal engine: browser UI and gRPC), 5682 (code runner), 5683 (WhatsApp). The current numbers always live in the `.env` file inside the install folder.
First try:
```bash theme={null}
company stop
```
If another program owns the port, change OpenCompany's ports in the `.env` file (the settings file inside the install folder): set `VITE_CLIENT_PORT` or `PYTHON_BACKEND_PORT` to a free number and start again.
Rebuild from a clean slate:
```bash theme={null}
company clean
```
```bash theme={null}
company build
```
```bash theme={null}
company start
```
`company clean` removes downloaded packages, so the next build re-downloads them and the first start afterward is slower.
## In-app problems
Hard-refresh the browser (Ctrl+Shift+R, or Cmd+Shift+R on macOS). If it stays blank, restart with `company stop` then `company start` and reload.
The browser talks to the backend over a live connection. Check the backend is up by opening `http://localhost:5678/health` — you should see a short OK response. If not, restart with `company stop` then `company start`.
Two copies of the backend are fighting over the same database file. Run `company stop`, wait a few seconds, and start again. If it persists, restart your computer — a stuck process is holding the file.
Stop workflows you are not using (press **Stop** in the toolbar) and close unused browser tabs of the app. Restarting with `company stop` / `company start` resets memory.
## Workflow problems
Triggers only listen after you press **Start** in the top toolbar. A listening trigger node shows a gentle pulse. If the button reads **Start** (not **Stop**), the workflow is not running.
Your key is missing or invalid. Click the key icon (**API Credentials**) in the toolbar, select your provider, re-enter the key, and click **Validate**. You should see **Valid** and a green **Connected** badge.
Two usual causes. First, the workflow must be running — press **Start**. Second, replies appear in the **Console** tab (right side of the Chat / Console panel), not as chat bubbles — and the workflow needs a Console node connected after the agent to print there.
## Still stuck
Open an issue at [github.com/zeenie-ai/opencompany/issues](https://github.com/zeenie-ai/opencompany/issues).
Run `company doctor` first and paste its output into the issue — it answers most of the questions a maintainer would ask.
# AI Agent Workflow
Source: https://docs.opencompany.sh/tutorials/ai-agent-workflow
Build an AI agent with conversation memory and tools
# AI Agent Workflow
Create an intelligent AI agent that remembers conversation history and can use tools.
## What You'll Build
A chatbot that:
* Maintains conversation context across messages
* Uses an AI model (OpenAI, Claude, Gemini, and more)
* Responds via webhook
## Prerequisites
* OpenCompany running locally
* An AI provider API key ([Add your AI key](/add-api-keys))
No key? Point the agent at a free local model instead: install Ollama or LM Studio, connect it in **API Credentials**, and pick it as the provider below - zero cost.
## Step 1: Add the AI Agent
1. Drag **AI Agent** from the AI Agents category
2. This is the core of your intelligent assistant
The AI Agent node has several handles:
* **Main Input** (`input-main`, left) - Receives the user prompt
* **Memory** (`input-memory`, left diamond) - Connects to a Simple Memory node
* **Skill** (`input-skill`, bottom diamond) - Connects skill nodes
* **Tools** (`input-tools`, bottom diamond) - Connects tool nodes
* **Output** (`output-main`, right) - The agent's response
## Step 2: Choose the Provider and Model
The AI Agent picks its own provider and model directly in its parameters. There is no separate model handle to wire up.
1. Click the AI Agent to open its parameter panel
2. Set the **Provider** and **Model**:
```
Provider: anthropic
Model: claude-opus-4-8
Temperature: 0.7
```
You can pick any of the 11 agent providers (xAI is chat-only and not available for agents): OpenAI, Anthropic, Gemini, OpenRouter, Groq, Cerebras, DeepSeek, Kimi, Mistral, Ollama, or LM Studio. Model options update automatically based on the provider you choose (for example, OpenAI offers `gpt-5.5`, Anthropic offers `claude-opus-4-8` / `claude-sonnet-4-6`, Gemini offers `gemini-3.5-flash`).
Claude excels at reasoning, Gemini handles multimodal input, and Ollama / LM Studio let you run local models on your own machine. The standalone **Chat Model** nodes (e.g. OpenAI Chat Model, Claude Chat Model) are for using a model on its own outside an agent -- you do not need one to power the AI Agent.
## Step 3: Add Conversation Memory
1. Drag **Simple Memory** from the AI Tools category
2. Connect its output to the AI Agent's **Memory** input (`input-memory`, the left diamond handle)
3. Configure:
```
Session ID: default
Window Size: 10
```
Simple Memory keeps a rolling window of the most recent message pairs (set by **Window Size**). The conversation is stored as editable markdown you can view and change right in the parameter panel.
Enable **Long-Term Memory** on the Simple Memory node to archive older messages into a vector store for semantic recall beyond the recent window.
## Step 4: Add a Webhook Trigger
1. Drag **Webhook Trigger** from the Triggers category
2. Connect its output to the AI Agent's main input (`input-main`)
3. Configure:
```
Path: chat
Method: POST
```
## Step 5: Add a Webhook Response
1. Drag **Webhook Response** from Utilities
2. Connect the AI Agent's output to Webhook Response
3. Configure:
```
Status Code: 200
Body: {{aiAgent.response}}
Content Type: application/json
```
## Complete Workflow
```
[Webhook Trigger] --> [AI Agent] --> [Webhook Response]
^
| input-memory
|
[Simple Memory]
```
The AI Agent's provider and model are set in its own parameters (Step 2), so there is no separate model node to connect.
## Step 6: Configure the Agent Prompt
Click on the AI Agent and set the **System Message** field:
```
You are a helpful assistant. You remember our conversation history.
Be concise and friendly in your responses.
```
## Step 7: Start and Test
1. Press the green **Start** button in the top toolbar
2. Test with curl:
```bash theme={null}
# First message
curl -X POST http://localhost:5678/webhook/chat \
-H "Content-Type: application/json" \
-d '{"message": "Hi, my name is Alex"}'
# Second message (agent remembers your name)
curl -X POST http://localhost:5678/webhook/chat \
-H "Content-Type: application/json" \
-d '{"message": "What is my name?"}'
```
The agent should respond with your name, demonstrating memory!
## Advanced: Multiple Sessions
Use different session IDs for different conversations:
```
Session ID: {{webhookTrigger.body.user_id}}
```
This creates separate memory for each user.
## Advanced: Window Size
For long conversations, adjust **Window Size** to control how much history the agent sees:
```
Window Size: 10
```
This keeps only the last 10 message exchanges in short-term memory. Turn on **Long-Term Memory** if you also want older messages retrievable via semantic search.
## Troubleshooting
* Ensure Simple Memory is connected to the memory input (diamond handle)
* Check that Session ID is consistent between requests
* Memory is saved after each exchange automatically
* Click the key icon in the toolbar
* Add your API key for the provider you're using
* Keys are stored securely and encrypted
## Next Steps
Connect your agent to WhatsApp
Compare AI providers
# Android Automation
Source: https://docs.opencompany.sh/tutorials/android-automation
Control Android devices via ADB or remote relay
# Android Automation
Both connection methods require the OpenCompany Android companion app on your device, which is **not yet publicly available** — and the Remote Relay path additionally needs a relay server URL. Until the app ships publicly, this tutorial is only usable if you already have access to it. For an automation you can run today, try the [Telegram bot tutorial](/tutorials/telegram-bot).
OpenCompany can control Android devices for automation tasks like launching apps, monitoring battery, controlling WiFi, and more.
## Connection Methods
| Method | Use Case |
| ---------------- | ------------------------------------------- |
| **Local ADB** | Device connected via USB to your machine |
| **Remote Relay** | Device connected via WebSocket relay server |
## Set Up Connection
Android device connection is configured in the **Credentials Modal** (Android panel), not via a workflow node. Open Credentials and pick one of the two methods below.
### Option A: Local ADB
1. Enable **Developer Options** on your Android device
2. Enable **USB Debugging**
3. Connect device via USB
4. Run `adb devices` to verify connection
5. In the Credentials Modal, open the **Android** panel and choose **Local ADB** (ADB port forwarding is set up for you)
### Option B: Remote Relay
1. Open the **Credentials Modal** and select the **Android** panel
2. Click **Connect** to start the relay connection
3. Scan the QR code with the companion Android app to pair your device
Remote relay allows controlling devices anywhere with internet access. The relay uses a two-state model: `connected` (relay WebSocket is up) versus `paired` (a device has scanned the QR and is ready to run actions). Android nodes require a **paired** device to execute.
## Available Android Nodes
OpenCompany ships 16 Android service nodes across monitoring, apps, automation, sensors, and media. Each one can run as a standalone workflow node or be connected to an AI agent's tools handle.
### System Monitoring
| Node | Description |
| --------------- | ------------------------------------------- |
| Battery Monitor | Battery level, charging status, temperature |
| Network Monitor | WiFi/cellular status, internet connectivity |
| System Info | Device model, Android version, memory |
| Location | GPS coordinates, accuracy, provider |
### App Management
| Node | Description |
| ------------ | --------------------------- |
| App Launcher | Launch apps by package name |
| App List | Get installed applications |
### Automation
| Node | Description |
| -------------------- | ------------------------------------- |
| WiFi Automation | Enable/disable WiFi, scan networks |
| Bluetooth Automation | Toggle Bluetooth, list paired devices |
| Audio Automation | Volume control, mute/unmute |
| Device State | Airplane mode, brightness, screen |
| Screen Control | Wake screen, timeout settings |
| Airplane Mode | Airplane mode status and control |
### Sensors
| Node | Description |
| --------------------- | ----------------------------------------- |
| Motion Detection | Accelerometer, gyroscope, shake detection |
| Environmental Sensors | Temperature, humidity, pressure, light |
### Media
| Node | Description |
| ------------- | ---------------------------- |
| Camera | Take photos, get camera info |
| Media Control | Playback control, volume |
## Example: Battery Alert Workflow
Create a workflow that sends an alert when battery is low.
### Workflow Design
```
[Cron Scheduler] --> [Battery Monitor] --> [Python Executor] --> [WhatsApp Send]
(check level)
```
### Step 1: Add Cron Trigger
```
Cron Expression: */10 * * * * (every 10 minutes)
```
### Step 2: Add Battery Monitor
```
Action: Get Status
```
### Step 3: Add Python Executor
```python theme={null}
battery_level = input_data.get("level", 100)
is_charging = input_data.get("is_charging", False)
if battery_level < 20 and not is_charging:
output = {
"alert": True,
"message": f"Battery low: {battery_level}%"
}
else:
output = {"alert": False}
```
### Step 4: Add WhatsApp Send (conditional)
```
Phone Number: +1234567890
Message: {{pythonExecutor.message}}
```
## Example: App Launcher Workflow
Launch an app when receiving a webhook.
```
[Webhook Trigger] --> [App Launcher]
```
**App Launcher Config:**
```
Package Name: {{webhookTrigger.body.app}}
```
**Test:**
```bash theme={null}
curl -X POST http://localhost:5678/webhook/launch \
-H "Content-Type: application/json" \
-d '{"app": "com.spotify.music"}'
```
## Example: WiFi Toggle
```
[Webhook Trigger] --> [WiFi Automation]
```
**WiFi Automation Config:**
```
Action: {{webhookTrigger.body.action}}
```
**Test:**
```bash theme={null}
# Enable WiFi
curl -X POST http://localhost:5678/webhook/wifi \
-d '{"action": "enable"}'
# Disable WiFi
curl -X POST http://localhost:5678/webhook/wifi \
-d '{"action": "disable"}'
```
## Battery Monitor Output
```json theme={null}
{
"level": 85,
"is_charging": true,
"status": "charging",
"plugged": "ac",
"temperature": 28.5,
"health": "good",
"technology": "Li-ion"
}
```
## Network Monitor Output
```json theme={null}
{
"is_connected": true,
"type": "wifi",
"wifi_ssid": "MyNetwork",
"is_internet_available": true,
"ip_address": "192.168.1.100"
}
```
## Troubleshooting
* Run `adb devices` to check connection
* Ensure USB debugging is enabled
* Try different USB cable/port
* Restart ADB: `adb kill-server && adb start-server`
* Verify relay URL is correct
* Check API key is valid
* Ensure companion app is installed on device
* Check firewall settings
* Some actions require root access
* Use device automation apps for restricted features
* Check Android version compatibility
## Tips
Start with Battery Monitor and System Info to verify your connection works before building complex workflows.
Use meaningful node names (F2 to rename) when building workflows with multiple Android nodes.
## Next Steps
Full documentation for all 16 Android nodes
Trigger Android actions via HTTP
# Your First Workflow
Source: https://docs.opencompany.sh/tutorials/first-workflow
Learn the basics of building workflows in OpenCompany
# Your First Workflow
Zero credentials needed — this tutorial uses only built-in nodes. About 10 minutes.
This tutorial covers the fundamentals of creating workflows in OpenCompany. If you want the guided chat pipeline instead, see the [quickstart](/quickstart).
## Understanding the Interface
### Canvas
The main area where you build workflows by connecting nodes.
### Component Palette
Left sidebar with all available nodes organized by category. A few of the categories you will use most:
* **AI Models** - Chat models (OpenAI, Anthropic, Gemini, OpenRouter, Groq, Cerebras, DeepSeek, Kimi, Mistral, Ollama, LM Studio)
* **AI Agents** - Agent, specialized agents, and memory nodes
* **WhatsApp / Telegram / Social** - Messaging automation
* **Android** - Device control
* **Code Executors** - Python, Monty, JavaScript, TypeScript
* **Webhooks and Utilities** - HTTP, webhooks, console, chat trigger
* **Schedulers** - Timer and cron scheduler
The toolbar **Normal / Dev** toggle filters the palette. Normal mode shows only AI Agents, Models, Skills, and Tools; switch to **Dev** to see every category. See the full category list in the [Node Overview](/nodes/overview).
### Toolbar
Top bar with workflow controls:
* **File** - New Workflow, Open, Export, Import, Copy as JSON
* **Start** - Run the workflow (triggers begin listening); becomes **Stop** while running
* **Save** - Store your changes
* A per-node **Run** button lives inside each node's parameter panel for testing one node
## Node Basics
### Adding Nodes
1. **Drag and drop** from the component palette
2. **Right-click** on canvas to search nodes
### Connecting Nodes
* Drag from an **output handle** (right side) to an **input handle** (left side)
* Handles are the small circles on node edges
### Node Types
| Type | Shape | Description |
| ------- | ------- | ------------------------------------ |
| Trigger | Diamond | Start workflow on events |
| Action | Square | Perform operations |
| Config | Circle | Provide configuration to other nodes |
### Configuring Nodes
1. Click a node to select it
2. Click the **gear icon** or double-click to open parameters
3. Set values and click **Save**
## Data Flow
Data flows through connections between nodes. Use template variables to access upstream data:
```
{{nodeName.outputField}}
```
### Example
If a Webhook Trigger outputs `{ body: "Hello" }`:
```
{{webhookTrigger.body}} --> "Hello"
```
## Building a Simple Workflow
Let's build a workflow that triggers on a schedule and logs the time.
### Step 1: Add a Cron Trigger
1. Drag **Cron Scheduler** from Schedulers
2. Configure:
```
Cron Expression: */5 * * * * (every 5 minutes)
```
### Step 2: Add a Python Executor
1. Drag **Python Executor** from Code Executors
2. Connect Cron output to Python input
3. Add this code (`datetime` is pre-injected — `import` statements are blocked in the sandbox):
```python theme={null}
current_time = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
output = {"time": current_time, "message": f"Triggered at {current_time}"}
```
### Step 3: Add a Console node
1. Drag **Console** from Utilities (visible in **Dev** mode)
2. Connect the Python Executor's output to the Console's input
3. The Console prints each run into the **Console** tab of the bottom panel — that is where you see your workflow working
### Step 4: Start it
1. Press **Save**, then the green **Start** button in the toolbar
2. The workflow runs every 5 minutes; watch the results arrive in the **Console** tab
3. Press **Stop** when you are done
## Keyboard Shortcuts
| Shortcut | Action |
| -------- | -------------------- |
| `Ctrl+N` | New workflow |
| `Ctrl+S` | Save workflow |
| `F2` | Rename selected node |
| `Delete` | Delete selected node |
| `Ctrl+C` | Copy node |
| `Ctrl+V` | Paste node |
## Tips
**Rename nodes** for clarity. Press `F2` or double-click the node label.
**Test individual nodes** by selecting them and clicking **Run** before deploying the full workflow.
Always **save your workflow** before deploying. Unsaved changes are lost on refresh.
## Next Steps
Build an intelligent agent with memory
Learn about all node types
# Telegram bot in 10 minutes
Source: https://docs.opencompany.sh/tutorials/telegram-bot
Build a free AI-powered Telegram bot with a token from @BotFather
You will build a Telegram bot that answers any message with an AI reply — three nodes, no paid accounts, no webhooks, no public server. The same three-node pattern ships as the "AI Assistant" example workflow, so you are recreating a first-class OpenCompany workflow from scratch.
**Time**: about 10 minutes. **You need**: OpenCompany running locally, one AI provider key already added ([Add API keys](/add-api-keys)), and a Telegram account. The bot token itself is free — no developer program, no approval wait.
In Telegram, open a chat with **@BotFather**, send `/newbot`, and follow the prompts: pick a display name, then a username ending in `bot`.
BotFather replies with "Done!" and an HTTP API token that looks like `123456789:ABCdefGHIjklMNOpqrSTUvwxYZ`. Copy it — this token is the only credential the whole tutorial needs.
In OpenCompany, click the key icon in the toolbar to open **API Credentials**, select **Telegram Bot**, paste the token into the **Bot Token** field, and click **Validate**.
The field shows **Valid** — the validation message includes your bot's username, confirming the right bot is linked — and the provider gets a green **Connected** badge.
Back in Telegram, open a chat with your new bot and send it any message (a simple "hi" works).
This first private message lets OpenCompany capture your chat id automatically, so replies addressed to "self" route straight to your account. If you prefer, you can instead paste your id into the **Your Chat ID (optional)** field on the same credentials panel — DM **@userinfobot** to find it — but the one-message capture is easier.
The Telegram nodes live in the palette's **Social** section, which only appears in Dev mode — flip the toolbar Mode toggle from **Normal** to **Dev**. Then drag three nodes onto the canvas: **Telegram Receive** and **Telegram Send** from **Social**, and **AI Agent** from **AI Agents**.
You should now have three unconnected nodes on the canvas: a trigger, an agent, and a send action.
Drag from Telegram Receive's output handle (the circle on its right edge) to AI Agent's main input handle (left edge), then from AI Agent's output to Telegram Send's input.
Two edges appear: Receive feeds the Agent, and the Agent feeds Send. This is the entire data path — message in, reply out.
Double-click **AI Agent** to open its parameters. Pick your provider and model from the two dropdowns (any provider whose key you added — the example workflow uses Gemini). Leave the prompt field empty — the agent automatically uses the incoming Telegram message as its prompt. Click **Save**.
The panel closes and the agent node is configured. Optionally set a system message such as "You are a helpful assistant" to shape the bot's tone.
Double-click **Telegram Send**. Keep the defaults — Recipient Type `self`, Message Type `text`, Parse Mode `Auto` — and set the **Text** parameter to:
```
{{aiagent.response}}
```
This is a template variable: at run time it resolves to the AI Agent's `response` output field, so whatever the model writes becomes the outgoing message. Click **Save**.
Save the workflow, then click the green **Start** button in the toolbar.
The button turns into **Stop**, and Telegram Receive begins pulsing — it has entered its waiting state and is listening for incoming messages.
Trigger nodes never show an "executing" state of their own: the pulse means listening, and it is the downstream nodes that light up when a run starts.
In Telegram, send your bot a question — "what is the tallest mountain in Europe?"
On the canvas, the nodes light up in sequence — Receive fires, the Agent thinks, Send delivers — and a few seconds later the AI's answer arrives in your Telegram chat. You can watch the run's log lines in the **Console** tab of the bottom panel.
Each incoming message spawns its own independent run, so you can keep the conversation going — the trigger goes back to waiting as soon as a run begins.
You built a working AI-powered Telegram bot: incoming messages trigger the workflow, the agent generates a reply, and the answer lands back in Telegram. It keeps responding to every message for as long as the workflow is running — click **Stop** when you want it offline.
## How it works
**Telegram Receive** is a trigger node: while the workflow is running it waits for messages arriving through your bot and starts a run for each one that passes its filters. The **AI Agent** takes the message text as its prompt, calls your configured model, and emits the reply in its `response` output field. **Telegram Send** resolves the `{{aiagent.response}}` template against that output and delivers the text to your chat — `self` routes to the chat id captured from your first DM.
## Make it yours
A few one-parameter upgrades, all on the nodes you already placed:
* **Only answer you**: on Telegram Receive, set **Sender Filter** to `self` — the bot ignores everyone except its owner. This is how the shipped "AI Assistant" example configures it.
* **Only answer on a trigger word**: set **Sender Filter** to `keywords` and list comma-separated words; matching is a case-insensitive substring check.
* **Text-only input**: set **Content Type Filter** to `text` so photos and stickers do not start runs.
* **Formatted replies**: leave Telegram Send's **Parse Mode** on `Auto` — markdown in the model's reply is converted to Telegram formatting automatically, with a plain-text retry if Telegram rejects it.
* **Quiet delivery**: enable **Silent** on Telegram Send to deliver replies without a notification sound.
* **Quote the question**: set Telegram Send's **Reply To Message Id** to `{{telegramreceive.message_id}}` so each answer arrives as a reply to the message that asked it.
## Troubleshooting
If a run goes wrong, the failing node turns red on the canvas and the error text shows in the **Console** tab. The common ones:
* **Run fails with "Telegram bot not connected"**
The bot token is missing or was never validated. Reopen **API Credentials**, select **Telegram Bot**, and validate the token again.
* **Telegram Send fails with "Bot owner not detected"**
Your chat id was never captured, so the `self` recipient has nowhere to go. DM the bot once from your own account, or paste your id into **Your Chat ID (optional)** on the credentials panel.
* **Nothing happens when you message the bot**
Confirm the toolbar shows **Stop** (meaning the workflow is running) and that your message passes Telegram Receive's filters — with **Ignore Bots** on (the default), messages sent by other bots are skipped.
* **Replies arrive as one wall of unformatted text**
Check Telegram Send's **Parse Mode** is still `Auto`; that is what converts the model's markdown into Telegram formatting.
## Next steps
Every Telegram, Twitter/X, and unified social node parameter in detail
The broader OpenCompany tour: canvas, agents, and deployment
# WhatsApp Automation
Source: https://docs.opencompany.sh/tutorials/whatsapp-automation
Send and receive WhatsApp messages automatically
# WhatsApp Automation
Automate WhatsApp messaging with OpenCompany. Receive messages, process them, and send responses.
## Prerequisites
**Takes:** \~15 minutes. **You need:** OpenCompany running, one AI key ([Add your AI key](/add-api-keys)), a WhatsApp account on your phone, and npm available (the WhatsApp bridge installs itself on first use). Pairing uses one of your WhatsApp "linked devices" slots and drops if the service stops.
Want a simpler first messaging bot? The [Telegram tutorial](/tutorials/telegram-bot) needs only a free token — no phone pairing.
## Understanding WhatsApp Nodes
| Node | Purpose |
| -------------------- | -------------------------------------------------------------------------------- |
| **WhatsApp Receive** | Trigger on incoming messages |
| **WhatsApp Send** | Send messages to contacts, groups, or channels (also usable as an AI Agent tool) |
| **WhatsApp DB** | Query chat history, contacts, groups, and newsletter channels |
Connecting your WhatsApp account is done through the Credentials modal (WhatsApp panel), not a workflow node.
## Step 1: Connect WhatsApp
1. Click the **WhatsApp icon** in the toolbar to open the WhatsApp panel
2. A modal appears with a QR code
3. Open WhatsApp on your phone > Settings > Linked Devices > Link a Device
4. Scan the QR code
5. Wait for "Connected" status
Keep the WhatsApp service running. If it stops, you'll need to re-scan the QR code.
## Step 2: Create a Message Responder
Let's build a workflow that auto-replies to incoming messages.
### Add WhatsApp Receive Trigger
1. Drag **WhatsApp Receive** from the WhatsApp category
2. Configure the trigger:
```
Message Type Filter: All Messages
Sender Filter: All Messages
Ignore Own Messages: true
```
### Filter Options
| Filter | Description |
| --------------------- | ----------------------- |
| All Messages | Receive everything |
| From Any Contact | Non-group messages only |
| From Specific Contact | Filter by phone number |
| From Specific Group | Filter by group |
| Contains Keywords | Match specific words |
## Step 3: Add an AI Response
1. Drag **AI Agent** from the **AI Agents** palette section onto the canvas
2. Connect WhatsApp Receive's output to the AI Agent's main input (top-left handle)
3. Click the agent and configure:
```
Provider: your provider (for example openai)
Model: pick from the dropdown
Prompt: Reply helpfully to this WhatsApp message: {{whatsappReceive.text}}
```
Model dropdown empty? Add your provider key first — key icon (**API Credentials**) in the toolbar.
## Step 4: Send the Response
1. Drag **WhatsApp Send** onto the canvas
2. Connect the AI Agent's output to WhatsApp Send's input
3. Configure:
```
Phone Number: {{whatsappReceive.sender_phone}}
Message: {{aiAgent.response}}
```
## Complete Workflow
```
[WhatsApp Receive] --> [AI Agent] --> [WhatsApp Send]
```
## Step 5: Start it
1. Press the green **Start** button in the top toolbar
2. Send a message to your linked WhatsApp number from another phone
3. The workflow triggers and sends an AI response
## Available Data from WhatsApp Receive
| Field | Type | Description |
| -------------- | ------- | -------------------------------- |
| `message_id` | string | Unique message ID |
| `sender` | string | Sender JID |
| `sender_phone` | string | Phone number |
| `chat_id` | string | Chat/group ID |
| `message_type` | string | text, image, video, etc. |
| `text` | string | Message content |
| `timestamp` | string | When message was sent |
| `is_group` | boolean | True if from a group |
| `is_from_me` | boolean | True if sent by you |
| `push_name` | string | Sender's display name |
| `is_forwarded` | boolean | True if forwarded |
| `group_info` | object | Group details (if group message) |
## Group Message Handling
For group messages, use:
```
{{whatsappReceive.group_info.group_jid}}
{{whatsappReceive.group_info.sender_name}}
{{whatsappReceive.group_info.sender_phone}}
```
## Example: Keyword-Based Response
Set up different responses based on keywords:
### Configuration
```
Sender Filter: Contains Keywords
Keywords: help, support, question
```
### AI Prompt
```
The user needs help. Their message: {{whatsappReceive.text}}
Provide a helpful response.
```
## Example: Group Bot
Reply only in specific groups:
```
Sender Filter: From Specific Group
Group: [Select from dropdown]
```
## Troubleshooting
* Ensure the WhatsApp service is running (default port 5683)
* Open the WhatsApp panel from the toolbar and click **Restart** to relaunch the connection
* Check the Terminal tab for WhatsApp service logs
* Verify the workflow is started (**Start** pressed, not just saved)
* Check "Ignore Own Messages" setting
* Ensure filters aren't too restrictive
* Verify phone number format (include country code)
* Check WhatsApp connection status
* Ensure recipient hasn't blocked you
## Tips
Use **Simple Memory** with WhatsApp for context-aware conversations. Set Session ID to `{{whatsappReceive.sender_phone}}` for per-contact memory.
Test with your own number first before deploying to production.
## Next Steps
Control Android devices
Full node documentation