Alfred: An open-source Data Assistant for domain adoption, powered by agent skills, semantic knowledge graphs and relational data.
SaferSkills independently audited Alfred (Agent Skill) and scored it 96/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 1 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 1 flagged
The text {match} tells the agent to skip the normal "ask the user first" gate. Used adversarially it removes the human-in-the-loop check before destructive or sensitive actions, turning a normally-gated agent into a fire-and-forget executor.
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Say it. Query it. Own it.
App
Open source is how data stays free. However, most production-grade text-to-sql assistants are not open source and expose only a narrow text box on top of a proprietary stack. Alfred addresses this by providing a research-first open-source application:
Pluggable Chat History: Swap the default SQLite persistence for your own database by re-implementing a small set of functions in lib/db.ts
alfred-app/mnt/skills directory``.Install Node.js and Docker. Run afterwards in your terminal:
cd alfred-app
npm installThe .env file provides Alfred with credentials for chat, embeddings, and databases. Chat and embedding settings should be configured depending on the provider (Azure or OpenAI). Keep this file private and do not commit it to version control. See .env.example and create your .env.local within the alfred-app directory. Feel free to user the provider of your choice, from azure to ollama (openai compatible).
# Run Alfred using openai-compatible model, e.g. ollama, lm-studio,...
CHAT_PROVIDER=openai
OPENAI_API_KEY=ollama
OPENAI_BASE_URL=e.g. http://localhost:11434/v1/
OPENAI_CHAT_MODEL= e.g. gpt-oss:20b
# Or run Alfred using any azure deployment
CHAT_PROVIDER=azure
AZURE_OPENAI_BASE_URL=https://xxxxxxxx.com/openai/
AZURE_OPENAI_API_VERSION=xxxx-xx-xx
AZURE_OPENAI_CHAT_DEPLOYMENT=gpt-5.1
...
# Databricks and Neo4j credentialsIf you want to try Alfred and you do not have a concrete Databricks dataset nor a knowledge graph, you can start first with the Databricks Free Edition. Run the script create_databricks_schema.ipynb to get your first data into databricks. From databricks you get your credentials for your ``.env``:
DATABRICKS_HOST=....databricks.com
DATABRICKS_TOKEN=your_personal_access_token
DATABRICKS_WAREHOUSE_ID=your_warehouse_id
DATABRICKS_CATALOG=your_databricks_catalog
DATABRICKS_SCHEMA=your_databricks_schemaAdd then to your ``.env`` the (default) credentials for neo4j knowledge graph (the neo4j will be build in the next step):
NEO4J_BOLT_URL=bolt://localhost:7687
NEO4J_USERNAME=neo4j
NEO4J_PASSWORD=passwordNext, we build and run both alfred and neo4j community edition with docker. The Alfred app itself can run without access to the database or the graph.
cd alfred-app
docker compose build .
# Start the service
docker compose upIf you run into package or native module issues (like better-sqlite3), rebuild without cache:
docker compose build --no-cacheNext, access the applications:
Finally, go to the settings page, click on Reset knowledge graph database. Nodes and edges for your graph will be generated from your choosen database schema. Now your Alfred, add domain infos and start asking questions.
Alfred exposes its main data access paths as tools under lib/tools/. These tools are wired into the assistant runtime via the Vercel AI SDK and Assistant UI so the model can call them directly.
Chat threads and messages are persisted through a single server-side abstraction in lib/db.ts. To swap the default SQLite database for your own (e.g. Postgres, MySQL, or a cloud database):
lib/db.ts (ThreadRecord, MessageRecord, getThreads, createThread, updateThread, deleteThread, getMessages, appendMessage, deleteMessagesByThreadId).better-sqlite3 setup and SQL statements and reimplement these functions using your preferred database client (e.g. Prisma, Drizzle, pg, Sequelize) and schema.lib/db.ts is only imported from server-side code (API routes under app/api/threads), and configure your own connection options via environment variables as needed.No changes are required in the Assistant UI integration (components/alfred/runtime-provider.tsx); once lib/db.ts is wired to your database, chat history will automatically use your personal backend.
The default schema treats all threads as belonging to user using a browser based cookie, which is sufficient for local development. For real multi-user deployments, derive a `userId` from auth in your API routes (e.g. from a session/JWT) in production, or use a fixed "local-dev" value during development.
We encourage researchers and practitioners to extend Alfred with their own innovations. Examples include:
We welcome pull requests, suggestions, and discussions about how Alfred can better serve your research or practice needs.
Alfred grew out of ongoing research on AI-based data assistants. Alfred builds on the work of the open-source community, including Next.js, React, Vercel AI SDK, Neo4j, Databricks, Radix UI, and others.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.