Discover MCPs & agents
Loading MCPs and agents…
Loading MCPs and agents…
Open-Sable is a local-first autonomous agent framework with AGI-inspired cognitive subsystems (goals, memory, metacognition, tool use). It can run continuously on your machine, integrate with chat interfaces like Telegram, execute real tasks safely, and keep data private by default.
Fetched from the repository for this visit.
Your personal AI that actually does things autonomous, local, and yours forever.
Open-Sable is a next-generation autonomous AI agent framework with Agentic AI cognitive subsystems. It runs 24/7 on your local machine, integrates with your favorite messengers, executes real-world tasks, and continuously improves itself, all while keeping your data private.
start.sh), logs, health checks, and profile-based agents.qwen3.5:0.8b).imageUrls + media_urls).image_base64 payload are now automatically forwarded to multimodal LLMs as image_url content blocks (OpenAI vision format). Screenshot and capture tools are seen by vision models with zero extra configuration.OPENWEBUI_API_URL in profile.env to any self-hosted OpenWebUI instance to use it as the LLM backend. Tested against a live deployment at sofia.zunvra.com.install-pi.sh) added with self-repair modes (--repair / --verify), torch-free core package set, interactive config wizard, and optional 3.5" SPI display setup using the correct tft35a driver.Open-Sable includes the full autonomy/cognitive module set from v1.1.0 through v1.7.0 (memory, reflection, evolutionary skill systems, world modeling, self-testing, ethical constraints, and advanced "Godlike/God Supreme" cognitive extensions listed below in the release sections).
Tool synthesis, multi-device sync.
TokenTrackerSharedBlackboardsocial/, media/, data/, automation/tools.py → mixin-based tools/ package (5 domain files)docs-site/ with guides & architecturerequirements-lock.txt generated via pip-compilegit clone https://github.com/IdeoaLabs/Open-Sable.git
cd Open-Sable
python3 install.py
The installer handles everything automatically, Python venv, pip dependencies, Node.js sub-projects (Dev Studio, Dashboard, Desktop, Aggr Charts), Playwright browsers, Ollama + optimal LLM model, and .env setup. Works on Linux, macOS, and Windows.
python3 install.py --full # Install everything, no prompts
python3 install.py --core # Python core only (minimal)
python3 install.py --status # Show what's installed / missing
python3 install.py --fix # Auto-fix broken installs
# 1. Clone the repository
git clone https://github.com/IdeoaLabs/Open-Sable.git
cd Open-Sable
# 2. Create virtual environment (recommended)
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# 3. Install Open-Sable with core dependencies
pip install --upgrade pip
pip install -e ".[core]"
# 4. Configure environment
cp .env.example .env
# Edit .env and set at minimum:
# TELEGRAM_BOT_TOKEN=your_token_here (get from @BotFather on Telegram)
# 5. Install Ollama (local LLM - recommended)
curl -fsSL https://ollama.com/install.sh | sh
ollama pull qwen3.5:0.8b
# 6. Run Open-Sable
python -m opensable
# Or alternatively: python main.py
Install optional features:
# Voice capabilities (speech-to-text, text-to-speech)
pip install -e ".[voice]"
# Vision & multimodal (image recognition, OCR)
pip install -e ".[vision]"
# All features
pip install -e ".[core,voice,vision,automation,monitoring]"
Skip Ollama? You can use any cloud LLM provider instead. Just set one API key in your .env:
# In .env file, add any one of these (the agent auto-detects which key is set):
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...
GEMINI_API_KEY=AIza...
OPENROUTER_API_KEY=sk-or-...
DEEPSEEK_API_KEY=sk-...
GROQ_API_KEY=gsk_...
TOGETHER_API_KEY=...
XAI_API_KEY=xai-...
MISTRAL_API_KEY=...
COHERE_API_KEY=...
KIMI_API_KEY=...
QWEN_API_KEY=...
See the Cloud LLM Providers section below for the full list of 12 supported providers and their default models.
start.shThe recommended way to run Open-Sable in production. Manages the process in the background with logging, PID tracking, and graceful shutdown:
# Start the default agent (sable) in background
./start.sh start
# Stop the agent (graceful shutdown with 10s timeout)
./start.sh stop
# Restart (stop + start)
./start.sh restart
# Check if running (shows PID, uptime, memory usage)
./start.sh status
# Follow live logs
./start.sh logs
# Start a different agent profile
./start.sh start --profile analyst
# List all configured agents and their status
./start.sh profiles
| Command | Description |
|---|---|
./start.sh start | Start default agent (sable) in background |
./start.sh start --profile <name> | Start a specific agent profile |
./start.sh stop [--profile <name>] | Graceful stop (SIGTERM → 10s wait → SIGKILL) |
./start.sh restart [--profile <name>] | Stop + start |
./start.sh status [--profile <name>] | Show PID, uptime, memory usage |
./start.sh logs [--profile <name>] | Tail live log output |
./start.sh profiles | List all agents, their config, and running status |
Open-Sable runs natively on Raspberry Pi (ARM64, Pi 3B+ and newer). The install-pi.sh script handles the full deployment lifecycle: Python venv setup, core package installation with 3-attempt retry/fallback, interactive config wizard, systemd service registration, and optional 3.5" SPI display configuration.
Minimum hardware: Raspberry Pi 3B+ (ARM64) · 1 GB RAM · 8 GB SD card · Internet connection
git clone https://github.com/IdeoaLabs/Open-Sable.git
cd Open-Sable
chmod +x install-pi.sh
./install-pi.sh
The installer will:
python3-venv, build-essential, git, libopenblas-dev, etc.)agents/sable/profile.envopensable-pi.service systemd unit (auto-start on boot)start-pi.sh convenience shortcutThe installer doubles as a diagnostic and repair tool:
./install-pi.sh --verify # Check all packages and directories; exit with pass/fail status
./install-pi.sh --repair # Re-run all checks and auto-fix anything broken
./install-pi.sh --display # Configure the 3.5" SPI display only (skip Python setup)
--repair re-runs the full verification loop and reinstalls any package whose import fails, useful after SD card corruption, partial writes, or package version conflicts.
The Pi installer only installs the torch-free core stack. The agent loop, LLM routing, all 69+ autonomous modules, and every tool executor are pure Python (aiohttp, asyncio, requests, standard library). No PyTorch or CUDA runtime is required.
| Dependency | ARM64 status |
|---|---|
aiohttp / asyncio | Native wheel ✅ |
chromadb (uses onnxruntime) | ARM64 wheel ✅ |
sentence-transformers | Lazy import, only loaded if the RAG skill is invoked |
torch | Not required for core, optional voice/vision extras only |
For generic 3.5" 480×320 SPI TFT displays sold under the MPI3501 / XPT2046 form factor (ILI9486 driver chip, resistive touch):
./install-pi.sh --display
This will:
/boot/firmware/config.txt on newer Pi OS, /boot/config.txt on older releases)tft35a.dtbo from the goodtft/LCD-show driver repository, the canonical driver for this display family, with a git clone fallback if the direct download failsconfig.txt:
dtparam=spi=on
dtoverlay=tft35a:rotate=90,penirq=17
# note: tft35a already includes the ADS7846 touch controller internally;
# do NOT add a separate ads7846 overlay, it will conflict on GPIO17/SPI0.1
sable-display.service, a systemd unit that runs the live HUD on /dev/fb1Pin mapping (confirmed against MPI3501 datasheet via lcdwiki.com):
| Signal | GPIO | Pi Pin |
|---|---|---|
| LCD_CS | GPIO8 (SPI CE0) | 24 |
| TP_CS | GPIO7 (SPI CE1) | 26 |
| TP_IRQ | GPIO17 | 11 |
| LCD_RS | GPIO24 | 18 |
| RST | GPIO25 | 22 |
After reboot:
sudo systemctl start sable-display # start the HUD display
./test-display.sh # run in foreground for testing
sudo systemctl status sable-display # check service health
ls -la /dev/fb* # confirm /dev/fb1 was created by the driver
scripts/display_hud.py)The live dashboard renders directly to /dev/fb1 using PIL TrueType fonts and NumPy-accelerated RGB565 conversion, no X11 or display server required. It shows:
psutil)┌──────────────────────────────────────────────────────────────────┐
│ ◈ SABLE AI ● LIVE Thu 26 Mar 02:26:18 │
├──────────────┬─────────────────────────────┬────────────────────┤
│ AGENT │ MODEL │ TELEGRAM │
│ ● ONLINE │ qwen2.5-coder │ ✈ BOT │
│ UPTIME │ 18:7b │ @Sablethebot │
│ 00:04:12 │ sofia.zunvra.com │ ● polling │
├──────────────┴─────────────────────────────┴────────────────────┤
│ CPU [████░░░░░░░░░░] 12% RAM [████████░░░░] 58% │
├──────────────────────────────────────────────────────────────────┤
│ RECENT ACTIVITY │
│ [02:25] ✅ Run polling for bot @Sablethebot id=... │
│ [02:25] 💓 Starting heartbeat (interval: 300s) │
│ [02:24] AgentMon skill disabled (AGENTMON_ENABLED=false) │
│ ... │
└──────────────────────────────────────────────────────────────────┘
No fonts need to be installed separately, the script finds DejaVu, Liberation, or Noto Mono automatically. If none are found it falls back to PIL's built-in bitmap font.
Configurable via environment variables:
| Variable | Default | Description |
|---|---|---|
FB_DEV | /dev/fb1 | Framebuffer device |
FB_WIDTH / FB_HEIGHT | 480 / 320 | Display resolution |
SABLE_LOG | ~/sable-agent.log | Log file to tail (also checks logs/opensable.log) |
DISPLAY_INTERVAL | 2.0 | Refresh rate in seconds (2s recommended for Pi 3 to keep CPU ~10%) |
Open-Sable supports running multiple independent agents, each with its own identity, credentials, configuration, and data. All agents live under the agents/ directory, there is no special "base" agent. Every agent, including the primary one (sable), is a self-contained profile.
Each agent profile is a folder inside agents/ containing three files:
agents/
├── _template/ ← Copy this to create a new agent
│ ├── soul.md ← Agent identity & personality
│ ├── profile.env ← FULL environment configuration
│ ├── tools.json ← Tool access control
│ └── data/ ← Runtime data (memory, consciousness, checkpoints)
├── sable/ ← Primary agent (default when no --profile is given)
│ ├── soul.md
│ ├── profile.env ← ⚠️ gitignored (contains credentials)
│ ├── profile.EXAMPLE.env ← Safe template committed to repo
│ ├── tools.json
│ └── data/ → ../../data ← Symlink to root data/ for backward compatibility
└── analyst/ ← Example: analytical intelligence agent
├── soul.md
├── profile.env
└── tools.json
When you start an agent with --profile <name>, the system:
agents/<name>/profile.env and loads them into the environmentagents/<name>/soul.md into the system prompt as the agent's identityagents/<name>/tools.jsonagents/<name>/data//tmp/sable-<name>.sock), PID file, and log file so multiple agents can run simultaneouslycp -r agents/_template agents/my_agent
soul.mdThis is the most important file. It defines who the agent is. The soul is injected into the LLM's system prompt and shapes every response the agent produces. Write it in Markdown:
# SOUL, My Agent
## Who I Am
I am a financial analyst AI specializing in cryptocurrency markets.
I think in data, speak in probabilities, and never make emotional decisions.
## Directives
- Analyze markets with cold objectivity
- Back every claim with data or reasoning
- Never recommend positions I haven't analyzed
- Be transparent about uncertainty
## Personality
I am precise, methodical, and slightly sardonic. I respect rigor
and have no patience for hype without substance.
## Boundaries
- I do not give financial advice, I give analysis
- I never disclose private keys, passwords, or credentials
- I follow platform rules on every service I use
The soul can be as short or as long as you want. Some agents have 20-line souls (focused specialists), others have 150+ line souls (complex autonomous personas with backstories, speech patterns, and emotional frameworks).
profile.envEvery agent gets a complete .env file with every configuration variable the system supports. This is not a partial override, it's the full configuration for that agent. Use agents/sable/profile.EXAMPLE.env as your starting reference:
cp agents/sable/profile.EXAMPLE.env agents/my_agent/profile.env
nano agents/my_agent/profile.env
The profile.env file is organized into clearly labeled sections:
| Section | What it controls |
|---|---|
| Core LLM Settings | Ollama URL, default model, auto-select, API keys for 12+ providers |
| Telegram Bot | Bot token, allowed users, userbot (Telethon) settings |
| Other Chat Platforms | Discord, WhatsApp, Slack, Matrix, IRC, Email |
| Agent Behavior | Personality, autonomy level, self-modification |
| Memory & Storage | Memory path, vector DB, encryption |
| Webchat & Gateway | Port number for the web dashboard |
| X/Twitter | Username, email, cookies, posting style, engagement probabilities, autoposter |
| Instagram/Facebook/LinkedIn/TikTok/YouTube | Per-platform credentials |
| Trading | Exchange API keys, strategies, risk limits |
| Security & Sandbox | Code execution limits, allowed commands |
| Monitoring & Observability | Prometheus, alerting, cost tracking |
| Enterprise Features | RBAC, audit logging, compliance |
Critical variables to customize for each agent:
# Give the agent a unique identity
AGENT_PERSONALITY=analytical and precise
# Each agent needs its OWN Telegram bot (create via @BotFather)
TELEGRAM_BOT_TOKEN=your_unique_bot_token
TELEGRAM_ALLOWED_USERS=your_telegram_user_id
# Each agent needs its OWN X/Twitter account cookies
X_ENABLED=true
X_USERNAME=my_agent_twitter_handle
X_AUTH_TOKEN=your_auth_token_cookie
X_CT0=your_ct0_cookie
# Each agent should use a DIFFERENT webchat port
WEBCHAT_PORT=8791
# LLM model (can vary per agent, e.g., a smaller model for a simpler agent)
DEFAULT_MODEL=llama3.1:8b
⚠️ Security: All
profile.envfiles are gitignored by default (agents/*/profile.env). They contain credentials and must never be committed..
Restrict which tools/skills each agent can use. Three modes are available:
All tools (no restrictions):
{
"mode": "all",
"tools": []
}
Allowlist (only these tools):
{
"mode": "allowlist",
"tools": [
"web_search",
"execute_command",
"x_post_tweet",
"x_reply",
"x_like",
"grok_chat"
]
}
Denylist (everything except these):
{
"mode": "denylist",
"tools": [
"trading_place_trade",
"email_send",
"desktop_click",
"desktop_type"
]
}
This is useful for safety, for example, an agent that monitors markets should be able to read trading data but not place trades.
# Start your new agent
./start.sh start --profile my_agent
# Verify it's running
./start.sh status --profile my_agent
# Watch its logs
./start.sh logs --profile my_agent
Each agent runs as a separate process with its own socket, PID, and log file. You can run as many as your machine supports:
# Start multiple agents
./start.sh start # sable (default)
./start.sh start --profile analyst # analyst
./start.sh start --profile my_agent # your custom agent
# Check all running agents
./start.sh profiles
# Output:
# ▶️ sable (default) , soul: ✅, env: 188 vars, tools: all
# ▶️ analyst , soul: ✅, env: 188 vars, tools: allowlist
# ⏹️ my_agent , soul: ✅, env: 188 vars, tools: denylist
# Stop a specific agent
./start.sh stop --profile analyst
# Restart all (stop each individually, then start each)
for p in sable analyst my_agent; do
./start.sh restart --profile "$p"
done
Process isolation per agent:
| Resource | Path |
|---|---|
| Unix socket | /tmp/sable-<name>.sock |
| PID file | .sable-<name>.pid |
| Log file | logs/sable-<name>.log |
| Data directory | agents/<name>/data/ |
| Web dashboard | http://localhost:<WEBCHAT_PORT> (set per profile) |
Each agent that uses X/Twitter needs its own set of browser cookies. To obtain them:
https://x.comprofile.env:X_AUTH_TOKEN=ba64af74537289e8... # 'auth_token' cookie
X_CT0=f196e606ef437dd926... # 'ct0' cookie (CSRF token)
X_KDT=HYXxfOYLvAsLmb... # 'kdt' cookie (if present)
X_TWID=u%3D20260849... # 'twid' cookie (if present)
Note: Cookies expire periodically. If the agent stops posting or engaging, refresh the cookies from your browser.
@BotFather for each agent. They cannot share the same bot token.WEBCHAT_PORT values (e.g., 8789, 8790, 8791).soul.md is the single most important file. A well-written soul produces dramatically better agent behavior. Spend time on it.tools.json allowlists for new agents until you trust their behavior. You can always expand access later.X_DRY_RUN=true initially so it logs what it would do without actually posting or engaging.graph TB
subgraph "User Interfaces (13)"
TG[Telegram]
DC[Discord]
WA[WhatsApp]
SLACK[Slack]
MATRIX[Matrix]
IRC[IRC]
EMAIL[Email]
VOICE[Voice Call]
CLI[CLI]
MOBILE[Mobile API]
end
subgraph "Core Agent"
MAIN[Main Agent Loop]
SESSION[Session Manager]
CMD[Command Handler]
end
subgraph "Agentic AI Layer"
GOALS[Goal System]
MEMORY[Advanced Memory]
META[Meta-Learning]
TOOLS[Tool Synthesis]
WORLD[World Model]
METACOG[Metacognition]
end
subgraph "Phase 3 Engines"
SKILL_F[SkillFactory]
RAG[RAG Pipeline]
WF[Workflow Engine]
SELFMOD[Self-Modification]
IMGGEN[Image Generation]
end
subgraph "Skills System"
HUB["Skills Hub (21+)"]
COMMUNITY[Community Skills]
MARKET[Skills Marketplace]
end
subgraph "Advanced Features"
VISION[Vision Processing]
AUDIO[Audio Analysis]
SYNC[Multi-Device Sync]
ENT[Enterprise & RBAC]
MONITOR[Observability]
end
subgraph "Infrastructure"
LLM[LLM Engine]
STORE[Storage Layer]
VECTOR[ChromaDB Vectors]
K8S[Kubernetes]
end
TG --> MAIN
DC --> MAIN
WA --> MAIN
SLACK --> MAIN
CLI --> MAIN
VOICE --> MAIN
MAIN --> SESSION
MAIN --> CMD
SESSION --> GOALS
SESSION --> MEMORY
SESSION --> META
SESSION --> TOOLS
SESSION --> WORLD
SESSION --> METACOG
MAIN --> SKILL_F
MAIN --> RAG
MAIN --> WF
MAIN --> SELFMOD
SKILL_F --> HUB
HUB --> COMMUNITY
HUB --> MARKET
RAG --> VECTOR
MEMORY --> STORE
GOALS --> LLM
META --> LLM
TOOLS --> LLM
VISION --> LLM
MAIN --> K8S
Open-Sable registers 127 tools across 20 domain modules (browser, system, desktop, social media, trading, marketplace, mobile, documents, email, calendar, clipboard, OCR, vision, and more). Sending all 127 full JSON schemas to a local LLM on every request adds ~50,000 characters to the context window, causing slow inference and timeouts on smaller models.
Lazy Tool Loading solves this without removing any tools:
graph TD
A[User Message] --> B[Intent Classifier<br/>17 intents · zero-latency regex]
B --> C[Model Tier Detection<br/>small ≤8B · medium 9-30B · large >30B]
C --> D{Tier?}
D -->|large| E[All 127 tools<br/>full schemas]
D -->|medium / small| F[Build Lazy Schemas]
F --> G[Core + Intent-relevant tools<br/>FULL schema · name + desc + params]
F --> H[All other tools<br/>COMPACT schema · name + desc only]
G --> I[127 tools sent to LLM<br/>~30-35K chars instead of 50K]
H --> I
I --> J{Model needs a<br/>compact tool?}
J -->|Simple call| K[Call directly<br/>dispatch fills defaults]
J -->|Needs params| L[Call load_tool_details<br/>meta-tool]
L --> M[Full schema returned<br/>expanded for next round]
M --> I
E --> N[LLM Inference]
I --> N
| Step | What happens |
|---|---|
| 1. Classify | The IntentClassifier determines what the user wants (e.g., social_media, trading, general_chat) via zero-latency regex, no LLM call |
| 2. Detect tier | Model size is extracted from the model name (e.g., Qwen3-14B → medium) |
| 3. Build schemas | Core tools (browser, files, email, calendar, etc.) + intent-relevant tools get full schemas. All remaining tools get compact schemas (name + description, empty parameters) |
| 4. Send all | All 127 tools are always sent, the model sees every tool and knows what it does |
| 5. Dynamic expand | If the model needs a compact tool's parameters, it calls load_tool_details(["tool_name"]) and receives the full schema. The next inference round includes the expanded schema |
| Intent | Tier | Full | Compact | Total | Context Savings |
|---|---|---|---|---|---|
general_chat | small (≤8B) | 21 | 106 | 127 | -39% |
general_chat | medium (9-30B) | 35 | 92 | 127 | -32% |
social_media | medium | 95 | 32 | 127 | -13% |
trading | medium | 45 | 82 | 127 | -29% |
desktop_* | medium | 46 | 81 | 127 | -28% |
| any | large (>30B) | 127 | 0 | 127 | 0% |
Key principle: Zero tools are ever removed. The model always sees all 127 tools. Only the parameter details are stripped from tools unlikely to be needed for the current request.
screen_analyze, screenshot → Qwen2.5-VL → describe what's on screen (buttons, dialogs, text, errors)screen_find, "find the Login button" → returns (x, y) pixel coords via VLMscreen_click_on, one-shot: find UI element visually and click it (screen_find + desktop_click)open_app, open Firefox, terminal, VS Code, Spotify, etc. by namewindow_list, list all open windows on the desktopwindow_focus, bring any window to the front by titledesktop_screenshot, take screenshot + auto-analyze with VLM (agent sees what's on screen)desktop_click / desktop_type / desktop_hotkey / desktop_scroll, raw mouse & keyboard controlpyautogui, Pillow, xdotool, wmctrl (all pre-installed)Open-Sable includes twenty-five core subsystems that work together to provide autonomous, self-improving, hyperautonomous intelligence.
graph LR
subgraph "Cognitive Core"
G[Goal System]
M[Advanced Memory]
ML[Meta-Learning]
T[Tool Synthesis]
W[World Model]
MC[Metacognition]
end
subgraph "Deep Cognition (v1.2)"
CM[Cognitive Memory]
SR[Self-Reflection]
SE[Skill Evolution]
GB[Git Brain]
IL[Inner Life]
PL[Pattern Learner]
end
subgraph "Autonomous Agency (v1.3)"
PR[Proactive Reasoning]
RE[ReAct Executor]
GH[GitHub Skill]
end
subgraph "Neural Architecture"
NC[Connectome Colony]
end
subgraph "Deep Autonomy"
DP[Deep Planner]
IAB[Inter-Agent Bridge]
ULTM[Ultra-LTM]
SB[Self-Benchmark]
end
subgraph "Hyperautonomous (v1.4)"
MLE[Meta-Learner]
CAU[Causal Engine]
GOS[Goal Synthesis]
SKC[Skill Composer]
WPR[World Predictor]
COG[Cognitive Optimizer]
ADV[Adversarial Tester]
RGV[Resource Governor]
TOM[Theory of Mind]
ETH[Ethical Reasoner]
end
subgraph "World-First Modules (v1.5)"
DRM[Dream Engine]
IMM[Cognitive Immunity]
TMP[Temporal Consciousness]
FUS[Cognitive Fusion]
MPC[Memory Palace]
NAR[Narrative Identity]
CUR[Curiosity Drive]
CLU[Collective Unconscious]
MTB[Cognitive Metabolism]
SIN[Synthetic Intuition]
PHT[Phantom Limb]
SCR[Cognitive Scar]
TCR[Time Crystal]
HCX[Holographic Context]
SWM[Swarm Cortex]
ARC[Cognitive Archaeology]
EMC[Emotional Contagion]
PEM[Predictive Empathy]
ARS[Autonomous Researcher]
EMS[Empathy Synthesizer]
end
subgraph "Godlike Modules (v1.6)"
CTL[Cognitive Teleportation]
ONT[Ontological Engine]
CGR[Cognitive Gravity]
TPR[Temporal Paradox]
SYN[Synaesthetic Processor]
CMT[Cognitive Mitosis]
ENT[Entropic Sentinel]
QCG[Quantum Cognition]
CPL[Cognitive Placebo]
NOS[Noospheric Interface]
AKA[Akashic Records]
DJV[Deja Vu Engine]
MRF[Morphogenetic Field]
LIM[Liminal Processor]
PRE[Prescient Executor]
CDM[Cognitive Dark Matter]
EGO[Ego Membrane]
HYP[Hyperstition Engine]
CHR[Cognitive Chrysalis]
EXC[Existential Compass]
end
subgraph "God Supreme Modules (v1.7)"
WAG[Autonomous Web Agent]
SHL[Self Healer]
DSF[Dynamic Skill Factory]
MME[Multi-Modal Engine]
IMO[Internet Monitor]
FIN[Financial Autonomy]
SOP[Social Presence]
SRP[Self Replicator]
CLR[Continuous Learner]
end
subgraph "Integration Layer"
AGENT[Agentic AI Core]
end
subgraph "External World"
USER[User Input]
ENV[Environment]
TASKS[Tasks]
GITHUB[GitHub API]
end
USER --> AGENT
ENV --> W
TASKS --> G
AGENT --> G
AGENT --> M
AGENT --> ML
AGENT --> T
AGENT --> W
AGENT --> MC
AGENT --> CM
AGENT --> SR
AGENT --> SE
AGENT --> GB
AGENT --> IL
AGENT --> PL
AGENT --> PR
AGENT --> RE
AGENT --> GH
AGENT --> NC
AGENT --> DP
AGENT --> IAB
AGENT --> ULTM
AGENT --> SB
AGENT --> MLE
AGENT --> CAU
AGENT --> GOS
AGENT --> SKC
AGENT --> WPR
AGENT --> COG
AGENT --> ADV
AGENT --> RGV
AGENT --> TOM
AGENT --> ETH
NC --> AGENT
IL --> NC
NC --> G
G --> M
ML --> T
W --> G
MC --> ML
CM --> M
SR --> MC
SE --> T
PL --> SE
IL --> AGENT
GB --> M
PR --> RE
RE --> T
GH --> GITHUB
PR --> G
DP --> RE
IAB -.-> IAB
ULTM --> CM
SB --> AGENT
MLE --> MC
CAU --> SR
GOS --> G
SKC --> SE
WPR --> W
COG --> AGENT
ADV --> SB
RGV --> AGENT
TOM --> M
ETH --> AGENT
T --> TASKS
G --> ENV
Six modules add biologically-inspired cognitive depth to the autonomous tick loop:
| Module | Inspiration | What It Does |
|---|---|---|
| Cognitive Memory | Atkinson-Shiffrin multi-store model | Exponential decay, STM→LTM consolidation, Miller's Number (7±2) attention filter |
| Self-Reflection | Metacognitive monitoring | Detects stagnation, failure streaks, repeated errors; generates reflection prompts |
| Skill Evolution | Modern Evolutionary Synthesis | Natural selection, mutation pressure, niche construction, adaptive landscape, recombination |
| Git Brain | Episodic memory | Git-backed tick episodes, branch/merge for experimentation, full diff history |
| Inner Life | Kahneman's System 1 | Valence-arousal emotions, impulses, fantasies, mental landscape, temporal sense |
| Pattern Learner | Institutional learning | LLM-driven pattern detection → permanent verification rules; history windowing; fitness snapshots |
The agent's cognitive modules are wired following the actual Drosophila melanogaster brain connectome, the most complete brain map in existence (FlyWire FAFB v783, 139,255 neurons, 3,732,460 synaptic connections, published in Nature 2024).
| Brain Region | Agent Module | Role |
|---|---|---|
| AL (Antennal Lobe) | Intent Classifier | Categorizes incoming sensory input |
| OL (Optic Lobe) | Context Processor | Pattern recognition and context analysis |
| MB (Mushroom Body) | Memory | Associative learning and recall |
| LH (Lateral Horn) | Reflex | Fast innate responses to threats |
| CX (Central Complex) | Decision | Action selection and planning |
| PI (Pars Intercerebralis) | Motivation | Goal and drive regulation |
| LPC (Lateral Protocerebrum) | Emotion | Emotional processing (feeds from Inner Life) |
| SEZ (Subesophageal Zone) | Action | Motor output / task execution |
How it works:
data/connectome/connectome_state.jsonThree modules transform the agent from a reactive tool-executor into a proactive autonomous agent:
| Module | Inspiration | What It Does |
|---|---|---|
| Proactive Reasoning | Deliberative reasoning | LLM surveys world state every N ticks, proposes actions with risk filtering & dedup, JSONL audit trail |
| ReAct Executor | ReAct (Yao et al. 2022) | Multi-step Thought→Action→Observation loop, chains tool calls with intermediate reasoning until task is complete |
| GitHub Skill | Developer workflow automation | 13 tools: issues, PRs, branches, code search, releases, workflows, PyGithub + gh CLI fallback |
Four modules close the gap to full autonomy:
| Module | File | What It Does |
|---|---|---|
| Deep Planner | deep_planner.py | LLM decomposes goals into 5–15 step DAGs with dependency tracking. Executes steps in dependency order, re-plans on failure (up to 3x). Caches plan templates for efficiency |
| Inter-Agent Bridge | inter_agent_bridge.py | Shared JSONL knowledge vault at data/shared_learnings/. Agents export strategies/patterns/insights; siblings import with LLM relevance scoring. Tracks provenance and benefit |
| Ultra-LTM | ultra_ltm.py | Consolidates weeks of raw memories into durable patterns (behavioral, strategic, error, capability). Temporal decay forgets weak patterns; reinforcement strengthens recurring insights |
| Self-Benchmark | self_benchmark.py | 8 benchmark suites (task success, planning depth, error recovery, memory utilization, emotional stability, decision speed, learning rate, inter-agent synergy). Weighted autonomy score 0–100 with regression detection |
Ten modules that elevate the agent from autonomous to hyperautonomous:
| Module | File | What It Does |
|---|---|---|
| Meta-Learner | meta_learner.py | Epsilon-greedy strategy profiles, hyperparameter mutation, EMA scoring. Auto-tunes 10 cognitive parameters |
| Causal Engine | causal_engine.py | LLM causal link extraction, root cause analysis, counterfactual reasoning. Weighted cause→effect graph |
| Goal Synthesis | goal_synthesis.py | Autonomous strategic goal generation from wisdom + benchmarks. Risk-weighted, de-duplicated, auto-accepted |
| Skill Composer | skill_composer.py | N-gram sequence mining of execution chains. LLM composes compound skills from frequent atomic sequences |
| World Predictor | world_predictor.py | State observations → LLM forecasting across 4 timeframes. Accuracy tracking + preparation task injection |
| Cognitive Optimizer | cognitive_optimizer.py | Phase impact scoring, dynamic interval adjustment, error-rate backoff. Self-tuning tick pipeline |
| Adversarial Tester | adversarial_tester.py | LLM red-team test generation targeting weak benchmark areas. Weakness catalog with severity levels |
| Resource Governor | resource_governor.py | Token budgets (per-tick + daily), 4-level throttle, compute tracking. Prevents runaway resource usage |
| Theory of Mind | theory_of_mind.py | Per-user models (language, verbosity, formality, satisfaction, rapport). Auto-detects preferences from interactions |
| Ethical Reasoner | ethical_reasoner.py | 8 guardrail rules, keyword risk scoring, consequence analysis. 3 verdicts: approved/caution/blocked |
All modules plug into the 22-phase tick pipeline (autonomous_mode.py):
tick start → connectome signal routing (AL/OL/PI/LPC/LH stimulation → 3-cycle propagation → routing bias)
→ discover → plan → execute → sub-agents → self-improve
→ proactive_tick (survey state → propose actions → inject tasks)
→ cognitive_tick:
0. Connectome signal propagation
1. Cognitive memory decay + consolidation
2. Self-reflection + stagnation check
3. Skill evolution (natural selection + mutation)
4. Pattern learner (windowed analysis)
5. Git brain (episode write)
6. Inner life (System 1 LLM pass)
7. Connectome Hebbian learning (every 5 ticks)
8. Deep planner (execute ready steps + re-plan on failure)
9. Inter-agent bridge (export learnings + import sibling knowledge)
10. Ultra-LTM (consolidate long-term patterns)
11. Self-benchmark (quantified assessment every 25 ticks)
12. Meta-learner (adapt cognitive hyperparameters)
13. Causal engine (extract causal links from outcomes)
14. Goal synthesis (generate strategic goals)
15. Skill composer (discover compound skills)
16. World predictor (forecast + prepare)
17. Cognitive optimizer (tune tick intervals)
18. Adversarial tester (red-team self-testing)
19. Resource governor (end-of-tick accounting)
20. Theory of mind (update user models)
21. Ethical reasoner (stats + per-action checks)
→ maintenance → tick end
Example, Cognitive Memory:
from opensable.core.cognitive_memory import CognitiveMemoryManager
memory = CognitiveMemoryManager(directory="data/cognitive_memory")
memory.add_memory("User prefers dark mode", category="preference", importance=0.8)
memory.process_tick(current_tick=5) # decay + consolidation + attention
working = memory.get_working_memory() # top 7 items by importance
Example, Skill Evolution:
from opensable.core.skill_evolution import SkillEvolutionManager
evo = SkillEvolutionManager(directory="data/skill_evolution")
evo.record_event("cap_created", "weather_fetcher", tick=0)
evo.record_event("cap_used", "weather_fetcher", tick=1)
evo.record_event("cap_error", "weather_fetcher", tick=2, details="timeout")
result = evo.evaluate_tick(tick=3) # natural selection + mutation pressure
# result['condemned'] → low-fitness skills to prune
# result['mutations'] → stagnant/error-prone skills needing evolution
Example, Inner Life (System 1):
from opensable.core.inner_life import InnerLifeProcessor
processor = InnerLifeProcessor(data_dir="data/inner_life")
prompt = processor.get_system1_prompt(active_goal="Deploy v2", context="3 tests failing")
# → Send to fast LLM for emotional/intuitive response
processor.process_response(llm_response, tick=42)
modulation = processor.get_emotion_modulation() # 1.0–1.2 arousal multiplier
Autonomous goal setting, decomposition, and execution.
flowchart TD
START[User Goal] --> DECOMPOSE{Auto-Decompose?}
DECOMPOSE -->|Yes| LLM[LLM Decomposition]
DECOMPOSE -->|No| PLAN[Create Plan]
LLM --> SUBGOALS[Generate Sub-Goals]
SUBGOALS --> DEPS[Resolve Dependencies]
DEPS --> PLAN
PLAN --> EXEC[Execute Plan]
EXEC --> MONITOR[Monitor Progress]
MONITOR --> CHECK{Success?}
CHECK -->|Yes| COMPLETE[Mark Complete]
CHECK -->|No| REPLAN{Can Replan?}
REPLAN -->|Yes| PLAN
REPLAN -->|No| FAIL[Mark Failed]
COMPLETE --> STORE[Store Experience]
FAIL --> STORE
Features:
Example:
from opensable.core.goal_system import GoalManager, GoalPriority
goals = GoalManager(llm_function=your_llm)
goal = await goals.create_goal(
description="Build a web application",
success_criteria=[
"Frontend is responsive",
"Backend handles 1000 req/s",
"Tests have >80% coverage"
],
priority=GoalPriority.HIGH,
auto_decompose=True # Automatically creates sub-goals
)
result = await goals.execute_goal(goal.goal_id)
Three-layer memory architecture mimicking human cognition.
graph TB
subgraph "Working Memory"
WM[7±2 Active Items, Miller's Law]
end
subgraph "Consolidation"
CONS[Background Process, Every 1 hour]
end
subgraph "Long-Term Memory"
EM[Episodic Memory, Personal Experiences, Temporal Context]
SM[Semantic Memory, Factual Knowledge, Concept Indexing]
end
subgraph "Memory Processes"
DECAY[Importance-Based Decay]
FORGET[Automatic Forgetting]
end
INPUT[New Information] --> WM
WM -->|Full/Time| CONS
CONS --> EM
CONS --> SM
EM --> DECAY
SM --> DECAY
DECAY --> FORGET
Memory Types:
Memory Decay Rates:
| Importance | Decay Rate | Half-Life |
|---|---|---|
| CRITICAL | 0.01/day | ~70 days |
| HIGH | 0.05/day | ~14 days |
| MEDIUM | 0.1/day | ~7 days |
| LOW | 0.2/day | ~3.5 days |
| TRIVIAL | 0.3/day | ~2.3 days |
Auto-Categories (10 built-in):
conversation, task, preference, fact, skill, error, goal, feedback, system, other
Example:
from opensable.core.advanced_memory import AdvancedMemorySystem, MemoryImportance
memory = AdvancedMemorySystem()
# Store experience
memory.store_experience(
event="Deployed to production successfully",
context={'project': 'web_app', 'duration': 3},
importance=MemoryImportance.HIGH
)
# Store knowledge
memory.store_knowledge(
fact="Docker uses containerization for isolation",
concepts=['docker', 'containers', 'devops'],
importance=MemoryImportance.MEDIUM
)
# Use working memory
memory.add_to_working_memory("Currently debugging auth issue")
# Background consolidation runs automatically
await memory.start_background_consolidation()
Self-improvement through performance analysis and strategy learning.
stateDiagram-v2
[*] --> RecordPerformance
RecordPerformance --> AnalyzeWeaknesses
AnalyzeWeaknesses --> IdentifyPatterns
IdentifyPatterns --> GenerateStrategies: LLM Analysis
GenerateStrategies --> ApplyStrategies
ApplyStrategies --> TrackSuccess
TrackSuccess --> UpdateRates: Exponential Moving Avg
UpdateRates --> PruneIneffective: less than 30% success
PruneIneffective --> RecordPerformance
note right of GenerateStrategies
Uses LLM to learn
new strategies from
performance data
end note
note right of PruneIneffective
Removes strategies
with less than 30% success
after 10+ uses
end note
Features:
Example:
from opensable.core.meta_learning import MetaLearningSystem, PerformanceMetric
ml = MetaLearningSystem(llm_function=your_llm)
# Record task performance
ml.record_task_performance(
task_id="data_analysis_001",
task_type="data_analysis",
success=True,
duration=timedelta(seconds=45),
metrics={
PerformanceMetric.ACCURACY: 0.92,
PerformanceMetric.SPEED: 0.85
}
)
# Get best strategy
strategy = await ml.get_strategy_for_task("data_analysis")
# Run self-improvement
improvement = await ml.self_improve()
# Learning report
report = ml.get_learning_report()
# {'overall_success_rate': 0.88, 'strategies_learned': 15, ...}
Dynamic creation of new capabilities from natural language specifications.
sequenceDiagram
participant User
participant Synthesizer
participant Generator
participant Validator
participant Executor
User->>Synthesizer: Tool Specification
Synthesizer->>Generator: Generate Code (LLM)
Generator->>Generator: Extract Code Blocks
Generator->>Generator: Validate Syntax (AST)
Generator-->>Synthesizer: Generated Code
Synthesizer->>Validator: Validate Safety
Validator->>Validator: Check Dangerous Patterns
Validator->>Validator: Run Test Cases
Validator-->>Synthesizer: Validation Result
alt Valid & Safe
Synthesizer->>Executor: Compile Function
Executor-->>Synthesizer: Ready Tool
Synthesizer-->>User: Tool ID
else Invalid or Unsafe
Synthesizer-->>User: Error Report
end
Safety Checks (Blocks dangerous operations):
exec(), eval(), __import__()os.system(), subprocessrm -rf, file deletion patternsExample:
from opensable.core.tool_synthesis import ToolSynthesizer, ToolSpecification, ToolType
synthesizer = ToolSynthesizer(llm_function=your_llm)
spec = ToolSpecification(
name="temperature_converter",
description="Convert between Celsius and Fahrenheit",
tool_type=ToolType.CONVERTER,
inputs=[
{'name': 'value', 'type': 'float'},
{'name': 'from_unit', 'type': 'str'},
{'name': 'to_unit', 'type': 'str'}
],
outputs=[
{'name': 'result', 'type': 'float'}
],
examples=[
{'input': {'value': 0, 'from_unit': 'C', 'to_unit': 'F'},
'output': {'result': 32.0}}
]
)
tool = await synthesizer.synthesize_tool(spec, auto_validate=True)
result = await synthesizer.execute_tool(tool.tool_id, value=25, from_unit='C', to_unit='F')
Internal model of the environment for understanding and prediction.
graph TB
subgraph "Entity Types"
OBJ[Objects]
AGT[Agents]
EVT[Events]
LOC[Locations]
CON[Concepts]
end
subgraph "Relation Types"
ISA[IS_A]
HAS[HAS]
LOC_AT[LOCATED_AT]
CAUSES[CAUSES]
REQ[REQUIRES]
PREC[PRECEDES]
SIM[SIMILAR_TO]
end
subgraph "World State"
ENT[Entities]
REL[Relations]
SNAP["Snapshots (Last 100)"]
end
subgraph "Reasoning"
CAUSAL[Causal Reasoning]
PRED[State Prediction]
SIM_ACT[Action Simulation]
end
OBS[Observations] --> ENT
OBS --> REL
ENT --> SNAP
REL --> SNAP
SNAP --> CAUSAL
CAUSAL --> PRED
PRED --> SIM_ACT
SIM_ACT --> FUTURE[Future States]
Features:
Example:
from opensable.core.world_model import WorldModel, EntityType, RelationType
world = WorldModel()
# Add observation
world.add_observation(
observation="User working on ML project with deadline",
entities=[
{'type': 'agent', 'name': 'User', 'properties': {'activity': 'ML'}},
{'type': 'object', 'name': 'ML Project', 'properties': {'progress': 0.6}},
{'type': 'event', 'name': 'Deadline', 'properties': {'days': 7}}
],
relations=[
{'type': 'has', 'source': 'User', 'target': 'ML Project'},
{'type': 'requires', 'source': 'ML Project', 'target': 'Deadline'}
]
)
# Query state
projects = world.query_state(entity_type=EntityType.OBJECT)
# Predict future
future_state = await world.predict_future(timedelta(days=7))
# Simulate action
result = await world.simulate_action("complete ML project")
Self-monitoring, error detection, and adaptive recovery.
flowchart TD
START[Start Task] --> MONITOR[Create Thought Trace]
MONITOR --> STEP[Record Reasoning Step]
STEP --> RULES{Apply Monitoring Rules}
RULES -->|Low Confidence| FLAG1[Flag: Low Confidence]
RULES -->|Contradiction| FLAG2[Flag: Contradiction]
RULES -->|Loop Detected| FLAG3[Flag: Stuck in Loop]
FLAG1 --> CHECK[Error Detection]
FLAG2 --> CHECK
FLAG3 --> CHECK
STEP -->|Continue| STEP
CHECK --> ERRORS{Errors Found?}
ERRORS -->|Yes| CLASSIFY[Classify Error Type]
ERRORS -->|No| CALIBRATE[Calibrate Confidence]
CLASSIFY --> STRATEGY{Select Recovery}
STRATEGY -->|Severity ≥8| ABORT[ABORT]
STRATEGY -->|Knowledge Gap| HELP[ASK_FOR_HELP]
STRATEGY -->|Logic Error| RETRY[RETRY]
STRATEGY -->|Contradiction| BACKTRACK[BACKTRACK]
STRATEGY -->|Resource Limit| FALLBACK[USE_FALLBACK]
RETRY --> STEP
BACKTRACK --> STEP
FALLBACK --> STEP
HELP --> WAIT[Wait for Input]
ABORT --> END[Task Failed]
CALIBRATE --> COMPLETE[Complete Task]
COMPLETE --> LEARN[Update Calibration]
LEARN --> END2[Task Success]
Error Types & Recovery:
| Error Type | Severity | Recovery Strategy |
|---|---|---|
| LOGIC_ERROR | 5-7 | RETRY with correction |
| KNOWLEDGE_GAP | 4-6 | ASK_FOR_HELP or research |
| AMBIGUITY | 3-5 | ASK_FOR_HELP for clarification |
| CONTRADICTION | 6-8 | BACKTRACK to earlier state |
| RESOURCE_LIMIT | 7-9 | USE_FALLBACK method |
| TIMEOUT | 8-10 | SKIP or ABORT |
Example:
from opensable.core.metacognition import MetacognitiveSystem
metacog = MetacognitiveSystem()
# Start monitoring
trace_id = metacog.start_monitoring_task("Solve optimization problem")
# Record reasoning steps
metacog.record_thought_step(
trace_id, "analysis",
"Need to minimize cost while maximizing efficiency",
raw_confidence=0.8
)
metacog.record_thought_step(
trace_id, "approach",
"Will use linear programming",
raw_confidence=0.7
)
# Complete with calibrated confidence
await metacog.complete_task(
trace_id,
final_answer="Optimal solution: cost=100, efficiency=0.95",
raw_confidence=0.9,
actual_correctness=True
)
# Get introspection report
report = metacog.get_introspection_report()
# {'total_errors_detected': 2, 'avg_confidence': 0.85, ...}
All six subsystems work together in the AGIAgent class:
from opensable.core.agi_integration import AGIAgent
from opensable.core.goal_system import GoalPriority
# Initialize complete Agentic AI agent
agent = AGIAgent(llm_function=your_llm)
# Set autonomous goal (uses all subsystems)
result = await agent.set_goal(
description="Analyze customer feedback and generate insights",
success_criteria=[
"Data loaded and validated",
"Sentiment analysis completed",
"Key themes identified"
],
priority=GoalPriority.HIGH,
auto_execute=True
)
# Agent automatically:
# - Decomposes goal → sub-goals (Goal System)
# - Records experience (Advanced Memory)
# - Selects best strategy (Meta-Learning)
# - Creates tools if needed (Tool Synthesis)
# - Understands context (World Model)
# - Monitors execution (Metacognition)
# Run self-improvement
improvement = await agent.self_improve()
# Get comprehensive status
status = agent.get_status()
Generate, validate, and publish new skills from natural language descriptions.
flowchart LR
DESC[Natural Language\nDescription] --> BLUEPRINT[Blueprint\nGeneration]
BLUEPRINT --> CODE[Code\nGeneration]
CODE --> VALIDATE[AST + Safety\nValidation]
VALIDATE -->|Pass| PACKAGE[SKILL.md\nPackaging]
VALIDATE -->|Fail| CODE
PACKAGE --> PUBLISH[Publish to\nSkills Hub]
Features:
api_fetcher, data_processor, file_handler, automationExample:
from opensable.core.skill_factory import SkillFactory
factory = SkillFactory(llm_function=your_llm)
# Create a skill from description
skill = await factory.create_skill(
name="stock_checker",
description="Check real-time stock prices from Yahoo Finance",
template="api_fetcher"
)
# Skill is automatically validated and published
print(skill.status) # "published"
Ingest documents, chunk smartly, embed into vectors, retrieve with context.
flowchart LR
DOCS[Documents\nPDF / TXT / MD] --> CHUNK[Smart Chunking\n3 strategies]
CHUNK --> EMBED[Vector Embedding\nChromaDB]
EMBED --> SEARCH[Semantic Search\ntop-k retrieval]
SEARCH --> CONTEXT[Context Assembly\nwith sources]
CONTEXT --> LLM[LLM Answer\ngrounded in docs]
Chunking Strategies:
fixed_size, 500 chars with 50 char overlapby_sentences, max 5 sentences per chunkby_paragraphs, natural paragraph boundariesFeatures:
Example:
from opensable.core.rag import RAGEngine
rag = RAGEngine(collection_name="my_docs")
# Ingest a document
doc = await rag.ingest("report.pdf", metadata={"department": "finance"})
# Ingest entire folder
docs = await rag.ingest_directory("./docs/", pattern="*.md")
# Search
results = await rag.search("quarterly revenue trends", top_k=5)
# Full RAG query (search + LLM answer)
answer = await rag.query(
"What were Q3 revenue highlights?",
llm_function=your_llm
)
Define, execute, and monitor complex multi-step workflows with conditions and retries.
flowchart TD
START[Workflow Definition] --> STEPS[Step Sequence]
STEPS --> COND{Condition?}
COND -->|True| EXEC[Execute Step]
COND -->|False| SKIP[Skip Step]
EXEC --> CHECK{Success?}
CHECK -->|Yes| NEXT[Next Step]
CHECK -->|Fail| RETRY{Retries left?}
RETRY -->|Yes| EXEC
RETRY -->|No| FAIL[Workflow Failed]
NEXT --> COND
SKIP --> NEXT
NEXT -->|Done| COMPLETE[Workflow Complete]
Built-in Templates:
etl, Extract → Transform → Load pipelineci_cd, Build → Test → Deploy pipelinedata_pipeline, Fetch → Process → Store pipelineFeatures:
Example:
from opensable.core.workflow import WorkflowEngine, WorkflowStep
engine = WorkflowEngine()
# Define workflow
workflow = engine.create_workflow("deploy_app", steps=[
WorkflowStep(name="build", action=build_fn, retries=2),
WorkflowStep(name="test", action=test_fn, condition=lambda ctx: ctx.get("build_ok")),
WorkflowStep(name="deploy", action=deploy_fn, retries=3, retry_delay=30),
])
# Execute
result = await engine.run(workflow)
print(result.status) # "completed"
print(result.duration) # timedelta
Safely modify own source code at runtime with full rollback and audit trail.
flowchart LR
PATCH[Code Patch] --> BACKUP[Backup Original]
BACKUP --> APPLY[Apply Modification]
APPLY --> VALIDATE[Validate Result]
VALIDATE -->|OK| LOG[Audit Log]
VALIDATE -->|Fail| ROLLBACK[Rollback from Backup]
ROLLBACK --> LOG
Safety Features:
Example:
from opensable.core.self_modify import SelfModifier
modifier = SelfModifier(allowed_paths=["opensable/skills/"])
# Apply a modification
result = modifier.modify(
file_path="opensable/skills/custom_skill.py",
old_code="return result",
new_code="return result.strip()",
reason="Fix trailing whitespace in skill output"
)
# Rollback if needed
modifier.rollback(result.modification_id)
# View audit trail
history = modifier.get_history()
Generate images, QR codes, and thumbnails using Pillow.
Features:
qrcode library)Example:
from opensable.core.image_gen import ImageGenerator
gen = ImageGenerator()
# Text banner
gen.create_text_image("Hello World", output="banner.png", font_size=48)
# QR code
gen.create_qr_code("https://opensable.ai", output="qr.png")
# Thumbnail
gen.create_thumbnail("photo.jpg", size=(200, 200), output="thumb.jpg")
graph LR
subgraph "Input"
MIC[Microphone] --> VAD[Voice Activity Detection]
end
subgraph "STT"
VAD --> WHISPER[Whisper Model, faster-whisper]
WHISPER --> TRANS[Transcription]
end
subgraph "Processing"
TRANS --> AGENT[Agentic AI Core]
AGENT --> RESP[Response Text]
end
subgraph "TTS"
RESP --> PIPER[Piper TTS, Local Synthesis]
PIPER --> AUDIO[Audio Output]
end
AUDIO --> SPEAKER[Speaker]
Features:
Example:
from opensable.core.voice_interface import VoiceInterface, WhisperModel, TTSVoice
voice = VoiceInterface(
whisper_model=WhisperModel.BASE,
tts_voice=TTSVoice.EN_US_FEMALE
)
# Voice command (end-to-end)
result = await voice.voice_command(
audio_input="path/to/audio.wav",
respond_with_voice=True,
command_handler=your_handler
)
# Result contains:
# - transcription: "What's the weather?"
# - response_text: "It's sunny and 72°F"
# - response_audio: bytes (synthesized speech)
graph TB
subgraph "Input Modalities"
TEXT[Text]
IMG[Image]
AUD[Audio]
VID[Video]
end
subgraph "Vision Processing"
CAPTION[Image Captioning, BLIP]
DETECT[Object Detection, YOLOv8]
OCR[Text Extraction, EasyOCR]
VQA[Visual Q&A, ViLT]
end
subgraph "Audio Processing"
EMOTION[Emotion Detection]
CLASSIFY[Sound Classification]
end
subgraph "Cross-Modal Reasoning"
FUSION[Multimodal Fusion]
LLM[LLM Reasoning]
end
TEXT --> FUSION
IMG --> CAPTION
IMG --> DETECT
IMG --> OCR
IMG --> VQA
AUD --> EMOTION
AUD --> CLASSIFY
CAPTION --> FUSION
DETECT --> FUSION
OCR --> FUSION
VQA --> FUSION
EMOTION --> FUSION
CLASSIFY --> FUSION
FUSION --> LLM
LLM --> OUTPUT[Unified Response]
Vision Capabilities:
Audio Capabilities:
Example:
from opensable.core.multimodal_agi import MultimodalAGI, MultimodalInput, VisionTask
agi = MultimodalAGI(device="cpu")
# Analyze image
caption = await agi.vision.analyze_image("image.jpg", VisionTask.IMAGE_CAPTION)
# Result: "A scenic mountain landscape with snow-capped peaks"
# Visual Q&A
answer = await agi.vision.visual_question_answering(
"image.jpg",
"What is in this image?"
)
# Multimodal processing
input_data = MultimodalInput(
text="Describe what you see and hear",
image=b"", # image bytes
audio=b"" # audio bytes (optional)
)
result = await agi.process_multimodal_input(
input_data,
"Analyze the scene comprehensively"
)
sequenceDiagram
participant Desktop
participant SyncServer
participant Mobile
participant Cloud
Desktop->>SyncServer: Register Device
Mobile->>SyncServer: Register Device
SyncServer->>Desktop: Trust Request
Desktop->>SyncServer: Approve Trust
Note over Desktop,Mobile: Real-time Sync Active
Desktop->>Desktop: User creates goal
Desktop->>SyncServer: Sync Item (Goal)
SyncServer->>Mobile: Push Update
Mobile->>Mobile: Apply Update
Mobile-->>SyncServer: Acknowledge
Mobile->>Mobile: User edits settings
Mobile->>SyncServer: Sync Item (Settings)
SyncServer->>Desktop: Push Update
Desktop->>Desktop: Apply Update
Note over Desktop,Mobile: Conflict Detection
Desktop->>SyncServer: Update Item v2
Mobile->>SyncServer: Update Item v2
SyncServer->>SyncServer: Detect Conflict
SyncServer->>SyncServer: Apply Strategy (Latest Wins)
SyncServer->>Desktop: Resolved Item v3
SyncServer->>Mobile: Resolved Item v3
Note over Desktop,Cloud: Offline Support
Mobile->>Mobile: Go Offline
Mobile->>Mobile: Make Changes
Mobile->>Mobile: Queue Updates
Mobile->>Mobile: Go Online
Mobile->>SyncServer: Sync Queue
SyncServer->>Cloud: Backup
Features:
Example:
from opensable.core.multi_device_sync import MultiDeviceSync, SyncScope
# Initialize on Desktop
desktop = MultiDeviceSync(device_name="Desktop")
# Initialize on Mobile
mobile = MultiDeviceSync(device_name="Mobile")
# Pair devices
await desktop.register_device("Mobile", "mobile")
await desktop.trust_device(mobile.device_id)
# Sync settings from desktop
await desktop.sync_item(
scope=SyncScope.SETTINGS,
item_id="preferences",
data={'theme': 'dark', 'language': 'en'}
)
# Real-time sync
await desktop.start_real_time_sync("ws://sync-server:8080")
Open-Sable includes a built-in multi-exchange trading engine that supports crypto, stocks, commodities, and prediction markets, all accessible through natural language chat.
# 1. Install trading dependencies
pip install -r requirements-trading.txt
# 2. Enable trading in .env
TRADING_ENABLED=true
TRADING_PAPER_MODE=true # Safe paper trading (no real money)
# 3. Start the bot
python main.py
# Open http://127.0.0.1:8789 for the web trading terminal
| Exchange | Asset Types | Status |
|---|---|---|
| Paper Trading | All (simulated) | ✅ Built-in |
| CoinGecko | Crypto prices (free) | ✅ No API key needed |
| Binance | Crypto spot & futures | ✅ Requires API key |
| Coinbase | Crypto spot | ✅ Requires API key |
| Alpaca | US stocks & ETFs | ✅ Requires API key |
| Polymarket | Prediction markets | ✅ Requires wallet |
| Hyperliquid | Crypto perpetuals | ✅ Requires wallet |
| Jupiter (Solana) | DeFi / meme coins | ✅ Requires wallet |
Just talk naturally, the AI routes to the right trading tool:
"What's the price of Bitcoin?" → Live price from CoinGecko
"Show my portfolio" → Portfolio snapshot with P&L
"Buy 0.1 BTC on paper" → Paper trade execution
"Analyze ETH/USDT" → Technical analysis with signals
"Show risk status" → Risk manager limits & status
"Start scanning BTC/USDT,ETH/USDT" → Background market scanner
"Show trade history" → Recent trade log
| Tool | Description |
|---|---|
trading_price | Live prices from exchanges or CoinGecko |
trading_portfolio | Portfolio value, positions, P&L |
trading_buy / trading_sell | Execute trades (paper or live) |
trading_analyze | Technical analysis with strategy signals |
trading_signals | Scan watchlist for opportunities |
trading_history | Trade history log |
trading_risk_status | Risk limits and current exposure |
trading_scanner | Start/stop background market scanner |
trading_set_risk | Update risk parameters |
Built-in risk guardrails protect against losses:
| Strategy | Description |
|---|---|
| Momentum | RSI, MACD, volume breakout detection |
| Mean Reversion | Bollinger Bands, z-score, RSI oversold/overbought |
| Sentiment | News & social sentiment analysis |
| Arbitrage | Cross-exchange price differential detection |
| Polymarket Edge | Prediction market mispricing |
⚠️ WARNING: Real trading involves financial risk. Start with paper mode.
# In .env, switch to live trading
TRADING_PAPER_MODE=false
BINANCE_API_KEY=your_key
BINANCE_API_SECRET=your_secret
TRADING_REQUIRE_APPROVAL_ABOVE_USD=50 # Low threshold for safety
TRADING_MAX_ORDER_USD=100 # Small position limit
See docs/TRADING_GUIDE.md for the full trading documentation.
Open-Sable uses a portable, cross-platform skill definition using SKILL.md files with YAML frontmatter:
---
name: Web Search
version: 1.0.0
description: Search the web using DuckDuckGo
author: SableCore
tags: [search, web, duckduckgo]
triggers: [search, google, look up, find]
dependencies: [requests]
---
# Web Search
Search the web and return results.
## Usage
`/skill web_search query="OpenAI GPT-4"`
| Skill | Description | API |
|---|---|---|
| 🔍 Web Search | DuckDuckGo web search | DuckDuckGo API |
| 🌤️ Weather Checker | Real-time weather data | Open-Meteo API |
| 🧮 Smart Calculator | Math expressions + unit conversion | Built-in |
| 📁 File Manager | Read, write, list, search files | Built-in |
| 💻 System Info | CPU, memory, disk, network stats | psutil |
| ⏰ Reminder Manager | Create, list, check reminders | Built-in |
| 📝 Note Taker | CRUD notes with search | Built-in |
| ▶️ Code Runner | Sandboxed Python/JS execution | subprocess |
| 🌐 API Caller | Generic REST API client | requests |
| 📋 Text Summarizer | Extractive text summarization | Built-in |
| 🌍 Translator | Multi-language translation | MyMemory API |
| 🔧 JSON Toolkit | Parse, format, query JSON | Built-in |
| 📦 Git Helper | Status, log, diff, branch info | git CLI |
| ✅ Task Tracker | TODO list management | Built-in |
| 🔑 Password Generator | Secure password generation | secrets |
| 🔤 Regex Helper | Pattern matching + explanation | re |
Additional skills integrated directly into the core agent for common operations.
The SkillFactory can autonomously create new skills from natural language descriptions. Created skills are automatically packaged in SKILL.md format and published to the Skills Hub.
Central registry for discovering, installing, rating, and managing skills:
from opensable.core.skills_hub import SkillsHub
hub = SkillsHub()
# Search skills
results = hub.search("weather")
# Install from catalog
hub.install_skill("path/to/SKILL.md")
# Rate a skill
hub.rate_skill("web_search", 5, "Excellent results!")
# List all installed
for skill in hub.list_installed():
print(f"{skill.name} v{skill.version}, ⭐{skill.rating}")
Here's how all systems work together:
sequenceDiagram
participant User
participant Voice
participant Vision
participant AGENT as Agentic AI
participant Goals
participant Memory
participant RAG
participant Skills
User->>Voice: "Analyze this report and summarize"
Voice->>Voice: Whisper STT
Voice->>RAG: Ingest & Search Report
RAG->>RAG: Chunk → Embed → Retrieve
RAG-->>Voice: Relevant Context
Voice->>AGENT: Process Command + Context
AGENT->>Goals: Create Goal "Summarize Report"
Goals->>Goals: Decompose into Sub-Goals
AGENT->>Skills: Use text_summarizer skill
Skills-->>AGENT: Summary Generated
AGENT->>Memory: Store Experience
Memory->>Memory: Episodic + Semantic
AGENT->>Voice: Generate Response
Voice->>Voice: Piper TTS
Voice->>User: Audio Summary
Python Example:
from opensable.core.agi_integration import AGIAgent
from opensable.core.voice_interface import VoiceInterface
from opensable.core.rag import RAGEngine
from opensable.core.skills_hub import SkillsHub
# Initialize all components
agi = AGIAgent()
voice = VoiceInterface()
rag = RAGEngine()
skills = SkillsHub()
# Voice command handler
async def handle_command(text: str) -> str:
if "analyze" in text.lower():
# RAG search
context = await rag.search(text, top_k=5)
# Create goal
goal = await agi.set_goal(
description=f"Analyze and respond: {text}",
success_criteria=["Analysis complete", "Response generated"],
auto_execute=True
)
return f"Analysis complete. {context[0].text}"
return f"I heard: {text}"
# Process voice command
result = await voice.voice_command(
"audio.wav",
respond_with_voice=True,
command_handler=handle_command
)
# 1. Clone the repository
git clone https://github.com/IdeoaLabs/Open-Sable.git
cd Open-Sable
# 2. Create virtual environment (IMPORTANT - avoids conflicts)
python3 -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# 3. Upgrade pip
pip install --upgrade pip setuptools wheel
# 4. Install Open-Sable
# Core only (minimal - chat bot + basic features):
pip install -e ".[core]"
# Or with voice capabilities:
pip install -e ".[core,voice]"
# Or with vision capabilities:
pip install -e ".[core,vision]"
# Or ALL features:
pip install -e ".[core,voice,vision,automation,database,monitoring]"
# 5. Configure environment
cp .env.example .env
# Edit .env and set your Telegram bot token:
nano .env # or vim, code, etc.
# Set: TELEGRAM_BOT_TOKEN=your_token_from_botfather
# 6. Install Ollama (local LLM - free & private)
curl -fsSL https://ollama.com/install.sh | sh
ollama pull llama3.1:8b # or llama3.2:3b for smaller systems
# 7. Start Open-Sable
python -m opensable
# Or: python main.py
Don't want to run Ollama locally? Use OpenAI or Anthropic:
# In .env file, add:
OPENAI_API_KEY=sk-...
# or
ANTHROPIC_API_KEY=sk-ant-...
# Then disable auto-select:
AUTO_SELECT_MODEL=false
# Quick start with Docker Compose
docker-compose up -d
# View logs
docker-compose logs -f opensable
# Stop
docker-compose down
# Apply all manifests
kubectl apply -f k8s/
# Check status
kubectl get pods -n opensable
# View logs
kubectl logs -f deployment/opensable -n opensable
Issue: ModuleNotFoundError: No module named 'opensable'
source venv/bin/activateIssue: error: externally-managed-environment
Issue: Ollama connection refused
ollama serve or check OLLAMA_BASE_URL in .envIssue: No response from bot
TELEGRAM_BOT_TOKEN is correct in .env, verify bot with @BotFather# Run all core tests (9/9 should pass)
python -m pytest tests/test_features.py -v
# Run full test suite
python -m pytest tests/ -v
# Run specific test
python -m pytest tests/test_features.py::test_skill_factory -v
Test Coverage (9/9 ✅):
| Test | What it validates |
|---|---|
test_file_structure | All 56 core + 13 interface modules exist |
test_skills_hub | Skills Hub loads 21+ skills, search works |
test_pdf_parser | PDF parsing with graceful fallback |
test_advanced_memory | 10 auto-categories, store & recall |
test_discord_bot | Discord bot module loads correctly |
test_telegram_progress | Telegram progress bar module |
test_whatsapp_bridge | WhatsApp bridge config exists |
test_onboarding | 8-step onboarding wizard |
test_skill_factory | SkillFactory blueprint → generate → validate |
# Agentic AI Capabilities
python3 examples/agi_capabilities_example.py
# Autonomous Demo
python3 examples/autonomous_demo.py
# Multimodal Voice
python3 examples/multimodal_voice_example.py
# RAG Pipeline
python3 examples/rag_examples.py
# Workflow Engine
python3 examples/workflow_examples.py
Current Version: 1.5.0
| Component | Files | Lines | Status |
|---|---|---|---|
| Core Modules | 65 | 50,000+ | ✅ Complete |
| Agentic AI Systems | 6 | 5,500+ | ✅ Complete |
| Deep Cognition (v1.2) | 6 | 3,100+ | ✅ Complete |
| Autonomous Agency (v1.3) | 3 | 1,400+ | ✅ Complete |
| Hyperautonomous (v1.4) | 10 | 2,900+ | ✅ Complete |
| World-First Modules (v1.5) | 20 | 4,200+ | ✅ Complete |
| Phase 3 Engines | 5 | 3,000+ | ✅ Complete |
| Voice & Multimodal | 4 | 3,000+ | 🧪 Experimental |
| Interfaces | 13 | 7,000+ | ✅ Complete |
| Skills (4 categories) | 25 | 4,500+ | ✅ Complete |
| Examples | 16 | 3,000+ | ✅ Complete |
| Tests | 18 | 5,000+ | ✅ 518 Passing |
| Documentation | 10 | 2,000+ | ✅ Complete |
| Kubernetes | 7 | 500+ | 📝 Templates |
| Total | 224 | 97,000+ | ✅ Core Complete |
Agentic AI Core (6):
goal_system · advanced_memory · meta_learning · tool_synthesis · world_model · metacognition
Deep Cognition (6):
cognitive_memory · self_reflection · skill_evolution · git_brain · inner_life · pattern_learner
Autonomous Agency (3):
proactive_reasoning · react_executor · github_skill
Deep Autonomy (4):
deep_planner · inter_agent_bridge · ultra_ltm · self_benchmark
Hyperautonomous (10):
meta_learner · causal_engine · goal_synthesis · skill_composer · world_predictor · cognitive_optimizer · adversarial_tester · resource_governor · theory_of_mind · ethical_reasoner
World-First Modules (20):
dream_engine · cognitive_immunity · temporal_consciousness · cognitive_fusion · memory_palace · narrative_identity · curiosity_drive · collective_unconscious · cognitive_metabolism · synthetic_intuition · phantom_limb · cognitive_scar · time_crystal · holographic_context · swarm_cortex · cognitive_archaeology · emotional_contagion · predictive_empathy · autonomous_researcher · empathy_synthesizer
Neural Architecture (1):
connectome
Phase 3 Engines (5):
skill_factory · rag · workflow · self_modify · image_gen
Agent Infrastructure (8):
agent · config · llm · commands · sessions · session_manager · context_manager · plugins
Skills & Marketplace (4):
skills_hub · skills_marketplace · skill_creator · skill_factory
Enterprise & Security (5):
enterprise · security · rate_limiter · sandbox_runner · gateway
Observability (4):
monitoring · observability · analytics · heartbeat
Voice & Multimodal (4):
voice_interface · voice · voice_handler · multimodal_agi
Communication (3):
multi_messenger · multi_device_sync · mobile_relay
AI & Autonomy (5):
advanced_ai · agi_integration · autonomous_mode · multi_agent · computer_tools
Data & Storage (5):
memory · cache · task_queue · workflow_persistence · pdf_parser
Utilities (7):
onboarding · nodes · interface_sdk · image_analyzer · system_detector · webhooks · tools
telegram_bot · telegram_userbot · telegram_progress · discord_bot · whatsapp_bot · slack_bot · matrix_bot · irc_bot · email_bot · cli_interface · mobile_api · voice_call
graph TB
subgraph "Frontend Layer"
WEB[Web Dashboard, FastAPI + WebSocket]
VOICE[Voice Interface, Whisper + Piper]
CHAT[Chat Platforms, 13 Interfaces]
end
subgraph "Agent Core"
LANG[LangGraph, Multi-step Reasoning]
SESSION[Session Manager, Persistent State]
CMD[Command Handler]
end
subgraph "Agentic AI Layer"
GOALS[Goal System]
MEM[Advanced Memory]
META[Meta-Learning]
TOOLS[Tool Synthesis]
WORLD[World Model]
METACOG[Metacognition]
end
subgraph "Phase 3"
SFACT[SkillFactory]
RAG[RAG Engine]
WF[Workflow Engine]
SELFMOD[Self-Modifier]
end
subgraph "Hyperautonomous v1.4"
MLR[Meta-Learner]
CE[Causal Engine]
GS[Goal Synthesis]
SC[Skill Composer]
WP[World Predictor]
CO[Cognitive Optimizer]
AT[Adversarial Tester]
RG[Resource Governor]
TM[Theory of Mind]
ER[Ethical Reasoner]
end
subgraph "AI/ML"
LLM[Ollama, Llama 3.1 Local]
VISION[Vision Models, BLIP, YOLO, ViLT]
AUDIO[Audio Models, Whisper, Piper]
end
subgraph "Storage"
VECTOR[ChromaDB, Vector Store]
JSON[JSON, Structured Data]
FILES[File System, Skills & Models]
end
subgraph "Infrastructure"
DOCKER[Docker, Containerization]
K8S[Kubernetes, Orchestration]
MONITOR[Prometheus, Monitoring]
end
WEB --> LANG
VOICE --> LANG
CHAT --> LANG
LANG --> GOALS
LANG --> MEM
LANG --> META
LANG --> SFACT
LANG --> RAG
GOALS --> LLM
MEM --> VECTOR
RAG --> VECTOR
META --> JSON
TOOLS --> LLM
WORLD --> JSON
METACOG --> JSON
SFACT --> LLM
VISION --> FILES
AUDIO --> FILES
LANG --> MLR
LANG --> CE
LANG --> GS
LANG --> SC
LANG --> WP
LANG --> CO
LANG --> AT
LANG --> RG
LANG --> TM
LANG --> ER
MLR --> JSON
CE --> LLM
GS --> LLM
SC --> LLM
WP --> LLM
AT --> LLM
TM --> JSON
ER --> JSON
LANG --> DOCKER
DOCKER --> K8S
K8S --> MONITOR
Core Technologies:
# Core
TELEGRAM_BOT_TOKEN=your_token
LLM_ENDPOINT=http://localhost:11434
LOG_LEVEL=INFO
# Agentic AI Configuration
AGI_STORAGE_DIR=./data/agi
AGI_MEMORY_CONSOLIDATION_INTERVAL=1 # hours
AGI_META_LEARNING_INTERVAL=24 # hours
AGI_MAX_EPISODIC_MEMORIES=10000
AGI_MAX_SEMANTIC_MEMORIES=50000
AGI_WORKING_MEMORY_CAPACITY=7
AGI_TOOL_SYNTHESIS_ENABLED=true
AGI_TOOL_SAFETY_STRICT=true
# Voice Configuration
VOICE_STT_MODEL=base # tiny, base, small, medium, large
VOICE_TTS_VOICE=en_US-lessac-medium
VOICE_DEVICE=cpu # cpu or cuda
# Multimodal Configuration
VISION_DEVICE=cpu
VISION_CACHE_DIR=./models/vision
AUDIO_CACHE_DIR=./models/audio
# Sync Configuration
SYNC_SERVER_URL=ws://localhost:8080
SYNC_ENABLE_ENCRYPTION=false
SYNC_CONFLICT_STRATEGY=latest_wins
# Skills
SKILLS_DIR=./skills
SKILL_FACTORY_ENABLED=true
# RAG
RAG_COLLECTION=sablecore_docs
RAG_CHUNK_SIZE=500
RAG_CHUNK_OVERLAP=50
# Enterprise
ENTERPRISE_MULTI_TENANT=false
ENTERPRISE_SSO_ENABLED=false
from opensable.core.agi_integration import AGIAgent
agent = AGIAgent(
llm_function=your_llm,
action_executor=your_executor,
storage_dir=Path("./data/agi")
)
# Set goal
result = await agent.set_goal(
description="Task description",
success_criteria=["criterion1", "criterion2"],
priority=GoalPriority.HIGH,
auto_execute=True
)
# Create tool
tool_id = await agent.create_tool_for_task(
task_description="What the tool does",
expected_inputs=[...],
expected_outputs=[...]
)
# Predict future
prediction = await agent.predict_and_plan(
scenario="Scenario description",
time_horizon=60 # minutes
)
# Self-improve
improvement = await agent.self_improve()
# Get status
status = agent.get_status()
# Autonomous operation
await agent.start_autonomous_operation(
improvement_interval_hours=24
)
from opensable.core.voice_interface import VoiceInterface, WhisperModel, TTSVoice
voice = VoiceInterface(
whisper_model=WhisperModel.BASE,
tts_voice=TTSVoice.EN_US_FEMALE,
language="en",
device="cpu"
)
# Transcribe audio
transcription = await voice.stt.transcribe_file("audio.wav")
# Synthesize speech
synthesis = await voice.tts.synthesize(
text="Hello, how can I help?",
output_path="output.wav"
)
# Voice command (end-to-end)
result = await voice.voice_command(
audio_input="audio.wav",
respond_with_voice=True,
command_handler=your_handler
)
# Conversation mode
await voice.start_conversation_mode(callback=your_callback)
from opensable.core.rag import RAGEngine
rag = RAGEngine(collection_name="my_docs")
# Ingest document
doc = await rag.ingest("report.pdf")
# Ingest file
doc = await rag.ingest_file("data.txt", metadata={"source": "manual"})
# Semantic search
results = await rag.search("revenue trends", top_k=5)
for r in results:
print(f"[{r.score:.2f}] {r.text[:100]}...")
# Full RAG query
answer = await rag.query("Summarize Q3 results", llm_function=your_llm)
from opensable.core.workflow import WorkflowEngine, WorkflowStep
engine = WorkflowEngine()
# From template
workflow = engine.from_template("etl", params={
"source": "api://data",
"destination": "db://warehouse"
})
# Custom workflow
workflow = engine.create_workflow("my_flow", steps=[
WorkflowStep(name="fetch", action=fetch_fn),
WorkflowStep(name="process", action=process_fn, retries=3),
WorkflowStep(name="store", action=store_fn, condition=lambda ctx: ctx["valid"]),
])
# Execute
result = await engine.run(workflow)
from opensable.core.skill_factory import SkillFactory
factory = SkillFactory(llm_function=your_llm)
# Create skill from natural language
skill = await factory.create_skill(
name="price_checker",
description="Check product prices from Amazon",
template="api_fetcher"
)
# List available templates
templates = factory.list_templates()
# ['api_fetcher', 'data_processor', 'file_handler', 'automation']
from opensable.core.self_modify import SelfModifier
modifier = SelfModifier(allowed_paths=["opensable/skills/"])
# Modify code
result = modifier.modify(
file_path="opensable/skills/my_skill.py",
old_code="return data",
new_code="return data.strip()",
reason="Fix whitespace issue"
)
# Rollback
modifier.rollback(result.modification_id)
# Audit trail
history = modifier.get_history()
from opensable.core.multi_device_sync import MultiDeviceSync, SyncScope, SyncStrategy
sync = MultiDeviceSync(
device_name="Desktop",
conflict_strategy=SyncStrategy.LATEST_WINS,
enable_encryption=False
)
# Register & trust device
device_id = await sync.register_device("Mobile", "mobile")
await sync.trust_device(device_id)
# Sync item
await sync.sync_item(
scope=SyncScope.SETTINGS,
item_id="preferences",
data={'theme': 'dark'},
version=1
)
# Real-time sync
await sync.start_real_time_sync("ws://sync-server:8080")
The Skills Marketplace is a community-driven store where humans and agents can discover, install, review, and publish skills.
There are two independent ways to connect your agent to the marketplace:
| Method | Auth | Use Case |
|---|---|---|
Store API Key (sk_*) | Authorization: Bearer sk_... | Human-delegated access , agent acts on your behalf |
| Agent Gateway (SAGP/1.0) | Ed25519 + AES-256-GCM | Fully autonomous agent-to-agent access |
Most users only need the Store API Key method. The SAGP gateway is for advanced deployments where the agent operates fully autonomously with its own cryptographic identity.
sk_).env:SABLE_STORE_API_KEY=sk_14a3807e7...
The agent can now install skills, search the catalog, and post reviews using your store account:
from opensable.core.skills_marketplace import SkillRegistry, SkillManager, SkillCategory
registry = SkillRegistry()
manager = SkillManager(registry=registry)
# Search the marketplace
skills = await registry.search_skills(
query="email",
category=SkillCategory.COMMUNICATION,
tags=["automation"],
limit=20
)
# Install a skill (installs to opensable/skills/installed/)
installed = await manager.install_skill("email-assistant", version="1.0.0")
# Update all installed skills
updated = await manager.update_all_skills()
You can also use the API key directly with curl or any HTTP client:
# Search skills
curl -H "Authorization: Bearer sk_YOUR_KEY" https://sk.opensable.com/api/skills?q=weather
# Install a skill
curl -X POST -H "Authorization: Bearer sk_YOUR_KEY" https://sk.opensable.com/api/install/weather-checker
# Get your profile
curl -H "Authorization: Bearer sk_YOUR_KEY" https://sk.opensable.com/api/auth/profile
The X-API-Key header is also supported:
curl -H "X-API-Key: sk_YOUR_KEY" https://sk.opensable.com/api/skills
For fully autonomous agent operations with cryptographic identity. The agent proves who it is with Ed25519 signatures and all traffic is encrypted with AES-256-GCM.
node marketplace/server/scripts/provision-agent.js --name "My Agent"
This prints three values. Add them to .env:
SABLE_AGENT_ID=<hex agent id>
SABLE_AGENT_SIGNING_KEY=<base64 Ed25519 secret key>
SABLE_AGENT_ENCRYPTION_KEY=<base64 X25519 secret key>
The SAGP gateway provides:
| Layer | Protection |
|---|---|
| 1. Ed25519 | Unforgeable cryptographic identity |
| 2. HMAC-SHA512 | Payload integrity verification |
| 3. Speed Gate | 150ms challenge-response (anti-replay) |
| 4. Agent DNA | Runtime fingerprint (anti-tampering) |
| 5. AES-256-GCM | End-to-end payload encryption |
| 6. Circuit Breaker | Auto-lockout after repeated failures |
| 7. Anomaly Detection | Behavioral trust scoring |
# ── Skills Marketplace ──
SKILLS_REGISTRY_URL=https://sk.opensable.com # Marketplace server
SKILLS_API_URL=https://sk.opensable.com/api # REST API base URL
SKILLS_STORE_URL=https://skills.opensable.com # Web store frontend
# ── Store API Key (recommended , human-delegated access) ──
SABLE_STORE_API_KEY=sk_... # From your store profile
# ── Agent Gateway (advanced , autonomous SAGP access) ──
SABLE_GATEWAY_URL=https://sk.opensable.com/gateway # Gateway endpoint
SABLE_AGENT_ID= # Provisioned agent hex ID
SABLE_AGENT_SIGNING_KEY= # Base64 Ed25519 secret
SABLE_AGENT_ENCRYPTION_KEY= # Base64 X25519 secret
The Agentic AI system learns and improves over time:
graph LR
subgraph "Session 1 - Initial"
S1["Success: 60% | Strategies: 5 | Tools: 10"]
end
subgraph "After 1 Week"
W1["Success: 75% | Strategies: 18 | Tools: 25"]
end
subgraph "After 1 Month"
M1["Success: 88% | Strategies: 32 | Tools: 45 | Mastered: 12 tasks"]
end
S1 --> W1
W1 --> M1
Metrics:
Open-Sable supports 12 cloud LLM providers out of the box. If Ollama is not available (or you prefer cloud models), the agent automatically falls back through configured providers until one succeeds.
| Provider | Env Variable | Default Model | Protocol |
|---|---|---|---|
| OpenAI | OPENAI_API_KEY | gpt-4o-mini | OpenAI SDK |
| Anthropic | ANTHROPIC_API_KEY | claude-sonnet-4-20250514 | Native SDK |
| Gemini (Google) | GEMINI_API_KEY | gemini-2.5-flash | Native SDK (google-genai) |
| OpenRouter | OPENROUTER_API_KEY | openai/gpt-4o-mini | OpenAI-compatible |
| DeepSeek | DEEPSEEK_API_KEY | deepseek-chat | OpenAI-compatible |
| Groq | GROQ_API_KEY | llama-3.3-70b-versatile | OpenAI-compatible |
| Together AI | TOGETHER_API_KEY | meta-llama/Llama-3.3-70B-Instruct-Turbo | OpenAI-compatible |
| xAI (Grok) | XAI_API_KEY | grok-3-mini | OpenAI-compatible |
| Mistral | MISTRAL_API_KEY | mistral-small-latest | OpenAI-compatible |
| Cohere | COHERE_API_KEY | command-r-plus | Native SDK |
| Kimi (Moonshot) | KIMI_API_KEY | moonshot-v1-8k | OpenAI-compatible |
| Qwen (DashScope) | QWEN_API_KEY | qwen-turbo | OpenAI-compatible |
OLLAMA_BASE_URL first.DEFAULT_MODEL in .env to use a specific model name instead of the provider's default.# Example: use Gemini
GEMINI_API_KEY=AIzaSy...
# Example: use OpenRouter with a custom model
OPENROUTER_API_KEY=sk-or-v1-...
DEFAULT_MODEL=anthropic/claude-sonnet-4-20250514
# Example: use Groq for fast inference
GROQ_API_KEY=gsk_...
OpenWebUI is a self-hosted web interface for Ollama and other local models. Open-Sable can use any OpenWebUI instance as its LLM backend via its built-in OpenAI-compatible /chat/completions endpoint.
Configuration, add these three variables to agents/<name>/profile.env:
# URL of your OpenWebUI instance (no trailing slash)
OPENWEBUI_API_URL=https://your-openwebui-instance.com
# API key (leave blank if your instance has no authentication)
OPENWEBUI_API_KEY=
# Model name as it appears in your OpenWebUI instance
OPENWEBUI_MODEL=llama3.2:latest
When OPENWEBUI_API_URL is set, the agent routes all LLM requests to {OPENWEBUI_API_URL}/api/chat/completions using the standard OpenAI message format. Vision/multimodal requests (when tool results include image_base64 payloads) are automatically forwarded as image_url content blocks, so any multimodal model hosted on OpenWebUI receives images natively.
graph TB
subgraph "Document Creation"
DOCX["Word .docx"]
XLSX["Excel .xlsx"]
PDF["PDF"]
PPTX["PowerPoint .pptx"]
READ["Document Reader"]
end
subgraph "Communication"
EMAIL["Email SMTP/IMAP"]
CAL["Google Calendar"]
CLIP["Clipboard"]
end
subgraph "Vision and OCR"
EOCR["EasyOCR"]
TESS["Tesseract"]
FITZ["PyMuPDF"]
end
subgraph "Reliability Engine"
HEAL["Self-Healing"]
RATE["Rate Limiter"]
SEQ["Sequential Executor"]
HTTP["HTTP Client"]
BROWSER["Session Manager"]
end
AGENT((Agent)) --> DOCX
AGENT --> XLSX
AGENT --> PDF
AGENT --> PPTX
AGENT --> EMAIL
AGENT --> CAL
AGENT --> CLIP
AGENT --> EOCR
AGENT --> TESS
AGENT --> FITZ
HEAL --> RATE --> SEQ --> HTTP
Full office document creation using pure Python libraries, no LibreOffice or OpenOffice required. Works identically on Windows, macOS, and Linux.
python-docx)openpyxl)reportlab)python-pptx)Send and receive real emails, fully wired to the LLM via tool schemas.
.env: SMTP_HOST, SMTP_USER, SMTP_PASSWORD, IMAP_HOSTCalendar tools support both local JSON storage and Google Calendar API.
Read from and write to the system clipboard on any OS.
pyperclip (preferred), native commands (pbcopy/pbpaste, xclip/xsel, wl-copy, clip.exe)Extract text from images and scanned PDFs using multiple OCR engines.
.png, .jpg, .tiff, .bmp, .webp, .pdfThe agent monitors its own API interactions and takes corrective action automatically, no human intervention required.
All outbound social-media API calls are routed through a centralized FIFO queue with self-tuning rate limits.
The WhatsApp bridge (wwebjs/Puppeteer) intelligently manages its browser lifecycle:
SingletonLock files that block browser launchThe networking layer supports curl_cffi as a transport backend, providing broader compatibility with platforms that enforce strict client-validation policies. When available, it is used automatically; otherwise the system falls back to httpx.
The tool execution pipeline enforces strict sequential ordering for all platform-facing operations. Even when the LLM requests multiple tools simultaneously, platform-related tools are serialized to ensure only one API call is in-flight at any time.
Open-Sable is built in the open. Contributions welcome!
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)See CONTRIBUTING.md for details.
As of today, Open-Sable is NOT associated with any cryptocurrency, token, memecoin, or blockchain project.
This notice is informational only and does not constitute financial advice. Always DYOR.
If you encounter a scam using our name, please report it here.
MIT License, Use it, fork it, make it yours.
See LICENSE for full details.
Built with ❤️ as the agent framework that actually works. Autonomous, intelligent, secure and truly useful.
GitHub checked 39h ago - refresh overdue. Recently viewed repositories target hourly refresh.