Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Python agentaianthropicclaude-codecompressioncontext-engineeringcontext-windowcursorfastapilangchainllmmcpopenaiprompt-engineeringproxypythonragtoken-optimizationtokenstypescript
feat: add Docker configuration for containerized deployment
Nicola Beghin1b023e314616
diff --git a/.dockerignore b/.dockerignorenew file mode 100644index 000000000..3c21a6635--- /dev/null+++ b/.dockerignore@@ -0,0 +1,15 @@+.git+__pycache__+*.pyc+*.pyo+.pytest_cache+.coverage+.mypy_cache+.ruff_cache+tests/+docs/+CHANGELOG.md+LICENSE+NOTICE+.env+*.log\ No newline at end of filediff --git a/Dockerfile b/Dockerfilenew file mode 100644index 000000000..348188597--- /dev/null+++ b/Dockerfile@@ -0,0 +1,8 @@+FROM python:3.11-slim+RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*+COPY . /app+WORKDIR /app+RUN pip install -e .[proxy]+EXPOSE 8787+HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD curl -f http://localhost:8787/health || exit 1+ENTRYPOINT ["headroom", "proxy"]\ No newline at end of filediff --git a/docker-compose.yml b/docker-compose.ymlnew file mode 100644index 000000000..8ccd16e0b--- /dev/null+++ b/docker-compose.yml@@ -0,0 +1,11 @@+services:+ headroom-proxy:+ build: .+ command: ["--host", "0.0.0.0"]+ environment:+ - HEADROOM_HOST=0.0.0.0+ # if you want to use a custom OpenAI-compatible API endpoint,+ # uncomment and set the following line with the desired URL+ # - OPENAI_TARGET_API_URL=https://api.x.ai+ ports:+ - "8787:8787"\ No newline at end of file