Skip to main content
This guide walks you through building an AI onboarding agent with full institutional memory powered by HydraDB. Unlike a generic chatbot, this agent answers questions from your actual company documents - ADRs, org charts, meeting notes, and product specs. New hires get real context, not hallucinated guesses.
Note: All code in this guide uses the official HydraDB Python SDK. Install it with pip install hydradb-sdk. Base URL: https://api.hydradb.com. Get your API key at app.hydradb.com.
Goal: Build an agent that ingests company knowledge, stores per-hire memory, and answers onboarding questions like “why did we choose Postgres?” and “who owns the payments service?” with cited answers from real company documents.

Why Standard Onboarding Fails

The average new hire takes 3–6 months to become fully productive. Most of that lag is not about skill - it is about context. They do not know why the auth service is built the way it is. They do not know who to ask about the data pipeline. They do not know that the pricing model changed in Q3 because of a specific customer situation. That context exists somewhere - in Confluence pages, Slack threads, decision logs, and the heads of senior engineers - but it is completely inaccessible to someone who just joined. HydraDB fixes this with two capabilities:
  1. Company knowledge graph - decision logs, org charts, meeting notes, and product specs are ingested into a shared collection. HydraDB links “the auth service” mentioned in a meeting note to the ADR that justified the architecture and the engineer who owns it. A new hire asking “why is auth built this way?” gets all three sources in one answer.
  2. Per-hire memory - every new hire gets their own memory profile via collection. Questions they ask, milestones they complete, and team relationships they build are stored and used to personalize future answers.

Architecture Overview

  • Phase 0: Install SDK, create a database, upload one document, run the first search query.
  • Phase 1: Upload all four knowledge types - ADRs, org chart, product specs, meeting notes.
  • Phase 2: Store per-hire memory and build the manager dashboard.

What You’ll Build

By the end of this cookbook, you’ll be able to:
  • Ingest company ADRs, org charts, meeting notes, and product specs into a shared HydraDB knowledge base
  • Verify indexing before running search queries so new hires always get answers from complete data
  • Answer onboarding questions like “why did we choose Postgres?” and “who owns the payments service?” with cited answers from real documents
  • Store per-hire memory so the agent personalizes responses as each hire progresses through onboarding
  • Build a manager dashboard that surfaces patterns across all new hires’ questions

Phase 0 - Minimal Working System

10–15 minutes · Goal: upload one document and get a real answer from it
Do Phase 0 first, even if you plan to skip ahead. Every later phase assumes the database exists and indexing works.

Prerequisites

  1. A HydraDB API key
  2. Python 3.11 or 3.12 - run python --version to check. Python 3.14 shows a Pydantic compatibility warning with the SDK; use 3.11 or 3.12 for a clean experience.
  3. Install the SDK:
Create a project folder and set your API key:
Create config.py in the project root - used by every script in this guide:

Step 1 - Create a Database

One database holds all onboarding content. The free plan lets you create multiple databases; this cookbook just uses a single one - if you already have a database you want to reuse, skip creation.
Output:
Expected output:
If it fails: 403 Plan limit reached - you’ve hit your plan’s database limit. Reuse an existing DATABASE_ID, or upgrade your plan for a higher limit.

Step 2 - Upload One Document

Create a sample ADR to test with:
Expected output:
Important: Always wait for indexing before querying. HydraDB indexes asynchronously - querying immediately returns empty results with no error, which looks like a bug but is not.

Step 3 - Run Your First Query

Expected output:
If no chunks are returned, the document is still indexing. Wait 30 seconds and re-run.
Phase 0 complete. The same client.query() retrieval pattern is used in every later phase. Your application can pass returned chunks into an LLM to generate the final answer.

Phase 1 - Ingest All Company Knowledge

20–30 minutes · Goal: all four knowledge types indexed and answering real questions Four types of institutional knowledge feed the onboarding agent. All go into the shared company-context collection. Tag everything with doc_type and team metadata so new hires can scope questions - “show me engineering decisions” or “what does the product team own?”
Batch limit: Max 20 files per context.ingest() call. For large document sets, upload in batches with a 1-second sleep between them.

Step 1 - Decision Logs and ADRs

These are the most valuable documents for new hires - they explain why things are built the way they are, including options that were rejected.

Step 2 - Org Chart and People Directory

Upload a structured people directory - who owns what, who to ask about which system, reporting lines, and team responsibilities.

Step 3 - Product Specs and Roadmaps


Step 4 - Meeting Notes


After all four knowledge types are uploaded, test with questions that require pulling from multiple sources:
Expected output:
Phase 1 complete. Your onboarding agent can now answer factual and “why” questions from real company context.

Phase 2 - Per-Hire Memory and Manager Dashboard

15–20 minutes · Goal: personalized answers per hire and weekly progress reports for managers

Step 1 - Store New Hire Memory

Every new hire gets their own memory profile via collection. Store their background, milestones, and questions asked.

Use the hire’s collection for personal memory and the default company knowledge scope for source context:

Step 3 - Manager Dashboard

Generate a structured weekly progress report for any hire from their stored memory. No forms, no manual updates - data comes directly from questions asked and milestones completed.

Troubleshooting


Production Notes


API Reference

All SDK methods used in this cookbook.

client.context.ingest - key parameters

client.query - key parameters


Benchmarks

Tested across onboarding evaluations at three companies (50–200 employees, knowledge bases of 200–2,000 documents).
The 18% accuracy for decision questions from standard wiki search is structural - keyword search finds documents that mention Postgres, but cannot surface the ADR that explains why Postgres was chosen unless the hire knows to look for it. HydraDB’s context graph links the system name to the decision document automatically.

Next Steps

  1. Run phase0/create_tenant.py to create your database and verify the connection.
  2. Run phase0/upload_doc.py with the sample ADR, wait 15 seconds, then run phase0/query.py.
  3. Add your real documents with the Phase 1 scripts.
  4. Create hire profiles with phase2/memory.py as new people join.
  5. Run phase2/dashboard.py weekly to give managers visibility without manual check-ins.
The agent improves as you add more documents - each new ADR, org chart update, or meeting note adds to the knowledge HydraDB builds automatically. There is no retraining step.