any-context-releases

๐Ÿง  AnyContext (actx)

Transform any file, drive, or folder into a living, real-time AI context.

AnyContext is the ultimate bridge between your local data and Artificial Intelligence. Developed with an absolute focus on privacy, modularity, and efficiency, AnyContext is a smart, autonomous Local AI Engine equipped with 3-Level Hierarchical Long-Term Memory, a High-Performance REST API Server, and a Model Context Protocol (MCP) Server.

Whether you are a developer seeking deep codebase insights, a business analyzing confidential reports, or an enterprise deploying a private RAG context layer in your VPC, AnyContext operates 100% on your infrastructure, ensuring your data never feeds third-party models without explicit permission.


๐Ÿš€ Key Features


๐Ÿ—๏ธ Project Architecture

src/any_context/
โ”œโ”€โ”€ cli/                      # Terminal User Interface & Command Handling
โ”‚   โ”œโ”€โ”€ banner.py             # Signature ASCII Art splash screen & branding
โ”‚   โ”œโ”€โ”€ chat_loop.py          # Interactive chat loop & slash command intercepter
โ”‚   โ”œโ”€โ”€ config_menu.py        # Interactive configuration menu & onboarding wizard
โ”‚   โ”œโ”€โ”€ updater.py            # Self-update manager & release checker
โ”‚   โ””โ”€โ”€ workspace_selector.py # Workspace selection & CLI argument parser
โ”œโ”€โ”€ config/                   # Persistent SQLite Configuration System
โ”‚   โ”œโ”€โ”€ app_settings.py       # Pydantic schemas & settings loader
โ”‚   โ””โ”€โ”€ db_store.py           # SQLite ConfigDBStore manager
โ”œโ”€โ”€ core/                     # LangGraph Orchestration Engine
โ”‚   โ”œโ”€โ”€ agent.py              # Agent graph definition & tool binding
โ”‚   โ””โ”€โ”€ utils.py              # API key resolvers & prompt finders
โ”œโ”€โ”€ ingestion/                # Incremental RAG Ingestion Pipeline
โ”‚   โ””โ”€โ”€ local_folder_ingestor.py # Recursive folder scanner & ChromaDB updater
โ”œโ”€โ”€ memory/                   # Standalone 3-Level Hierarchical Memory Engine
โ”‚   โ”œโ”€โ”€ models.py             # Memory schemas (SHORT_TERM, SESSION_SUMMARY, META_SUMMARY)
โ”‚   โ”œโ”€โ”€ store.py              # ChromaDB memory vector store wrapper
โ”‚   โ”œโ”€โ”€ compressor.py         # LLM-powered Level-1 & Level-3 summarization engine
โ”‚   โ””โ”€โ”€ manager.py            # Asynchronous memory background thread orchestrator
โ”œโ”€โ”€ server/                   # External Integration Layer (REST & MCP)
โ”‚   โ”œโ”€โ”€ api.py                # FastAPI REST API Server & Swagger endpoints
โ”‚   โ””โ”€โ”€ mcp.py                # Model Context Protocol (MCP) stdio JSON-RPC server
โ””โ”€โ”€ tools/                    # Agent Dynamic Tools
    โ””โ”€โ”€ search_tools.py       # ChromaDB vector retriever tool (search_db)

โšก Quick Start & Installation

Option 1: Automatic Terminal Installer Script (No Python Needed!)

  1. Download the installer script from the Latest Release:
    • Windows: install.ps1
    • Linux / Git Bash: install.sh
  2. Run the script in your terminal:
    • Windows (PowerShell):
      .\install.ps1
      
    • Linux / Git Bash (Terminal):
      chmod +x install.sh
      ./install.sh
      

      The installer configures your User PATH environment variable, enabling actx globally.


Option 2: Install as a Python Package

git clone https://github.com/Levix-Digital/any-context.git
cd any-context
pip install -e .

(Available command aliases: actx, anycontext, any-context, ac)


๐Ÿ’ป Operating Modes

AnyContext supports three distinct operating modes:

Mode 1: Interactive Terminal Chat (actx)

Launch the interactive agent directly in your console:

actx
# Specify a workspace directly:
actx -w "MyProject"
# View version:
actx -v

Mode 2: REST API Server (actx --serve)

Start the FastAPI REST Server to allow external web apps, VS Code extensions, or backend services to connect:

actx --serve --port 8000 --host 127.0.0.1
# or simply:
actx server

Access interactive OpenAPI / Swagger documentation at http://127.0.0.1:8000/docs.

Mode 3: Model Context Protocol (MCP) Server (actx --mcp)

Start AnyContext as a standard MCP server communicating over stdio JSON-RPC 2.0:

actx --mcp

Configuring Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "any-context": {
      "command": "actx",
      "args": ["--mcp"]
    }
  }
}

๐Ÿข Enterprise & VPC Deployment Guide (Private Cloud / On-Premise)

AnyContext is designed for effortless deployment inside an enterprise Virtual Private Cloud (VPC), AWS EC2, Google Cloud Compute Engine, Azure VM, or On-Premise Private Server.

1. Launching in In-VPC Listener Mode

To allow internal company applications (ERPs, CRMs, Intranets, Slack/Teams Bots, VS Code Extensions) to query AnyContext across your private network/VPN:

actx --serve --host 0.0.0.0 --port 8000

Note: Binding to --host 0.0.0.0 enables listening on all internal network interfaces within your VPC.

2. Linux Background Service (systemd)

To ensure AnyContext runs continuously as a background service on your VPC Linux instance and restarts automatically on server reboots:

Create /etc/systemd/system/anycontext.service:

[Unit]
Description=AnyContext Universal AI Server
After=network.target

[Service]
User=ubuntu
WorkingDirectory=/home/ubuntu
ExecStart=/home/ubuntu/.local/bin/actx --serve --host 0.0.0.0 --port 8000
Restart=always

[Install]
WantedBy=multi-user.target

Enable and start the service:

sudo systemctl daemon-reload
sudo systemctl enable anycontext
sudo systemctl start anycontext

3. Enterprise Department Routing (Multi-Workspace)

External enterprise applications specify the target department using the "workspace" JSON field in REST requests:

{
  "message": "What is the policy for business travel expense reimbursement?",
  "workspace": "HumanResources"
}

Supported department workspaces example: "HumanResources", "Finance", "Legal", "Engineering".

4. 100% Private In-VPC Data & LLM Pipeline

For strict SOC2 / LGPD compliance where zero data may leave the enterprise network:


๐ŸŒ REST API Endpoints Specification

Method Endpoint Description
GET /v1/health Health check, version, and server security status.
GET /v1/auth/status Check if Admin account is configured & security mode status.
POST /v1/auth/setup-admin Initial Administrator setup wizard (first-time deployment).
POST /v1/auth/login Authenticate user credentials and retrieve Bearer Access Token.
GET /v1/users List all team user accounts (Admin only).
POST /v1/users Create new team user with role and workspace scopes (Admin only).
DELETE /v1/users/{user_id} Revoke/delete a team user account (Admin only).
GET /v1/tokens List active Bearer security access tokens (Admin only).
POST /v1/tokens Generate new Bearer security access token (Admin only).
DELETE /v1/tokens/{token_id} Revoke a Bearer security access token (Admin only).
GET /v1/workspaces List all configured workspaces and associated folder paths.
GET /v1/docs/readme Retrieve raw application documentation (README.md) as JSON.
POST /v1/chat Send a message to the AI agent with RAG search & session memory.
POST /v1/search Perform raw vector search across workspace knowledge bases.
POST /v1/index Trigger background re-indexing for a specific or all workspaces.
POST /v1/reset-memory Purge long-term vector memory for a workspace or globally.
POST /v1/factory-reset Wipe all settings, API keys, users, workspaces, and databases (Factory Reset).

API Usage Examples (curl)

1. Chat with Agent (POST /v1/chat)

curl -X POST "http://127.0.0.1:8000/v1/chat" \
     -H "Content-Type: application/json" \
     -d '{
           "message": "What were the security requirements discussed in the project specs?",
           "workspace": "MyProject"
         }'

2. Search Knowledge Base (POST /v1/search)

curl -X POST "http://127.0.0.1:8000/v1/search" \
     -H "Content-Type: application/json" \
     -d '{
           "query": "authentication bearer tokens",
           "workspace": "MyProject"
         }'

3. Trigger Workspace Re-indexing (POST /v1/index)

curl -X POST "http://127.0.0.1:8000/v1/index" \
     -H "Content-Type: application/json" \
     -d '{ "workspace": "MyProject" }'

๐Ÿ’ฌ In-App Slash Commands (During Chat)


โš™๏ธ Configuration & API Key Management

AnyContext stores configurations and API keys securely in config/settings.db (SQLite). Manage settings interactively using actx --config or /config during chat:


๐Ÿงน Uninstallation

To completely uninstall AnyContext (actx) and clean PATH variables:

  1. Download uninstall.ps1 (Windows) or uninstall.sh (Linux / Git Bash) from Latest Release Assets.
  2. Run in terminal:
    • Windows (PowerShell):
      .\uninstall.ps1
      
    • Linux / Git Bash:
      chmod +x uninstall.sh
      ./uninstall.sh
      

๐Ÿ”ฎ Roadmap

  1. Cloud Drive Ingestors (Google Drive, OneDrive, Dropbox)
  2. Multi-Agent Orchestration (Sub-Agent Execution & Routing)
  3. Web Dashboard & GUI Desktop Interface
  4. Source Code AST & Deep Codebase Analysis Pipeline

Built with โ˜• and โค๏ธ by Levix Digital to transform document chaos into your personal AI assistant.