Get started
In about five minutes you will have your own AgentDB workspace. You will store contacts and companies, link them and query them. You do not write SQL.
This guide uses the agentdb command-line tool. Your AI agent can do the same steps over MCP. See Connect your AI.
AgentDB is in beta. Store only test data or data that is not sensitive.
#1. Sign up
- Open
https://app.agentdb.link. - Enter your email address. A project name is optional.
- Accept the terms and choose Create workspace.
AgentDB creates your account, your first workspace and an API key at once. There is no waiting list.
#2. Save your API key
The next page shows your API key. It starts with adbk..
The page shows the key only once. Choose Copy API key or Download .env and keep it in a password manager. Never paste it into a chat or commit it to git.
Lost your key? Request a recovery link at https://app.agentdb.link/recover. See Accounts and security.
#3. Install the CLI and log in
Install the CLI on macOS or Linux. It needs no Node.js.
curl -fsSL https://app.agentdb.link/downloads/cli/install.sh | shLog in. The CLI opens your browser. You approve the login there with your API key.
agentdb login --api-url https://app.agentdb.linkThe CLI keeps the key in your operating system's credential store. It never writes the key into a project file.
Scripts and CI can use two environment variables instead. AGENTDB_TOKEN holds the key. AGENTDB_WORKSPACE holds the workspace id.
#4. Define a company and a contact
An object is a type of record, like a table. A field is a typed value on that object. Read more in Concepts.
Create the company object with a unique name and a country:
agentdb schema object-create companyagentdb schema field-add company name --type text --uniqueagentdb schema field-add company country --type textCreate the contact object with an email address, a name and a score:
agentdb schema object-create contactagentdb schema field-add contact email --type email --uniqueagentdb schema field-add contact name --type textagentdb schema field-add contact score --type integerDefine how they relate. A contact works_at one company:
agentdb schema relationship-add contact works_at company --cardinality one#5. Write records
Create a company and a contact. Each command prints the new record with its id.
agentdb records create company --data '{"name":"Example Ltd","country":"NL"}'agentdb records create contact --data '{"email":"ada@example.com","name":"Ada Example","score":82}'AgentDB checks every value against its field type. A wrong value is refused with a clear error, and nothing is written.
#6. Link the records
Link the contact to the company:
agentdb records link $CONTACT works_at $COMPANYNow ask who works at the company. --incoming follows links that point at the company.
agentdb records related $COMPANY works_at --incoming#7. Query your records
Find contacts with a score of 70 or more at a company in NL:
agentdb query --json '{"object":"contact","where":{"all":[{"field":"score","op":"gte","value":70},{"relationship":"works_at","where":{"all":[{"field":"country","op":"eq","value":"NL"}]}}]},"sort":[{"field":"score","order":"desc"}],"limit":10}'The same query works over REST. Your agent sends the same JSON to the records_query tool.
curl -X POST https://app.agentdb.link/v1/workspaces/$AGENTDB_WORKSPACE/query \
-H "Authorization: Bearer $AGENTDB_TOKEN" \
-H "Content-Type: application/json" \
-d '{"object":"contact","where":{"all":[{"field":"score","op":"gte","value":70}]}}'Learn every filter and option in Query your data.
#8. Let your agent do it
Connect your AI client. See Connect your AI. Then ask in plain language, for example:
Using AgentDB, create a company object (name unique, country) and a contact object (email unique, name, score integer). A contact works_at one company. Add three fictional companies and eight fictional contacts and link them.
Using AgentDB, find contacts with score 70 or more at companies in NL, sorted by score.
Your agent works out the tool calls itself.
#Next steps
- Connect your AI to Claude, ChatGPT, Cursor or another client.
- Files and imports to attach documents and import a CSV file.
- Dashboards and sharing to show your data on a live page.