Ananta lets the model write Python and read until it is confident
Give your LLM unlimited context!
At a glance
- What is it?
- A Python library that answers questions across large document collections by having the model write exploration code inside a Docker sandbox. Alpha code with no GitHub releases, and a README that asks for Python 3.12 while its own metadata allows 3.11.
- Who is it for?
- Ananta is a working reference implementation of recursive language model reading, useful if you want to see how a model plans a research pass over a document collection or a repository and returns citations rather than the nearest paragraph. It is not a finished product: there is no GitHub release, the PyPI line is still marked as pending publication, the README calls the code alpha, and the three console scripts each pull a different extra.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 19 days ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 4, 2026, and from our analysis. They are not legal advice.
Star history
- Ovid/ananta26 ★ · +0
| Repository | 2026-08-21 | 2026-10-04 |
|---|---|---|
| Ovid/ananta | 26 | 26 |
0 Stars in the last 44 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
The model writes Python and reads until it is confident
The core idea is that the model does not retrieve a few paragraphs and summarize them. It writes Python code that actively explores your documents inside a secure sandbox, reading, searching, cross-referencing and iterating until it is confident in the answer, which the project frames as no context window limits and no lost information. The approach is credited to Recursive Language Models, and the repository ships it as a Python package called ananta. Codebases are a first class target, not an afterthought: examples/repo.py and the create_project_from_repo call ingest a git repository and answer questions with file:line citations. Since generated code is the thing doing the reading, Docker is a prerequisite rather than an option, and the sandbox image is built from src/ananta/sandbox/Dockerfile:
Build the sandbox, then ping it before you trust it
The sandbox container is required for code execution and is built like any other image:
docker build -t ananta-sandbox -f src/ananta/sandbox/Dockerfile src/ananta/sandbox/There is a verification step, and it is worth doing because a broken sandbox looks like a model problem later on. You pipe a ping action into a throwaway container and expect a pong back:
echo '{"action": "ping"}' | docker run -i --rm ananta-sandbox
# Should output: {"status": "ok", "message": "pong"}Because execution happens in that container, the question of what the generated code can reach is answered by the image rather than by your prompt. Model support is broad: the library goes through LiteLLM, so more than 100 providers work, including Anthropic, OpenAI, Google, Azure and AWS Bedrock, and local models through Ollama with no API key needed. Provider setup lives in docs/ENVIRONMENT.md.
No release yet, so the source path is the real one
The PyPI line is written as coming when published, so pip install ananta is aspirational at the moment, and the repository has no GitHub releases. The documented path is from source, and it is an editable install rather than a plain one:
git clone https://github.com/Ovid/ananta.git
cd ananta
# Create and activate a virtual environment
python3 -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install with dev dependencies
pip install -e ".[dev]"The dev extra pulls in the test, lint and type checking stack along with the explorer libraries, so a first install is larger than a runtime install would be. Configuration is two environment variables by default:
export ANANTA_API_KEY="your-api-key-here"
export ANANTA_MODEL="claude-sonnet-4-20250514" # Default modelProgrammatic configuration, YAML config files and per-provider API keys are also supported, with the full set in docs/ENVIRONMENT.md.
Python 3.12 in the README, 3.11 in the metadata
The prerequisites list three things: Python 3.12 or later, Docker for sandbox execution, and an LLM API key or a local Ollama installation. The packaging metadata is looser. pyproject.toml sets requires-python to >=3.11, so an environment on 3.11 will install the package even though the README says 3.12 or later. That gap is the kind of detail worth resolving yourself, because the version the README asks for is the one the author tested. The dependency set is small and readable for the job: litellm>=1.0 for the provider layer, docker>=7.0 for the sandbox, pyyaml>=6.0 for config files, pdfplumber and python-docx for documents, beautifulsoup4 for HTML and chardet>=5.0 for encoding detection. Builds use hatchling with hatch-vcs, so the version is derived from version control rather than hardcoded.
Extras chain, and three scripts pull three different stacks
The optional dependency groups are layered, so asking for one thing can pull in two others. The dev group carries pytest, pytest-asyncio, pytest-cov, ruff, mypy and a long tail of libraries used by the explorer scripts. Then arxiv adds arxiv>=2.0, bibtexparser and httpx, tui adds textual>=1.0, and web is expressed as ananta[arxiv] plus fastapi, uvicorn, websockets and httpx. The document-explorer group is built on web, adding python-pptx, openpyxl, striprtf and python-multipart for other document formats. That chaining is visible in the console scripts the package installs: ananta-web points at the arxiv explorer entry point, ananta-code at the code explorer, and ananta-document-explorer at the document explorer. One warning for packaging: the wheel force-includes the top level prompts directory into src/ananta/prompts/prompts, so the prompts ship with the package rather than being read from the checkout.
The sandbox build line changes when you migrate from Shesha
The project was previously called Shesha, and there is a migration script for the rename:
python -m ananta.migrateThe script finds legacy directories, shows what it will rename, and asks for confirmation before changing anything, which is the right amount of caution for a rename that touches data directories. Afterwards the environment variables move from the SHESHA_ prefix to ANANTA_ and the sandbox has to be rebuilt. That rebuild step is where the documentation is inconsistent: the initial build command names the Dockerfile and its directory explicitly, while the migration rebuild leaves the Dockerfile to the default location,
docker build -t ananta-sandbox src/ananta/sandbox/If you follow both documents in order, one of the two builds will not behave the way the other one did. Use the explicit form that worked for your first build and treat the shorter line as the one to verify.
A query returns an answer, seconds, tokens and a trace
The Python surface is small and the result object carries the numbers you need to judge a run:
from ananta import Ananta
# Initialize (uses ANANTA_API_KEY from environment)
ananta = Ananta(model="claude-sonnet-4-20250514")
# Create a project and upload documents
project = ananta.create_project("research")
project.upload("papers/", recursive=True)
project.upload("notes.md")
# Query the documents
result = project.query("What are the main findings?")
print(result.answer)Beyond the answer, the result exposes execution_time, token_usage.total_tokens and a trace whose steps you can walk through, so a slow answer can be attributed to a specific exploration step rather than to the model in general. Repository ingestion uses the same object with a URL and an optional token for private repositories, returning a status and files_ingested before you query the project. The tradeoff to keep in mind is that execution_time here is not a single model call; the interactive example shows questions answered in 8 seconds and others taking 227.
The Barsoom session politely refuses the Malawi question
The example script queries seven Barsoom novels, public domain, about 2.8M characters in total, and it is the clearest picture of what the library does with a collection. python examples/barsoom.py uploads the seven novels into a local project on first run and then takes questions at the prompt. The first thing it demonstrates is refusal: asked for the capital of Malawi, it says the documents are Barsoom texts and do not contain that information, and explains why rather than guessing. The last thing it demonstrates is the expensive case: one question across all seven novels produced 30 chronological events with supporting quotes and identified a continuity conflict between books, which took 227 seconds of thinking. Two flags change the shape of a run: --verbose prints execution statistics and --prompt asks a single question non-interactively. The repository itself is still marked as alpha code with room for new planning techniques.
Editorial conclusion
Ananta is a working reference implementation of recursive language model reading, useful if you want to see how a model plans a research pass over a document collection or a repository and returns citations rather than the nearest paragraph. It is not a finished product: there is no GitHub release, the PyPI line is still marked as pending publication, the README calls the code alpha, and the three console scripts each pull a different extra. Before you rely on it, read the answers twice for the latency you are signing up for, build the sandbox image and check its ping response, confirm your Python interpreter matches the version your environment actually needs, and expect to change ANANTA_MODEL from the claude-sonnet-4-20250514 default rather than inherit it.
Frequently asked questions
How do you install Ananta today?
From source, since the repository has no GitHub releases and the PyPI line is marked as coming when published. Clone https://github.com/Ovid/ananta.git, create a virtual environment with python3 -m venv .venv, activate it, run pip install -e ".[dev]", then build the sandbox image with docker build -t ananta-sandbox -f src/ananta/sandbox/Dockerfile src/ananta/sandbox/.
What is Ananta about?
It answers complex questions across large document collections with citations. The model writes Python code that explores the documents inside a secure sandbox, reading, searching and cross-referencing until it is confident, an approach based on Recursive Language Models. It can also ingest git repositories and answer with file:line citations.
What happened to Ananta when it was called Shesha?
The project was renamed, and the old data directories are migrated with python -m ananta.migrate, which finds legacy directories, shows what it will rename and asks for confirmation. Afterwards, environment variables change from the SHESHA_ prefix to ANANTA_ and the sandbox container is rebuilt.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/ovid-ananta)Star history chart for your README
[](https://hysenlabs.com/projects/ovid-ananta)