> For the complete documentation index, see [llms.txt](https://public-intelligence.gitbook.io/taina-agente-ia-ogtic/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://public-intelligence.gitbook.io/taina-agente-ia-ogtic/arquitectura-y-conceptos/estructura-proyecto.md).

# Estructura del proyecto

El repositorio `taina_ogtic` contiene todos los componentes necesarios para ejecutar Taína en producción mediante Docker Compose.

```
taina_ogtic/
├─ docker-compose.yml     # Composición de servicios Docker
├─ backend/               # Backend Python (LiveKit Agent)
│  ├── Dockerfile         # Imagen Docker del backend
│  ├── .env.example       # Plantilla de variables de entorno
│  ├── requirements.txt   # Dependencias Python
│  ├── pyproject.toml     # Configuración del proyecto
│  ├── src/               # Código fuente principal
│  ├── data/              # Base de conocimiento y preprocessing
│  │   ├── chunks/        # Archivos *_rag_documents.json (entrada RAG)
│  │   └── QA/            # Pares pregunta-respuesta generados
│  ├── storage/           # Colecciones ChromaDB persistidas
│  │   ├── chroma/        # Colección principal (servicios)
│  │   └── chroma_qa/     # Colección QA (servicios_qa)
│  ├── preprocessing/     # Pipeline de transformación de datos
│  ├── logs/              # Logs del agente (rotados)
│  └── tests/             # Pruebas unitarias y funcionales
└─ taina-gitbook-ogtic/   # Documentación GitBook
```

## Directorio `backend/src/`

* `main.py`: Punto de entrada del agente; levanta LiveKit, inicializa herramientas y maneja sesiones.
* `tools.py`: Implementa las 8 herramientas del catálogo de servicios.
* `prompts.py`: Plantillas y contexto de instrucciones para el LLM.
* `ingest.py`: Pipeline de ingesta de documentos JSON a ChromaDB.
* `embeddings/`: Implementación de embeddings Google Gemini con caché y pruebas de salud.
* `vectors/`: Cliente ChromaDB y utilidades de ingestión/carga.
* `qa/`: Generación de pares pregunta-respuesta y catálogo de servicios.
* `utils/`: Herramientas de carga de documentos, splitting, logging y rate limiting.

## Directorios de datos

* `data/chunks/`: Archivos `*_rag_documents.json` procesados — la entrada para la ingesta RAG.
* `data/QA/`: Pares QA generados por servicio.
* `storage/chroma/`: Persistencia de la colección principal de ChromaDB (`servicios`).
* `storage/chroma_qa/`: Persistencia de la colección QA de ChromaDB (`servicios_qa`).

## Docker

El servicio se construye y ejecuta con Docker Compose:

```bash
# Construir y levantar
docker compose up -d --build

# Ver logs
docker compose logs -f taina-backend
```

El `Dockerfile` utiliza Python 3.11, instala dependencias con `uv` y pre-descarga los modelos de IA locales (Silero VAD, Multilingual Turn Detector) durante el build.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://public-intelligence.gitbook.io/taina-agente-ia-ogtic/arquitectura-y-conceptos/estructura-proyecto.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
