LlamaIndex
Dinobase provides a LlamaIndex tool spec that lets your agents query business data from 100+ SaaS APIs, databases, and files via SQL.
Install
Section titled “Install”pip install llama-index llama-index-llms-anthropic dinobaseSet up your data sources:
dinobase initdinobase add stripe --api-key sk_test_...dinobase add hubspot --api-key pat-...dinobase syncSee Connecting Sources for the full list of 100+ supported sources, and Syncing & Scheduling for background sync options.
Quick Start
Section titled “Quick Start”from llama_index.core.agent import ReActAgentfrom llama_index.llms.anthropic import Anthropicfrom integrations.llamaindex.tool_spec import DinobaseToolSpec
llm = Anthropic(model="claude-sonnet-4-6")tool_spec = DinobaseToolSpec()
agent = ReActAgent.from_tools( tool_spec.to_tool_list(), llm=llm, verbose=True,)
response = agent.chat("Which customers have overdue invoices?")print(response.response)The DinobaseToolSpec provides four tools via to_tool_list():
| Tool | Description |
|---|---|
dinobase_query | Execute SQL queries (DuckDB dialect) |
dinobase_describe | Get table schema, types, and sample data |
dinobase_list_sources | List connected sources with freshness status |
dinobase_refresh | Re-sync a stale data source |
How It Works
Section titled “How It Works”The DinobaseToolSpec extends LlamaIndex’s BaseToolSpec. Each method listed in spec_functions becomes a FunctionTool when you call to_tool_list(). The agent discovers tools via their docstrings and Annotated type hints.
The typical agent workflow:
dinobase_list_sources— discover available datadinobase_describe— understand table schemasdinobase_query— run cross-source SQL queries- Present and analyze results
Cross-source JOINs work via shared columns (email, company name, IDs). Tables are referenced as schema.table (e.g., stripe.customers, hubspot.contacts).
Example
Section titled “Example”See the example agent:
export ANTHROPIC_API_KEY=sk-ant-...python examples/react_agent.py "What deals closed this quarter?"Next steps
Section titled “Next steps”- Getting Started — Full setup walkthrough
- Connecting Sources — Add your business data
- Querying Data — SQL patterns and cross-source joins
- Syncing & Scheduling — Keep data fresh
- Schema Annotations — Add context for AI agents
- Python API Reference — QueryEngine and SyncEngine