Skip to content

mf2023/Encre

Encre

English | 简体中文

Documentation | Changelog | Security | Contributing | Code of Conduct

GitHub Gitee X BiliBili Hugging Face ModelScope License

Encre — A powerful AI Agent platform that supports 31 mainstream LLM providers, 36 built-in tools, and 18 chat platform integrations. Whether it's coding, desktop automation, cross-platform messaging, or multi-agent collaboration, Encre gets the job done.

🤖 What is Encre Agent?

One-Liner

Encre is an AI Agent platform — tell it what you want to do, and it will automatically analyze, use tools, execute tasks, and deliver results to you.

Core Capabilities

Capability Description
🧠 31 AI Models Supports OpenAI, Anthropic Claude, Google Gemini, DeepSeek, Qwen, GLM, local models, and more — switch freely
🛠️ 36 Built-in Tools File operations, shell execution, browser automation, code editing, web search, databases, scheduling — ready to use
💬 18 Chat Platforms Integrate with Telegram, Discord, Slack, Feishu, DingTalk, WeChat, WhatsApp, email — chat with Agent wherever you are
🖥️ Desktop Automation Control desktop apps, operate browsers, read screenshots — simulates human operations
🤝 Multi-Agent Collaboration Multiple Agents work simultaneously, dividing tasks and cooperating on complex projects
💾 Persistent Memory Agent remembers your preferences, habits, and project info — gets smarter with use
🛡️ Safety & Control 6 permission modes to precisely control what Agent can and cannot do

Use Cases

  • Code Development Assistant — Automatically reads code, fixes bugs, refactors, generates docs, runs tests
  • Desktop Automation — Batch file processing, auto-form filling, screenshot archiving
  • Cross-Platform Chat Bot — Connect AI to Telegram, Slack, Feishu, and other platforms
  • Research & Analysis — Web search, data organization, PDF/Excel analysis
  • Long-term Task Scheduling — Scheduled jobs, system monitoring, periodic reports
  • Multi-Agent Collaboration — Deploy different Agents as programmer, researcher, reviewer to work together

⭐ Key Features

🧠 31 AI Backends, Choose Freely

Supports 31 mainstream AI models including OpenAI, Anthropic Claude, Google Gemini, DeepSeek, Alibaba Qwen, Tencent Hunyuan, Xiaomi MiMo, Moonshot Kimi, Zhipu GLM, MiniMax, and more.

  • Global Leaders: OpenAI, Anthropic, Google, Groq, AWS Bedrock, GitHub Copilot
  • Chinese Providers: Alibaba Qwen, Tencent, Xiaomi MiMo, Moonshot, Zhipu, MiniMax
  • Self-hosted: Ollama, LM Studio, HuggingFace Transformers
  • Aggregation Services: OpenRouter, AI Gateway, Kilocode, OpenCode
  • Advanced Features: Automatic failover, cost-based routing, transparent retry

🤖 9 Built-in Agent Roles

Encre comes with specialized roles, each with dedicated prompts and capabilities:

  • General Mode: coder, researcher, critic
  • Workspace Mode: architect, planner
  • Plan/Spec Mode: spec-writer
  • Automation Mode: monitor, executor, scheduler

🛠️ 36 Ready-to-use Tools

Category Tools
Files Read, write, edit, patch, search, PDF/Excel processing
Terminal Shell commands, background tasks, Docker, deployment
Web Page fetching, web search (MCP-powered), browser automation (Playwright)
Dev Aid LSP diagnostics, IPython notebook, database queries
Tasks Create/get/list/update/stop tasks with bash/agent/workflow executors
Schedule & Memory Cron jobs, todo list, memory management
Desktop Desktop control (pyautogui), image recognition (OCR), browser automation
Integration Git, REST API, MCP external protocols

💬 18 Chat Platform Integrations

Connect Encre Agent to your favorite messaging platforms:

International: Discord, Slack, Telegram, WhatsApp, Signal, Matrix, Microsoft 365, Home Assistant

China: Feishu (Lark), DingTalk, WeCom, WeChat, Tencent Yuanbao, QQ Bot, iMessage

Universal: Email (IMAP+SMTP), Webhook

Each platform has a dedicated adapter that normalizes messages before sending them to the Agent.

🛡️ 6-Level Safety Control

Mode Description
bypass No checks (fully open)
dont_ask Auto-allow (no confirmation needed)
accept_edits Auto-allow file edits
plan Plan before executing
auto AI smart judgment
default Recommended — asks you every time

Additional protections:

  • SSRF Guard: DNS resolution + CIDR blocklist
  • Sandbox Isolation: Docker container sandbox + Linux Landlock kernel-level restrictions
  • AI Safety Classifier: Agent autonomously assesses operation risk level
  • Rate Limiting: Prevents runaway API calls

💾 Persistent Agent Memory

Encre Agent has its own memory system — it gets to know you better over time:

  • Memories stored as Markdown files with metadata (creation time, update time, importance)
  • Smart Aging: Outdated memories automatically lose weight, important info retained long-term
  • Semantic Search: Quickly find relevant memories through semantic understanding
  • Working + Long-term Memory: Short-term task memory and long-term project memory layered management

🎯 11 Professional Skills

Agent has 11 callable skills:

debug, loop, batch, verify, stuck-recovery, code-review, refactor, gen-test, web-research, data-viz, write-docs

Priority Override: Admin > User-defined > Project-level > Bundled — meets your personalization needs.

🤝 Multi-Agent Collaboration

  • Swarm System: Multiple Agents work concurrently without interference
  • Shared Blackboard: All Agents share state with full transparency
  • Consensus Protocol: Multiple Agents vote on proposals to select the best solution
  • Task Planner: Automatically decomposes complex tasks into sub-task trees
  • 9 Built-in Roles: Each role has dedicated prompts and capabilities

🧱 Rust Native Core

Performance-critical modules written in Rust for blazing speed and memory safety:

  • Blazing fast file I/O with offset/limit support
  • Regex search & Glob for quick content finding
  • SIMD-accelerated text matching (hardware-level)
  • Unified Diff for precise code difference calculation
  • Sandboxed shell execution in secure environments
  • Kernel-level filesystem restrictions via Linux Landlock
  • Smart Token counting (English/Chinese/numbers/code)
  • Semantic similarity for text comparison
  • BM25 code search engine
  • LSP protocol parsing (JSON-RPC 2.0)

🖥️ Encre Desktop App

A full-featured AI chat desktop application built with Electron + React 19:

  • Chat Interface: Markdown rendering, syntax highlighting, file attachments
  • Multi-session: Concurrent chats with branching and fuzzy search
  • Settings Panel: Model config, gateway, agent, MCP servers, skills, rules, memory, code index
  • iClaw Mode: Automation runner with batch operations
  • Embedded Terminal: xterm.js + node-pty with working directory browser
  • Code Editor: Monaco Editor with 16+ language support (TypeScript, JavaScript, Python, Rust, Go, Java, C/C++, PHP, Ruby, Swift, Kotlin, SQL, etc.)
  • Bilingual: English and Chinese localization with runtime switching
  • Git Integration: Status and diff with caching
  • System Tray: Notifications + voice input support
  • Encrypted Storage: AES-256-GCM encrypted browser cookies
  • Cross-platform: Windows (NSIS), macOS (.pkg), Linux (.deb/.rpm)

⚙️ Developer Toolchain

  • Context Compaction: 9 strategies to intelligently manage conversation context
  • LSP Client: 16+ language servers auto-discovered for real-time code diagnostics
  • Codebase Indexer: BM25 search + dependency graph for project-wide understanding
  • Evolution System: Meta-cognition, reflex loop, strategy optimizer
  • Feedback Learner: Jaccard similarity-based error correction
  • Interactive Notebook: IPython kernel for live code execution
  • Plugin System: Extensible architecture with plugin registry
  • User Profile: Persona inference and soul system
  • Spec Engine: Structured specification document management
  • WebSocket Server: Real-time communication + admin HTTP API

🚀 Quick Start

Get Started in 3 Steps

Step 1: Clone the repository

git clone https://github.com/mf2023/Encre.git
cd encre

Step 2: Build everything

python build.py

This builds the Rust extension, installs the Python package, and bundles the desktop app — all in one command.

Step 3: Launch

# Desktop app
cd desktop && npm start

# Or use the CLI (iClaw automation mode)
python -m encre.iclaw --help

Basic Usage

Start chatting with your Agent through the desktop app, or connect it to your preferred chat platform. Configure your AI model provider, set the permission mode, and you're ready to go.

Configuration

Edit config.yaml to customize:

backend: "openai"
model: "gpt-4o"
api_key: "${OPENAI_API_KEY}"

safety:
  tool_permission_mode: "default"   # Recommended: ask before each action

memory:
  enabled: true

tools:
  enabled:
    - file_read
    - file_write
    - bash
    - web_fetch

Configuration sources (lowest to highest priority):

  1. Built-in defaults
  2. Configuration files (YAML, TOML)
  3. Environment variables (prefixed with ENCRE_)
  4. Runtime parameters

❓ Frequently Asked Questions

Q: Which AI models does Encre support?

A: 31 providers including OpenAI, Anthropic Claude, Google Gemini, DeepSeek, Alibaba Qwen, Tencent, Xiaomi, Moonshot Kimi, Zhipu GLM, MiniMax, Ollama, LM Studio, AWS Bedrock, and more. See the full list in the backends directory.

Q: What can Encre Agent do?

A: Everything a skilled assistant can do — read/write/edit code, run shell commands, browse the web, automate your desktop, manage files, schedule tasks, collaborate with other Agents, and much more. It has 36 built-in tools to handle almost any task.

Q: Can I use Encre with my favorite chat platform?

A: Yes! Encre supports 18 chat platforms including Telegram, Discord, Slack, Feishu, DingTalk, WeCom, WeChat, WhatsApp, Email, and more. Each platform has a dedicated adapter.

Q: Is Encre safe to use?

A: Safety is a top priority. Encre offers 6 permission modes ranging from fully open to asking for confirmation on every action. Additional protections include SSRF guards, Docker sandboxing, Landlock kernel restrictions, and AI-powered risk classification.

Q: Does Encre remember things between sessions?

A: Yes. Encre has a persistent memory system that stores important information, learns your preferences, and maintains context across conversations. Over time, it gets smarter and more personalized.

Q: Can multiple Agents work together?

A: Absolutely. Encre supports multi-agent collaboration through its Swarm system. You can spawn multiple Agents with different roles (coder, researcher, critic, etc.) that share information and cooperate on complex tasks.

Q: Is there a desktop app?

A: Yes! Encre Desktop is a full-featured Electron + React application with chat interface, code editor (Monaco), embedded terminal, file browser, settings panel, and more. Available for Windows, macOS, and Linux.

Q: Can I use my own AI models?

A: Yes. You can use any OpenAI-compatible API, self-host models via Ollama/LM Studio, or integrate custom backends. Encre is designed to be backend-agnostic.

🌏 Community & License

📄 License & Open Source Agreements

Project License

Apache License 2.0

This project uses Apache License 2.0. See LICENSE for the full text.

Dependency Licenses

The dependency license list below reflects the packages used by the Python framework, the Rust core, and the Electron desktop app. Versions and exact license texts are not pinned here; consult each upstream project for the authoritative license.

Package License Package License
httpx BSD-3-Clause pydantic MIT
beautifulsoup4 MIT markdownify MIT
lxml BSD-3-Clause tomli MIT
tomli-w MIT pyyaml MIT
cryptography Apache-2.0 / BSD zero-api-key-web-search Apache-2.0
pathspec MPL-2.0 websockets BSD-3-Clause
Pillow Historical playwright Apache-2.0
tiktoken MIT numpy BSD-3-Clause
loguru MIT openai Apache-2.0
anthropic MIT google-generativeai Apache-2.0
ollama MIT groq MIT
aiohttp Apache-2.0 discord.py MIT
slack_bolt MIT slack_sdk MIT
python-telegram-bot GPL-3.0 dingtalk-stream MIT
aioimaplib BSD-3-Clause aiosmtplib MIT
torch BSD-3-Clause transformers Apache-2.0
boto3 Apache-2.0 pytest MIT
pytest-asyncio Apache-2.0 ruff MIT
mypy MIT pre-commit MIT
mss MIT openpyxl MIT
pdfplumber MIT pyautogui BSD-3-Clause
pypdf BSD-3-Clause PyPDF2 BSD-3-Clause
pytesseract Apache-2.0 uiautomation MIT
watchfiles MIT
serde MIT/Apache-2.0 serde_json MIT/Apache-2.0
regex MIT/Apache-2.0 walkdir MIT/Apache-2.0
similar MIT glob MIT/Apache-2.0
tempfile MIT/Apache-2.0 candle-core Apache-2.0
tokenizers Apache-2.0 wide MIT/Apache-2.0
pyo3 MIT/Apache-2.0
electron MIT electron-builder MIT
esbuild MIT typescript Apache-2.0
@xterm/xterm MIT @xterm/addon-fit MIT
@xterm/addon-webgl MIT node-pty MIT
markdown-it MIT highlight.js BSD-3-Clause
fuse.js Apache-2.0 monaco-editor MIT
react MIT react-dom MIT
simple-icons CC0-1.0

About

Encre — A Python agent framework, a Rust native core, and an Electron desktop app, all developed together in one repository. Backend-agnostic and multi-provider, with streaming tool calls, a permission/safety engine, persistent memory, multi-agent orchestration, a desktop UI, a CLI runner, a WebSocket server, and 18 platform adapters.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors