Metadata-Version: 2.4
Name: acm-context-management
Version: 0.2.8
Summary: Context-management gateway + MCP server that brings the ACM techniques (trimming, summarisation, image-recall, memory) into any IDE
Project-URL: Homepage, https://github.com/HarishanA21/agentic_context_management
Project-URL: Repository, https://github.com/HarishanA21/agentic_context_management
Author: ACM
License: MIT
Keywords: claude-code,context-management,cursor,gateway,ides,llm,mcp,vscode
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.11
Requires-Dist: fastapi>=0.110
Requires-Dist: httpx>=0.27
Requires-Dist: langchain-core>=0.3
Requires-Dist: langchain>=0.3
Requires-Dist: mcp>=1.2
Requires-Dist: pillow>=10
Requires-Dist: pydantic>=2
Requires-Dist: python-dotenv>=1.0
Requires-Dist: uvicorn[standard]>=0.29
Provides-Extra: dev
Requires-Dist: build; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: twine; extra == 'dev'
Description-Content-Type: text/markdown

# ACM Gateway

ACM keeps your AI assistant's context window small and useful. This package is the **gateway**, a small local service that does the context work. It trims, summarises, and manages what goes to the model on every call.

The gateway works with VSCode, Cursor, Antigravity, Claude Code, and Windsurf. Your IDE talks to the gateway as if it were the AI. The gateway applies the techniques, then passes the request on to the real provider.

## Install

Use `uv` to install the gateway.

```bash
uv tool install acm-context-management
```

## Run

Start the gateway. It serves on `http://127.0.0.1:8807`.

```bash
acm-gateway
```

To use your own API key, set it first.

```bash
export ACM_UPSTREAM_BASE_URL=https://openrouter.ai/api/v1
export ACM_UPSTREAM_API_KEY=your_key_here
acm-gateway
```

## Point your IDE at the gateway

Tell your IDE the AI lives at `http://127.0.0.1:8807/v1`.

1. **Cursor.** Set a custom OpenAI base URL.
2. **Claude Code.** Set `ANTHROPIC_BASE_URL`.

## Profiles

A profile decides which techniques are on. Pick one of `minimal`, `long_chat`, `power_research`, `cheap_long`, or `visual_recall`. You can also copy the example config and edit it, or set `ACM_CONFIG` to your own file path.

## What the gateway does

1. **Trim.** Cut old and large tool outputs.
2. **Summarise.** Compress old turns into a short note.
3. **Sliding window.** Keep the newest turns and the system prompt.
4. **Image recall.** Cache or evict old images.
5. **Visual method.** Turn big tool outputs into an image the model reads.
6. **Manual removal.** Drop any message by hand. Choices are saved.
7. **Memory.** Remember and recall notes across sessions.
8. **Multi provider routing.** Route to OpenAI, OpenRouter, Google, Azure, or Anthropic.

## Links

Repository: https://github.com/HarishanA21/agentic_context_management

Issues: https://github.com/HarishanA21/agentic_context_management/issues

## License

MIT
