{
  "markdown": "<div align=\"center\">  \n  <h1>QueryWeaver (Text2SQL)</h1>\n\n**REST API · MCP · Graph-powered** \n\nQueryWeaver is an **open-source Text2SQL** tool that converts plain-English questions into SQL using **graph-powered schema understanding**. It helps you ask databases natural-language questions and returns SQL and results.\n\nConnect and ask questions: [![Discord](https://img.shields.io/badge/Discord-%235865F2.svg?&logo=discord&logoColor=white)](https://discord.gg/b32KEzMzce)\n\n[![Try Free](https://img.shields.io/badge/Try%20Free-FalkorDB%20Cloud-FF8101?labelColor=FDE900&link=https://app.falkordb.cloud)](https://app.falkordb.cloud)\n[![PyPI](https://img.shields.io/pypi/v/queryweaver?label=PyPI&logo=pypi&logoColor=white)](https://pypi.org/project/queryweaver/)\n[![Dockerhub](https://img.shields.io/docker/pulls/falkordb/queryweaver?label=Docker)](https://hub.docker.com/r/falkordb/queryweaver/)\n[![Tests](https://github.com/FalkorDB/QueryWeaver/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/FalkorDB/QueryWeaver/actions/workflows/tests.yml)\n[![Swagger UI](https://img.shields.io/badge/API-Swagger-11B48A?logo=swagger&logoColor=white)](https://app.queryweaver.ai/docs)\n</div>\n\n![new-qw-ui-gif](https://github.com/user-attachments/assets/34663279-0273-4c21-88a8-d20700020a07)\n\n\n## Get Started\n\n### Docker\n\n> 💡 Recommended for evaluation purposes (Local Python or Node are not required)\n```bash\ndocker run -p 5000:5000 -it falkordb/queryweaver\n```\n\n\nLaunch: http://localhost:5000\n\n---\n\n### Use an .env file (Recommended)\n\nCreate a local `.env` by copying `.env.example` and passing it to Docker. This is the simplest way to provide all required configuration:\n\n```bash\ncp .env.example .env\n# edit .env to set your values, then:\ndocker run -p 5000:5000 --env-file .env falkordb/queryweaver\n```\n\n### Alternative: Pass individual environment variables\n\nIf you prefer to pass variables on the command line, use `-e` flags (less convenient for many variables):\n\n```bash\ndocker run -p 5000:5000 -it \\\n  -e APP_ENV=development \\\n  -e FASTAPI_SECRET_KEY=your_super_secret_key_here \\\n  -e GOOGLE_CLIENT_ID=your_google_client_id \\\n  -e GOOGLE_CLIENT_SECRET=your_google_client_secret \\\n  -e GITHUB_CLIENT_ID=your_github_client_id \\\n  -e GITHUB_CLIENT_SECRET=your_github_client_secret \\\n  -e AZURE_API_KEY=your_azure_api_key \\\n  falkordb/queryweaver\n```\n\n> `APP_ENV=development` is what makes the login work on the plain-HTTP\n> `http://localhost:5000` this command serves. Drop it (or set anything else)\n> when you put QueryWeaver behind HTTPS, so the session cookie is marked\n> `Secure`. See [Application environment](#application-environment).\n\n> Note: QueryWeaver supports multiple AI providers. You can use `OPENAI_API_KEY`, `GEMINI_API_KEY`, `ANTHROPIC_API_KEY`, or `AZURE_API_KEY`. See the [AI/LLM configuration](#aillm-configuration) section for details.\n\n> For a full list of configuration options, consult `.env.example`.\n\n## Memory TTL (optional)\n\nQueryWeaver stores per-user conversation memory in FalkorDB. By default these graphs persist indefinitely. Set `MEMORY_TTL_SECONDS` to apply a Redis TTL (in seconds) so idle memory graphs are automatically cleaned up.\n\n```bash\n# Expire memory graphs after 1 week of inactivity\nMEMORY_TTL_SECONDS=604800\n```\n\nThe TTL is refreshed on every user interaction, so active users keep their memory.\n\n## MCP server: host or connect (optional)\n\nQueryWeaver includes optional support for the Model Context Protocol (MCP). You can either have QueryWeaver expose an MCP-compatible HTTP surface (so other services can call QueryWeaver as an MCP server), or configure QueryWeaver to call an external MCP server for model/context services.\n\nWhat QueryWeaver provides\n- The app registers MCP operations focused on Text2SQL flows:\n   - `list_databases`\n   - `connect_database`\n   - `database_schema`\n   - `query_database`\n\n- To disable the built-in MCP endpoints set `DISABLE_MCP=true` in your `.env` or environment (default: MCP enabled).\n- Configuration\n\n- `DISABLE_MCP` — disable QueryWeaver's built-in MCP HTTP surface. Set to `true` to disable. Default: `false` (MCP enabled).\n\nExamples\n\nDisable the built-in MCP when running with Docker:\n\n```bash\ndocker run -p 5000:5000 -it --env DISABLE_MCP=true falkordb/queryweaver\n```\n\nCalling the built-in MCP endpoints (example)\n- The MCP surface is exposed as HTTP endpoints. \n\n\n### Server Configuration\n\nBelow is a minimal example `mcp.json` client configuration that targets a local QueryWeaver instance exposing the MCP HTTP surface at `/mcp`.\n\n```json\n{\n   \"servers\": {\n      \"queryweaver\": {\n         \"type\": \"http\",\n         \"url\": \"http://127.0.0.1:5000/mcp\",\n         \"headers\": {\n            \"Authorization\": \"Bearer your_token_here\"\n         }\n      }\n   },\n   \"inputs\": []\n}\n```\n\n## REST API \n\n### API Documentation\n\nSwagger UI: https://app.queryweaver.ai/docs\n\nOpenAPI JSON: https://app.queryweaver.ai/openapi.json\n\n### Overview\n\nQueryWeaver exposes a small REST API for managing graphs (database schemas) and running Text2SQL queries. All endpoints that modify or access user-scoped data require authentication. In the browser the app uses a signed session cookie established by OAuth or email/password; for CLI and scripts you can use an API token (see `tokens` routes or the web UI to create one).\n\nCore endpoints\n- GET /graphs — list available graphs for the authenticated user\n- GET /graphs/{graph_id}/data — return nodes/links (tables, columns, foreign keys) for the graph\n- POST /graphs — upload or create a graph (JSON payload or file upload)\n- POST /graphs/{graph_id} — run a Text2SQL chat query against the named graph (streaming response)\n\nAuthentication\n- Add an Authorization header: `Authorization: Bearer <API_TOKEN>`\n\n#### Three separate credentials\n\nQueryWeaver keeps its three kinds of \"login\" independent of one another, so a\nfailure in one never looks like a failure in another:\n\n| Credential | What it proves | Where it lives | Depends on FalkorDB? |\n| --- | --- | --- | --- |\n| Browser login | Who is using the app | Signed session cookie, established once by OAuth or a password | No, once the process is running |\n| API token | A script may act as a user | `Token` node in the Organizations graph, sent as `Authorization: Bearer …` | Yes |\n| Data-source connection | Access to *your* database | Supplied per request, never stored | No (it is your own database) |\n\nBecause the browser login is a signed cookie, staying logged in costs no database\nround trip and survives a FalkorDB outage in an already-running process — you\nkeep your session and only the operations that genuinely need the graph fail.\nRequests that supply an API token explicitly are always checked against the\ndatabase and are answered with `503` (not `401`) when it cannot be reached, so\nclients retry instead of re-authenticating.\n\nNote the scope: this is about staying logged in, not about booting. QueryWeaver\nstill connects to FalkorDB at startup and will not start without it, so a restart\nduring an outage is not covered.\n\nA browser login lasts 24 hours by default; set `BROWSER_SESSION_TTL_HOURS` to\nchange that. Logging out clears the session cookie. No API token is issued to\nthe browser, so there is none to revoke — tokens are created explicitly from the\ntokens API and revoked there. (A legacy `api_token` cookie left over from an\nolder release is cleared and revoked on logout too.)\n\n#### Email signup is verified before the account exists\n\nSigning up with an email address and password does not create an account. The\nsubmitted details are parked, a six-digit confirmation code is mailed to the\naddress, and the account — and the session — come into being only when that code\nis typed back into the signup form. So an address the registrant does not\ncontrol never becomes an account at all, and there is no half-real user for the\nrest of the system to reason about.\n\nA code rather than an emailed link, because the code has to come back to the\nsession that submitted the form. A link can be opened by anyone who receives it:\na stranger could submit your address with a password of their choosing, and your\nsingle click would create an account they knew the password to. Nobody can be\nsigned up by someone else here, because the person who fills in the form is the\nonly one who ever holds both halves.\n\nThe code is single-use, expires after 15 minutes and tolerates only a handful of\nwrong guesses before the pending signup is discarded — a short code is only safe\nwhile the number of attempts is small. It is also only redeemable in the browser\nthat submitted the form: each submission mints a ticket that stays in that\nbrowser's session, and a code presented without its ticket is refused. Entering\nit signs the browser in directly: the password was chosen minutes earlier, and\nasking for it again would prove nothing. A code can be re-sent from the same\nscreen, subject to a per-address rate limit; the send budget is per pending\nsignup, so it starts over once the pending signup expires and an address can\nalways be signed up again later. Typing a code that has expired is not one of\nthe wrong guesses and does not discard anything — the pending signup is left\nwhere it is so the same screen can send a fresh code.\n\nIn development, a message with no mail server configured is written to the\napplication log instead of being sent, so the flow can be completed by copying\nthe code out of the log. This needs `APP_ENV=development` — anywhere else an\nunconfigured process refuses the send rather than logging the code and\nreporting success. Set `MAIL_SERVER` (plus `MAIL_PORT`, `MAIL_USERNAME`,\n`MAIL_PASSWORD`, `MAIL_DEFAULT_SENDER`) to send for real; any provider with an\nSMTP endpoint works. `EMAIL_VERIFICATION_TTL_MINUTES`,\n`EMAIL_VERIFICATION_MAX_ATTEMPTS`, `EMAIL_VERIFICATION_RESEND_SECONDS` and\n`EMAIL_VERIFICATION_MAX_SENDS` tune the lifetime and the limits. See\n`.env.example` for the full list.\n\nThe trade-off of a signed session cookie is that it cannot be revoked from\nthe server before it expires: the TTL bounds the damage, and rotating\n`FASTAPI_SECRET_KEY` invalidates every browser login at once. API tokens keep\ntheir server-side record and so can still be revoked individually and\nimmediately. Shorten `BROWSER_SESSION_TTL_HOURS` if you need a tighter window.\n\nExamples\n\n1) List graphs (GET)\n\ncurl example:\n\n```bash\ncurl -s -H \"Authorization: Bearer $TOKEN\" \\\n   https://app.queryweaver.ai/graphs\n```\n\nPython example:\n\n```python\nimport requests\nresp = requests.get('https://app.queryweaver.ai/graphs', headers={'Authorization': f'Bearer {TOKEN}'})\nprint(resp.json())\n```\n\n2) Get graph schema (GET)\n\ncurl example:\n\n```bash\ncurl -s -H \"Authorization: Bearer $TOKEN\" \\\n   https://app.queryweaver.ai/graphs/my_database/data\n```\n\nPython example:\n\n```python\nresp = requests.get('https://app.queryweaver.ai/graphs/my_database/data', headers={'Authorization': f'Bearer {TOKEN}'})\nprint(resp.json())\n```\n\n3) Load a graph (POST) — JSON payload\n\n```bash\ncurl -H \"Authorization: Bearer $TOKEN\" -H \"Content-Type: application/json\" \\\n   -d '{\"database\": \"my_database\", \"tables\": [...]}' \\\n   https://app.queryweaver.ai/graphs\n```\n\nOr upload a file (multipart/form-data):\n\n```bash\ncurl -H \"Authorization: Bearer $TOKEN\" -F \"file=@schema.json\" \\\n   https://app.queryweaver.ai/graphs\n```\n\n4) Query a graph (POST) — run a chat-based Text2SQL request\n\nThe `POST /graphs/{graph_id}` endpoint accepts a JSON body with at least a `chat` field (an array of messages). The endpoint streams processing steps and the final SQL back as server-sent-message chunks delimited by a special boundary used by the frontend. For simple scripting you can call it and read the final JSON object from the streamed messages.\n\nExample payload:\n\n```json\n{\n   \"chat\": [\"How many users signed up last month?\"],\n   \"result\": [],\n   \"instructions\": \"Prefer PostgreSQL compatible SQL\"\n}\n```\n\ncurl example (simple, collects whole response):\n\n```bash\ncurl -s -H \"Authorization: Bearer $TOKEN\" -H \"Content-Type: application/json\" \\\n   -d '{\"chat\": [\"Count orders last week\"]}' \\\n   https://app.queryweaver.ai/graphs/my_database\n```\n\nPython example (stream-aware):\n\n```python\nimport requests\nimport json\n\nurl = 'https://app.queryweaver.ai/graphs/my_database'\nheaders = {'Authorization': f'Bearer {TOKEN}', 'Content-Type': 'application/json'}\nwith requests.post(url, headers=headers, json={\"chat\": [\"Count orders last week\"]}, stream=True) as r:\n      # The server yields JSON objects delimited by a message boundary string\n      boundary = '|||FALKORDB_MESSAGE_BOUNDARY|||'\n      buffer = ''\n      for chunk in r.iter_content(decode_unicode=True, chunk_size=1024):\n            buffer += chunk\n            while boundary in buffer:\n                  part, buffer = buffer.split(boundary, 1)\n                  if not part.strip():\n                        continue\n                  obj = json.loads(part)\n                  print('STREAM:', obj)\n```\n\nNotes & tips\n- Graph IDs are namespaced per-user. When calling the API directly use the plain graph id (the server will namespace by the authenticated user). For uploaded files the `database` field determines the saved graph id.\n- The streaming response includes intermediate reasoning steps, follow-up questions (if the query is ambiguous or off-topic), and the final SQL. The frontend expects the boundary string `|||FALKORDB_MESSAGE_BOUNDARY|||` between messages.\n- For destructive SQL (INSERT/UPDATE/DELETE etc) the service will include a confirmation step in the stream; the frontend handles this flow. If you automate destructive operations, ensure you handle confirmation properly (see the `ConfirmRequest` model in the code).\n\n## Python SDK\n\nThe QueryWeaver Python SDK allows you to use Text2SQL functionality directly in your Python applications **without running a web server**.\n\n### Installation\n\n```bash\n# SDK only (minimal dependencies)\npip install queryweaver\n\n# With server dependencies (FastAPI, etc.)\npip install queryweaver[server]\n\n# Development (includes testing tools)\npip install queryweaver[dev]\n```\n\n### Quick Start\n\n```python\nimport asyncio\nfrom queryweaver import QueryWeaver\n\nasync def main():\n    # Initialize with FalkorDB connection\n    qw = QueryWeaver(falkordb_url=\"redis://localhost:6379\")\n\n    # Connect a PostgreSQL or MySQL database\n    conn = await qw.connect_database(\"postgresql://user:pass@host:5432/mydb\")\n    print(f\"Connected: {conn.database_id}\")  # \"mydb\"\n\n    # Convert natural language to SQL and execute — pass the database_id\n    # returned by connect_database (un-prefixed; namespacing is internal).\n    result = await qw.query(conn.database_id, \"Show me all customers from NYC\")\n    print(result.sql_query)    # SELECT * FROM customers WHERE city = 'NYC'\n    print(result.results)       # [{\"id\": 1, \"name\": \"Alice\", \"city\": \"NYC\"}, ...]\n    print(result.ai_response)   # \"Found 42 customers from NYC...\"\n\n    await qw.close()\n\nasyncio.run(main())\n```\n\n### Context Manager\n\n```python\nasync with QueryWeaver(falkordb_url=\"redis://localhost:6379\") as qw:\n    conn = await qw.connect_database(\"postgresql://user:pass@host/mydb\")\n    result = await qw.query(conn.database_id, \"Count orders by status\")\n# close() runs automatically, awaiting any in-flight background memory writes.\n```\n\n### Multiple Instances\n\nMultiple `QueryWeaver` instances can run side-by-side in the same process.\nEach holds its own FalkorDB connection and passes it explicitly through\nevery call, so there is no shared global state to collide over.\n\n```python\nasync with QueryWeaver(falkordb_url=\"redis://host-a:6379\", user_id=\"tenant_a\") as a, \\\n           QueryWeaver(falkordb_url=\"redis://host-b:6379\", user_id=\"tenant_b\") as b:\n    sales = await a.connect_database(\"postgresql://user:pass@host-a/sales\")\n    ops = await b.connect_database(\"postgresql://user:pass@host-b/ops\")\n    await a.query(sales.database_id, \"Show top customers\")\n    await b.query(ops.database_id, \"Count open tickets\")\n```\n\n### Available Methods\n\n| Method | Description |\n|--------|-------------|\n| `connect_database(db_url)` | Connect PostgreSQL/MySQL and load schema |\n| `query(database, question)` | Convert natural language to SQL and execute |\n| `get_schema(database)` | Retrieve database schema (tables and relationships) |\n| `list_databases()` | List all connected databases |\n| `delete_database(database)` | Remove database from FalkorDB |\n| `refresh_schema(database)` | Re-sync schema after database changes |\n| `execute_confirmed(database, sql)` | Execute confirmed destructive operations |\n\n### Advanced Query Options\n\nFor multi-turn conversations, custom instructions, or per-request LLM overrides:\n\n```python\nfrom queryweaver import QueryWeaver, QueryRequest\n\nrequest = QueryRequest(\n    question=\"Show their recent orders\",\n    chat_history=[\"Show all customers from NYC\"],\n    result_history=[\"Found 42 customers...\"],\n    instructions=\"Use created_at for date filtering\",\n    # Optional per-request LLM overrides — bypass env-based config\n    custom_api_key=\"sk-...\",\n    custom_model=\"openai/gpt-4.1\",\n)\n\nresult = await qw.query(\"mydb\", request)\n```\n\n### Handling Destructive Operations\n\nINSERT, UPDATE, DELETE operations require confirmation:\n\n```python\nresult = await qw.query(\"mydb\", \"Delete inactive users\")\n\nif result.requires_confirmation:\n    print(f\"Destructive SQL: {result.sql_query}\")\n    # Execute after user confirms\n    confirmed = await qw.execute_confirmed(\"mydb\", result.sql_query)\n```\n\n### Requirements\n\n- Python 3.12+\n- FalkorDB instance (local or remote)\n- OpenAI or Azure OpenAI API key (for LLM)\n- Target SQL database (PostgreSQL or MySQL)\n\n## Development\n\nFollow these steps to run and develop QueryWeaver from source.\n\n### Prerequisites\n\n- Python 3.12+\n- uv (Python package manager)\n- A FalkorDB instance (local or remote)\n- Node.js and npm (for the React frontend)\n\n### Install and configure\n\nQuickstart (recommended for development):\n\n```bash\n# Clone the repo\ngit clone https://github.com/FalkorDB/QueryWeaver.git\ncd QueryWeaver\n\n# Install dependencies (backend + frontend) and start the dev server\nmake install\nmake run-dev\n```\n\nIf you prefer to set up manually or need a custom environment, use uv:\n\n```bash\n# Install Python (backend) and frontend dependencies\nuv sync\n\n# Create a local environment file\ncp .env.example .env\n# Edit .env with your values (set APP_ENV=development for local development)\n```\n\n### Run the app locally\n\n```bash\nuv run uvicorn api.index:app --host 0.0.0.0 --port 5000 --reload\n```\n\nThe server will be available at http://localhost:5000\n\nAlternatively, the repository provides Make targets for running the app:\n\n```bash\nmake run-dev   # development server (reload, debug-friendly)\nmake run-prod  # production mode (ensure frontend build if needed)\n```\n\n### Frontend build (when needed)\n\nThe frontend is a modern React + Vite app in `app/`. Build before production runs or after frontend changes:\n\n```bash\nmake install       # installs backend and frontend deps\nmake build-prod    # builds the frontend into app/dist/\n\n# or manually\ncd app\nnpm ci\nnpm run build\n```\n\n### OAuth configuration\n\nQueryWeaver supports Google and GitHub OAuth. Create OAuth credentials for each provider and paste the client IDs/secrets into your `.env` file.\n\n- Google: set authorized origin and callback `http://localhost:5000/login/google/authorized`\n- GitHub: set homepage and callback `http://localhost:5000/login/github/authorized`\n\n#### Environment-specific OAuth settings\n\nFor production/staging deployments, session cookies are HTTPS-only by default. Only an `APP_ENV` that reads as `development` once trimmed and lower-cased turns that off, so a deployment that forgets the variable still gets secure cookies. Set `APP_ENV=development` for plain-HTTP local runs, otherwise the browser drops the cookie and you get OAuth CSRF state mismatch errors.\n\nThe signed session cookie is the browser's only credential. An `api_token` is never written to a browser cookie - a bearer token in a cookie sits on disk in clear text for its whole lifetime - so programmatic clients fetch one from the tokens API instead. Sessions issued before this change keep working: the legacy `api_token` cookie is still accepted, just no longer handed out.\n\n```bash\n# For production/staging (HTTPS-only session cookies - also the default)\nAPP_ENV=production\n\n# For development (allows HTTP session cookies)\nAPP_ENV=development\n```\n\n**Important**: If you're getting \"mismatching_state: CSRF Warning!\" errors on a plain-HTTP environment, ensure `APP_ENV` is set to `development`.\n\n### AI/LLM configuration\n\nQueryWeaver supports multiple AI providers. Set one API key and QueryWeaver auto-detects which provider to use.\n\n**Priority order:** Ollama > OpenAI > Gemini > Anthropic > Cohere > Azure (default)\n\n| Provider | API Key | Default Models |\n|----------|---------|----------------|\n| Ollama | `OLLAMA_MODEL` | `ollama/<your-model>`, `ollama/nomic-embed-text` |\n| OpenAI | `OPENAI_API_KEY` | `openai/gpt-4.1`, `openai/text-embedding-ada-002` |\n| Google Gemini | `GEMINI_API_KEY` | `gemini/gemini-3-pro-preview`, `gemini/gemini-embedding-001` |\n| Anthropic | `ANTHROPIC_API_KEY` | `anthropic/claude-sonnet-4-5-20250929`, `voyage/voyage-3`* |\n| Cohere | `COHERE_API_KEY` | `cohere/command-a-03-2025`, `cohere/embed-v4.0` |\n| Azure OpenAI | `AZURE_API_KEY` | `azure/gpt-4.1`, `azure/text-embedding-ada-002` |\n\n\\* Anthropic has no native embeddings. You must set `VOYAGE_API_KEY` or `EMBEDDING_MODEL` for embeddings, otherwise startup will fail with an error.\n\n**Optional: Override default models**\n\n```bash\nCOMPLETION_MODEL=gemini/gemini-3-pro-preview\nEMBEDDING_MODEL=gemini/gemini-embedding-001\n```\n\nBoth must match your API key's provider.\n\n#### Docker examples with AI configuration\n\nUsing OpenAI:\n```bash\ndocker run -p 5000:5000 -it \\\n  -e FASTAPI_SECRET_KEY=your_secret_key \\\n  -e OPENAI_API_KEY=your_openai_api_key \\\n  falkordb/queryweaver\n```\n\nUsing Google Gemini:\n```bash\ndocker run -p 5000:5000 -it \\\n  -e FASTAPI_SECRET_KEY=your_secret_key \\\n  -e GEMINI_API_KEY=your_gemini_api_key \\\n  falkordb/queryweaver\n```\n\nUsing Anthropic:\n```bash\ndocker run -p 5000:5000 -it \\\n  -e FASTAPI_SECRET_KEY=your_secret_key \\\n  -e ANTHROPIC_API_KEY=your_anthropic_api_key \\\n  falkordb/queryweaver\n```\n\nUsing Azure OpenAI:\n```bash\ndocker run -p 5000:5000 -it \\\n  -e FASTAPI_SECRET_KEY=your_secret_key \\\n  -e AZURE_API_KEY=your_azure_api_key \\\n  -e AZURE_API_BASE=https://your-resource.openai.azure.com/ \\\n  -e AZURE_API_VERSION=2025-03-01-preview \\\n  falkordb/queryweaver\n```\n\n## Testing\n\n> Quick note: many tests require FalkorDB to be available. Use the included helper to run a test DB in Docker if needed.\n\n### Prerequisites\n\n- Install dev dependencies: `uv sync`\n- Start FalkorDB (see `make docker-falkordb`)\n- Install Playwright browsers: `uv run playwright install`\n\n### Quick commands\n\nRecommended: prepare the development/test environment using the Make helper (installs dependencies and Playwright browsers):\n\n```bash\n# Prepare development/test environment (installs deps and Playwright browsers)\nmake setup-dev\n```\n\nAlternatively, you can run the E2E-specific setup script and then run tests manually:\n\n```bash\n# Prepare E2E test environment (installs browsers and other setup)\n./setup_e2e_tests.sh\n\n# Run all tests\nmake test\n\n# Run unit tests only (faster)\nmake test-unit\n\n# Run E2E tests (headless)\nmake test-e2e\n\n# Run E2E tests with a visible browser for debugging\nmake test-e2e-headed\n```\n\n### Test types\n\n- Unit tests: focus on individual modules and utilities. Run with `make test-unit` or `uv run python -m pytest tests/ -k \"not e2e\"`.\n- End-to-end (E2E) tests: run via Playwright and exercise UI flows, OAuth, file uploads, schema processing, chat queries, and API endpoints. Use `make test-e2e`.\n\nSee `tests/e2e/README.md` for full E2E test instructions.\n\n### CI/CD\n\nGitHub Actions run unit and E2E tests on pushes and pull requests. Failures capture screenshots and artifacts for debugging.\n\n## Troubleshooting\n\n- FalkorDB connection issues: start the DB helper `make docker-falkordb` or check network/host settings.\n- Playwright/browser failures: install browsers with `uv run playwright install` and ensure system deps are present.\n- Missing environment variables: copy `.env.example` and fill required values.\n- **OAuth \"mismatching_state: CSRF Warning!\" errors**: Session cookies are HTTPS-only unless `APP_ENV` reads as `development` once trimmed and lower-cased. Set `APP_ENV=development` for plain-HTTP environments; use `production` or `staging` (or leave the variable out entirely) for HTTPS deployments.\n\n## Project layout (high level)\n\n- `api/` – FastAPI backend\n- `app/` – React + Vite frontend\n- `tests/` – unit and E2E tests\n\n\n## License\n\nLicensed under the GNU Affero General Public License (AGPL). See [LICENSE](LICENSE.txt).\n\nCopyright FalkorDB Ltd. 2025\n\n",
  "bytes": 24843,
  "sha": "7b4dc1e2341a0a4ad1798d3fee5a9ca51bf7060008608b5d3a90088387bd45c2",
  "repo_slug": "falkordb/queryweaver",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_com_falkordb_queryweaver_13f08b1a/readme"
}