Language: English | Español
AymurAI provides an integrated application, API, and ML pipelines for processing judicial rulings through four workflows:
anonymizer: extract named entities and produce anonymized documents.data-public: extract structured information for public dataset curation.summarization: condense a document into a structured summary via an LLM backend.transcription: turn audio or video into speaker-attributed text via an ASR backend.
The first two are AymurAI ML pipelines. The last two orchestrate external
services (llama-server and coro) and are inactive until those are configured.
This repository contains the React/Electron frontend, FastAPI service, production pipeline configurations, and database persistence used by these workflows.
AymurAI is a project focused on supporting the generation of anonymized and structured judicial data for gender-based violence (GBV) cases in Latin America. The application guides users through document ingestion, ML inference, manual review, validation, and export for operational and research uses.
The frontend can run as a web application served by FastAPI or as an Electron desktop application. It supports document upload and preview, interactive annotation review, entity policy configuration, anonymized document export, and structured dataset validation.
- Technical docs index: docs/README.md
- API reference: docs/api/README.md
- Configuration reference: docs/configuration/README.md
- Pipelines index: docs/pipelines/README.md
- Anonymizer flow: docs/pipelines/anonymizer/README.md
- Datapublic flow: docs/pipelines/datapublic/README.md
- Summarization flow: docs/pipelines/summarization/README.md
- Transcription (ASR) flow: docs/pipelines/transcription/README.md
- Internal database schema: docs/database/README.md
- Frontend development and packaging: frontend/README.md
Run the full API image (includes production resources):
docker run -d --name aymurai-backend -p 8899:8899 ghcr.io/aymurai/api:fullOptional: persist DB/cache outside the container (host volume mounted at /resources/cache):
mkdir -p ./aymurai-cache
docker run -d --name aymurai-backend -p 8899:8899 \
-v "$(pwd)/aymurai-cache:/resources/cache" \
ghcr.io/aymurai/api:fullOptional: GPU runtime (requires NVIDIA Container Toolkit):
docker run -d --name aymurai-backend-gpu --gpus all \
-p 8899:8899 \
ghcr.io/aymurai/api:fullExposing a GPU to the container is not enough to run inference on it. Both production pipeline configs hardcode
"device": "cpu", and no environment variable overrides them —TORCH_DEVICEis set bydocker-compose.ymlbut read by nothing. Edit thedevicefields inresources/pipelines/production/*/pipeline.jsonto place models on GPU.
Open Swagger UI:
http://localhost:8899/api/docs
Open the bundled frontend:
http://localhost:8899/
Use the services defined in docker-compose.yml:
# CPU, lightweight API profile
make api-up
# CPU, full API profile
make api-full-up
# GPU, lightweight API profile
API_SERVICE=aymurai-api-gpu make api-up
# GPU, full API profile
API_FULL_SERVICE=aymurai-api-full-gpu make api-full-upCheck logs:
make api-logs
# or make api-full-logsTranscription proxies a coro
server. It lives behind the asr compose profile, so a plain
docker compose up does not start it:
make coro-up # CPU
CORO_SERVICE=coro-gpu make coro-up # GPU
make coro-logsThe API reaches it via TRANSCRIBE_BASE_URL; without that, every /api/asr/*
route answers 500 Configuration error.
Summarization runs against a llama-server speaking the OpenAI-compatible API.
The llama.cpp image ships no weights — you must supply a GGUF:
LLAMACPP_MODELS_DIR=/path/to/gguf/models
LLAMACPP_MODEL_FILE=your-model.gguf
LLAMACPP_CTX_SIZE=16384 # the server's context window (-c)docker compose up llamacpp then serves it on :8080, and the API reaches it
via LLAMACPP_BASE_URL.
Reasoning ("thinking") is configured at server launch, not per request —
per-request budgeting does not exist upstream, and enable_thinking is
model-dependent:
| Variable | Values | Effect |
|---|---|---|
LLM_REASONING |
on / off / auto |
thinking on/off (default: detect from template) |
LLM_THINK_BUDGET |
-1 / 0 / N |
unrestricted / immediate end / token budget |
If summaries come back empty, the model is exhausting max_tokens on
reasoning: raise max_tokens, or set LLM_THINK_BUDGET=0.
- Framework:
FastAPI - Default API port:
8899 - Bundled frontend path:
GET / - Frontend implementations: browser and Electron
- DB engine:
SQLModel+ Alembic migrations on startup - Default DB URI:
sqlite:////resources/cache/sqlite/database.db - Production pipeline configs:
resources/pipelines/production/flair-anonymizer/pipeline.jsonresources/pipelines/production/datapublic/pipeline.json
- Optional external services:
llama-serverfor summarization (LLAMACPP_BASE_URL)corofor transcription (TRANSCRIBE_BASE_URL)
Every runtime variable is listed in the configuration reference.
GET /api/server/healthcheckGET /api/server/stats/summaryPOST /api/misc/document-extract(and deprecated aliasPOST /api/document-extract)POST /api/anonymizer/predictPOST /api/anonymizer/disambiguatePOST /api/anonymizer/validationPOST /api/anonymizer/anonymize-documentPOST /api/datapublic/predict/{document_id}GET /api/datapublic/validation/document/{document_id}POST /api/datapublic/validation/document/{document_id}POST /api/llm/summarizeandPOST /api/llm/summarize/streamGET|POST /api/llm/summarize/validation/document/{document_id}POST /api/asr/transcribeandPOST /api/asr/transcribe/streamGET|POST /api/asr/validation/document/{document_id}POST /api/convert/{pdf,docx,odt}/{pdf,docx,odt}(document conversion)
For full request/response contracts and examples, see docs/api/README.md.
To move an image into a closed environment:
docker image save ghcr.io/aymurai/api:full -o aymurai-api-full.tar
docker load -i aymurai-api-full.tarContributions are welcome across documentation, API, and pipeline improvements.
- Contributing guide: docs/CONTRIBUTING.md
- Security and ethics: docs/SECURITY.md
- Code of conduct: docs/CODE_OF_CONDUCT.md
- Julián Ansaldo - @jansaldo at collective.ai (email)
- Raúl Barriga - @jedzill4 at collective.ai (email)
- Sofía del Pozo - @sofiadelpozo at collective.ai (email)
- Paolo Donizetti - @padonizetti at collective.ai (email)
- Conrado Beatriz - @conrabeatriz at collective.ai (email)
- Lionel Chamorro - @lionelchamorro at collective.ai (email)
- Damián Mazzini - @ dmazzini at collective.ai (email)
If you use AymurAI in research or publications, please cite:
@techreport{feldfeber2022,
author = {Feldfeber, Ivana and Quiroga, Yasm\'{\i}n Bel\'{e}n and Guevara, Clarissa and Ciolfi Felice, Marianela},
title = {Feminisms in Artificial Intelligence: Automation Tools towards a Feminist Judiciary Reform in Argentina and Mexico},
institution = {DataGenero},
year = {2022},
url = {https://drive.google.com/file/d/1P-hW0JKXWZ44Fn94fDVIxQRTExkK6m4Y/view}
}@inproceedings{10.1145/3706598.3713681,
author = {Ciolfi Felice, Marianela and Feldfeber, Ivana and Glasserman Apicella, Carolina and Quiroga, Yasm\'{\i}n Bel\'{e}n and Ansaldo, Juli\'{a}n and Lapenna, Luciano and Bezchinsky, Santiago and Barriga Rubio, Ra\'{u}l and Garc\'{\i}a, Mail\'{e}n},
title = {Doing the Feminist Work in AI: Reflections from an AI Project in Latin America},
booktitle = {Proceedings of the 2025 CHI Conference on Human Factors in Computing Systems},
series = {CHI '25},
year = {2025},
isbn = {9798400713941},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
doi = {10.1145/3706598.3713681},
url = {https://doi.org/10.1145/3706598.3713681},
abstract = {The contemporary AI development landscape is dominated by big corporations, lacks diversity, and mostly centres the Global North, or applies extractivist logics in the South. This paper showcases a feminist process of AI development from Latin America, where we created an interactive, AI-powered tool that helps criminal court officers open justice data, addressing a data gap on gender-based violence. Through a collaborative autoethnography, drawing from Latin American feminisms, we unpack and visibilize the feminist work that was required, as a crucial step to counter hegemonic narratives. Foregrounding the subjugated knowledges of our experiences, we offer a concrete example of a feminist approach to AI development grounded in practice. With this, we aim to critically inspire those who consider building technology in service of social justice causes, or who choose to build AI systems otherwise.},
articleno = {998},
numpages = {18},
keywords = {Global South, NGO, activism, critical HCI, critical computing, duoethnography, feminist AI, feminist research},
location = {},
}
For the most up-to-date citation, please use the project-level reference in the organization repository: github.com/aymurai.
AymurAI is open-source software licensed under the MIT License. This license allows modification, distribution, and private use, provided that appropriate credit is given to the original authors.