Skip to content

Latest commit

ย 

History

20 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿง  Eling Agent

Personal auto-learning agent CLI โ€” memory, skills, MCP tools, workspace, and terminal UI

Python 3.10+ License MIT GitHub Version

"Eling" (Javanese): to remember, to be conscious, to be aware


โœจ What is Eling Agent?

Eling Agent is a lightweight, personal auto-learning agent that runs in your terminal. It combines:

  • ๐Ÿง  Local memory โ€” stores past exchanges, learns from experience
  • ๐Ÿ“š Skill library โ€” auto-discovers reusable patterns from your conversations
  • ๐Ÿ“ฆ Workspace Manager โ€” copy-on-write file editing with automatic project root detection
  • โฑ Live elapsed timer โ€” real-time thinking spinner with elapsed time counter
  • ๐Ÿ”ง MCP tools โ€” connect any MCP server (web search, filesystem, firecrawl, etc.)
  • ๐ŸŽจ Rich TUI โ€” beautiful terminal UI with banner, thinking spinner, session uptime, 10 color themes
  • ๐Ÿงฉ Plugin system โ€” extend with Python plugins (shell, files, web)
  • โฑ Session persistence โ€” tracks uptime, plan steps, tool timings
  • ๐Ÿ” Verbose tool output โ€” full code/result visibility in TUI, toggleable via config
  • ๐Ÿงช Auto-pytest โ€” automatically runs pytest on touched test files after each tool round
  • ๐Ÿ›ก๏ธ Graceful error handling โ€” retry on timeouts/connection errors, auto-fix lint, wall-clock timeout

It uses the OpenCode Zen API for LLM inference โ€” a free, fast API compatible with OpenAI's chat completions format.


๐Ÿš€ Quick Start

Install

# Clone the repo
git clone https://github.com/PatrickNoFilter/eling-agent.git
cd eling-agent

# Install deps
pip install -r requirements.txt

# Configure your Zen API key
cp config.example.json config.json
# Edit config.json with your key from https://opencode.ai/zen

Run

# Interactive REPL mode
python3 agent.py

# One-shot mode
python3 agent.py "What files are in this directory?"

# Compact mode (no banner, minimal output)
python3 agent.py --compact

Setup

Get a free API key at opencode.ai/zen and set it in config.json:

Or run the interactive setup wizard:

python3 agent.py --setup

This lets you configure the provider, API key, model, agent mode, and color theme (10 palettes to choose from).

{
  "zen_api_key": "sk-zen-your-key-here",
  "zen_model": "deepseek-v4-flash-free"
}

๐ŸŽฎ Commands

Command Description
python3 agent.py Launch interactive REPL with TUI
python3 agent.py "query" One-shot mode
python3 agent.py --compact Compact mode (minimal output)
python3 agent.py --setup Interactive setup wizard (provider, theme)
exit / quit Exit the REPL

๐Ÿ”Œ MCP Servers

Eling Agent supports any MCP server. Configure them in config.json:

{
  "mcp_servers": {
    "firecrawl": {
      "command": "npx",
      "args": ["-y", "firecrawl-mcp"]
    },
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/dir"]
    }
  }
}

MCP tools are automatically loaded and presented to the model. Use mcp__ prefixed tool names in responses.


๐Ÿงฉ Plugins

Built-in plugins:

  • shell โ€” run shell commands, list directories
  • files โ€” (planned) file read/write operations

Drop a .py file with a TOOLS dict into plugins/ to add your own.


๐Ÿง  Memory & Skills

Eling Agent learns from every exchange:

  • Memory โ€” past Q&A pairs are stored and retrieved by relevance (BM25 + cosine similarity)
  • Skills โ€” after each response, the model decides if a reusable skill should be saved
  • Persistence โ€” database files in agent_memory.db and agent_skills.db

๐Ÿ“ฆ Project Structure

eling-agent/
โ”œโ”€โ”€ agent.py              # Main entry point โ€” REPL loop, tool orchestration
โ”œโ”€โ”€ tui.py                # Terminal UI โ€” banner, spinner, plan panel, markdown, themes
โ”œโ”€โ”€ provider.py           # ZenProvider โ€” OpenAI-compatible API client
โ”œโ”€โ”€ mcp_client.py         # MCP client โ€” stdio-based server manager (env support)
โ”œโ”€โ”€ memory.py             # MemoryStore โ€” BM25 + cosine similarity retrieval, dedup
โ”œโ”€โ”€ skills.py             # SkillLibrary โ€” auto-learned skill storage
โ”œโ”€โ”€ textsim.py            # Text utilities โ€” tokenizer, similarity
โ”œโ”€โ”€ workspace_manager.py  # Copy-on-write file editing with project detection
โ”œโ”€โ”€ src/eling/cli.py      # Interactive setup wizard (provider, theme)
โ”œโ”€โ”€ plugins/
โ”‚   โ”œโ”€โ”€ __init__.py       # Plugin loader
โ”‚   โ””โ”€โ”€ shell_plugin.py   # Shell command execution
โ”œโ”€โ”€ config.example.json   # Template configuration
โ”œโ”€โ”€ requirements.txt      # Python dependencies
โ”œโ”€โ”€ pyproject.toml        # Package metadata (elin 0.2.0)
โ”œโ”€โ”€ CREDITS.md            # Credits and acknowledgements
โ”œโ”€โ”€ CREDITS.library.md    # Library-level credits
โ””โ”€โ”€ LICENSE               # MIT license

โš™๏ธ Configuration

Key Default Description
zen_api_key โ€” Your OpenCode Zen API key
zen_base_url https://opencode.ai/zen/v1 API endpoint
zen_model deepseek-v4-flash-free Model to use
max_tool_rounds 6 Max tool call iterations per turn
max_turn_duration 300 Wall-clock timeout per turn (seconds)
verbose_tool_output true Show full tool args/results in TUI
memory_db agent_memory.db Memory database path
skills_db agent_skills.db Skills database path
mcp_servers {} MCP server configurations
theme "cobalt" Color theme for TUI (blue, pink, green, yellow, red, white, ocean, twilight, pastel, cobalt)

๐Ÿ“š Dependencies

Core

Package Version Purpose
eling โ‰ฅ0.12.0 8-layer second-brain memory library (HRR, BM25, Zettelkasten)
httpx โ‰ฅ0.27 HTTP client for API calls and Notion layer
requests โ‰ฅ2.31 HTTP client for legacy API calls
prompt_toolkit โ‰ฅ3.0 Interactive REPL prompt
rich โ‰ฅ13.0 Terminal UI rendering (markdown, panels, tables)

Optional

Group Packages Purpose
notion httpx Notion integration layer
hrr numpyโ‰ฅ1.24 Holographic Reduced Representations
embeddings sentence-transformersโ‰ฅ3.0 Embedding-based retrieval
markdownify markitdown[pdf] Document-to-Markdown conversion
markdownify_all markitdown[all] All document formats
all everything above Full feature set

Install extras with:

pip install "eling-agent[hrr,embeddings,notion,markdownify]"

๐Ÿค Credits

Eling Agent was created by PatrickNoFilter (@PatrickNoFilter).

Built With

Project Contribution
OpenCode Zen Free LLM inference API
Zero / OpenCode CLI CLI agent patterns, telemetry format
Rich Terminal rendering engine
Eling memory library 8-layer second brain (HRR, BM25, Zettelkasten)
Agent-Blackbox (Nous Research) Flight recorder, 11-metric context scoring
Continuum Multi-agent orchestration, PLOT protocol
Firecrawl MCP Web scraping and search
Markdownify MCP (Zach Caceres) Document conversion
Claude Code / Codex Tool-calling loop patterns
dusterbloom HRR phase-encoding implementation

See CREDITS.md and CREDITS.library.md for full attribution.


๐Ÿ“„ License

MIT ยฉ 2026 PatrickNoFilter

About

Eling AI Agent - Python Version. Auto-learning CLI agent with MCP, TUI, OCR code review, and multi-provider LLM support.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages