Metadata-Version: 2.4
Name: acatome-chat
Version: 0.2.2
Summary: Acatome research assistant — acatome-lambic shell with MCP tools
License-Expression: MIT
License-File: LICENSE
Requires-Python: >=3.11
Requires-Dist: acatome-extract>=0.1.0
Requires-Dist: acatome-lambic>=0.1.0
Requires-Dist: acatome-mcp>=0.2.2
Requires-Dist: catapult-mcp>=0.1.0
Requires-Dist: grandmofty-mcp>=0.1.0
Requires-Dist: perplexity-sonar-mcp>=0.1.0
Requires-Dist: precis-mcp>=0.1.0
Provides-Extra: dev
Requires-Dist: black>=24.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Provides-Extra: embeddings
Requires-Dist: acatome-store[embeddings]; extra == 'embeddings'
Provides-Extra: postgres
Requires-Dist: acatome-store[postgres]; extra == 'postgres'
Description-Content-Type: text/markdown

# acatome-chat

**A local-first AI research assistant for scientific literature.**

One install gives you an interactive shell backed by a local LLM, a searchable paper library, document editing, live web search, and domain-specific databases — all wired together through the Model Context Protocol (MCP).

## What you get

| Capability | Powered by | What it does |
|---|---|---|
| **Paper library** | `acatome-mcp` + `acatome-store` | Semantic search over your papers. Navigate by slug, DOI, or arXiv ID. Read abstracts, TOCs, full chunks, figures. Add notes. |
| **PDF extraction** | `acatome-extract` | Drop a PDF, get structured text with metadata lookup (CrossRef + Semantic Scholar), RAKE keywords, and optional LLM summaries. Supports articles, datasheets, tech reports. |
| **Document writing** | `precis-mcp` | Open, navigate, and edit Word (.docx) and LaTeX (.tex) documents. Tracked changes in Word. Auto-numbered headings. Citation support. |
| **Web search** | `perplexity-sonar-mcp` | Live web queries via Perplexity Sonar — quick lookups, deep research with citations, academic and finance focus modes. |
| **Catalysis DB** | `catapult-mcp` | Query DFT reaction energies, activation barriers, and catalyst comparisons from CatHub and Materials Project. |
| **MOF DB** | `grandmofty-mcp` | Search Metal-Organic Frameworks by pore size, surface area, void fraction, gas isotherms. Data from CoRE, hMOF, QMOF. |
| **LLM shell** | `acatome-lambic` | Provider-agnostic chat with tool use, thinking mode, and MCP server management. Works with Ollama, OpenAI, Anthropic, and any litellm-compatible provider. |

## Install

```bash
pip install acatome-chat
# or
uv add acatome-chat
```

That's it. All MCP servers and the paper store are included. Default backend is **SQLite + Chroma** — no external services needed.

For heavier setups:
```bash
uv add "acatome-chat[postgres]"     # PostgreSQL + pgvector
uv add "acatome-chat[embeddings]"   # sentence-transformers
```

## Quick start

```bash
# Start the shell (default: ollama/qwen3.5:9b)
acatome-chat

# Use a different model
acatome-chat --model ollama/llama3.1:8b
acatome-chat --model anthropic/claude-sonnet-4-20250514
acatome-chat --model openai/gpt-4o

# Disable thinking/reasoning mode
acatome-chat --no-think
```

### Build your paper library

```bash
# Extract a single PDF
acatome-extract extract paper.pdf

# Watch a folder for new PDFs
acatome-extract watch ~/Downloads/papers/

# Enrich with LLM summaries
acatome-extract enrich ~/.acatome/papers/

# Ingest into the searchable store
acatome-store ingest ~/.acatome/papers/
```

### Talk to your papers

Once inside the shell, the LLM has direct access to your library:

```
> Find papers about CO2 capture in MOFs from 2020 onwards
> Read the abstract of li2024mof
> Summarize the key findings from chunks 12-18
> Search the web for recent advances in direct air capture
> Open my review draft and add a paragraph about these results
```

## Architecture

```
acatome-chat (you are here)
├── acatome-lambic        LLM shell engine (MCP client)
├── acatome-mcp           Paper query MCP server
│   └── acatome-store     SQLite/Postgres + Chroma/pgvector storage
│       └── acatome-meta  Shared config and metadata
├── acatome-extract       PDF → structured bundle pipeline
│   └── precis-summary    RAKE keyword extraction
├── precis-mcp            Document editor MCP server
├── perplexity-sonar-mcp  Web search MCP server
├── catapult-mcp          Catalysis database MCP server
│   └── chemdb-common     Shared chemistry DB utilities
└── grandmofty-mcp        MOF database MCP server
    └── chemdb-common
```

## Environment variables

| Variable | Required | Purpose |
|---|---|---|
| `PERPLEXITY_API_KEY` | For web search | Perplexity Sonar API key |
| `OPENAI_API_KEY` | For OpenAI models | OpenAI API key |
| `ANTHROPIC_API_KEY` | For Anthropic models | Anthropic API key |

For local models via Ollama, no API keys are needed.

## License

MIT
