Use this file to discover all available pages before exploring further.
The /v1/rag/answer/agent endpoint is fully model-agnostic and multi-tenant. Every request can include an optional config object that controls which AI provider, model, and database the agent uses — enabling completely isolated per-client agents.
{ "query": "What was AWS revenue in Q4 2025?", "config": { "llm_provider": "anthropic", "llm_model": "claude-opus-4-6", "db_connection_string": "postgresql://user:pass@your-host:5432/your_db" }}
All config fields are optional. Omit the entire config object (or any field within it) to use the server defaults (OpenAI GPT-4o + the Ivory Finance Postgres database).
{ "query": "What were Tesla's gross margins in the last three quarters?", "cik": "0001318605", "config": { "llm_provider": "openai", "llm_model": "gpt-4o" }}
OpenAI is the default. If you omit the config field entirely, GPT-4o is used automatically.
{ "query": "Summarise all material risk factors disclosed by NVIDIA in their latest 10-K", "cik": "0001045810", "config": { "llm_provider": "anthropic", "llm_model": "claude-sonnet-4-6" }}
Go to Plans & Billing → Add credits. Claude API requires a paid plan.
4
Provide the key
Contact support@ivory.finance with your Anthropic API key.
It will be stored encrypted and tied to your Ivory Finance account.
API keys are sensitive credentials. Never include them in client-side code or public repositories. Always provision them server-side through the Ivory Finance support team. Keys are encrypted at rest using AES-256 and are never returned in API responses.
The web_search and news_search tools use a configurable search provider. Set config.search_provider to choose the engine, and supply config.search_api_key or config.search_custom_url when required.
Uses the Bing Web Search API v7 for web queries and Bing News Search API v7 for news queries. Requires a Microsoft Azure Cognitive Services subscription key.
{ "query": "What are the main risks for semiconductor companies in 2026?", "config": { "search_provider": "duckduckgo" }}
DuckDuckGo does not provide a commercial API. Results are fetched via the public interface and may be rate-limited under heavy usage. For production workloads, use search1api or bing.
Search1API aggregates Google, Wikipedia, arXiv, Reddit, X, Reuters, and more behind a single endpoint. It follows the custom provider contract exactly.
The query_database tool lets the agent run structured queries against your own database. This is useful when you have proprietary financial data — internal earnings models, client portfolios, custom metrics — that you want the agent to combine with SEC filing data.Pass your database connection string in config.db_connection_string. The database type is auto-detected from the URL scheme.
{ "query": "What were our top 5 client holdings by value last quarter?", "config": { "db_connection_string": "postgresql://analyst:s3cr3t@db.mycompany.com:5432/portfolio_db" }}
Ivory Finance recommends creating a read-only database user specifically for agent queries. The agent only issues SELECT statements, but defence-in-depth matters.
CREATE USER ivory_agent WITH PASSWORD 'strong_password';GRANT CONNECT ON DATABASE your_db TO ivory_agent;GRANT USAGE ON SCHEMA public TO ivory_agent;GRANT SELECT ON ALL TABLES IN SCHEMA public TO ivory_agent;
{ "query": "Show me revenue by product line for Q4 2025", "config": { "db_connection_string": "mysql://analyst:s3cr3t@db.mycompany.com:3306/financials" }}
{ "query": "What is the average days-to-close across all deals this year?", "config": { "db_connection_string": "mariadb://analyst:s3cr3t@mariadb.mycompany.com:3306/crm_db" }}
The agent automatically detects MongoDB from the mongodb:// or mongodb+srv:// prefix and switches from SQL to the JSON query format. You do not need to change anything in your query — just describe what you want in plain English.
{ "query": "What is total revenue by business unit for fiscal year 2025?", "config": { "db_connection_string": "oracle://analyst:s3cr3t@oracle.mycompany.com:1521/FINPROD" }}
SELECT business_unit, SUM(revenue) AS total_revenueFROM financial_summaryWHERE fiscal_year = 2025GROUP BY business_unitORDER BY total_revenue DESCFETCH FIRST 20 ROWS ONLY
Oracle uses FETCH FIRST N ROWS ONLY instead of LIMIT N. The agent is aware of this and generates correct Oracle SQL automatically.
Create a read-only Oracle user:
CREATE USER ivory_agent IDENTIFIED BY strong_password;GRANT CREATE SESSION TO ivory_agent;GRANT SELECT ANY TABLE TO ivory_agent;-- Or grant per-table for tighter control:GRANT SELECT ON your_schema.your_table TO ivory_agent;
The agent supports the four most common cloud data platforms in addition to traditional databases. Pass the appropriate connection string in config.db_connection_string — the type is auto-detected from the URL scheme.
{ "query": "What were our top revenue-generating products last quarter?", "config": { "db_connection_string": "snowflake://analyst:s3cr3t@xy12345.us-east-1/FINANCE_DB/PUBLIC?warehouse=COMPUTE_WH&role=ANALYST_ROLE" }}
SELECT product_name, SUM(revenue) AS total_revenueFROM FINANCE_DB.PUBLIC.sales_summaryWHERE quarter = '2025-Q4'GROUP BY product_nameORDER BY total_revenue DESCLIMIT 20
Create a read-only Snowflake role for agent access:
CREATE ROLE ivory_agent;GRANT USAGE ON WAREHOUSE compute_wh TO ROLE ivory_agent;GRANT USAGE ON DATABASE finance_db TO ROLE ivory_agent;GRANT USAGE ON SCHEMA finance_db.public TO ROLE ivory_agent;GRANT SELECT ON ALL TABLES IN SCHEMA finance_db.public TO ROLE ivory_agent;CREATE USER ivory_agent_user PASSWORD='strong_password' DEFAULT_ROLE=ivory_agent;GRANT ROLE ivory_agent TO USER ivory_agent_user;
{ "query": "Show me daily active users by region for the last 30 days", "config": { "db_connection_string": "databricks://token:dapi123abc@adb-1234567890.0.azuredatabricks.net/main?http_path=/sql/1.0/warehouses/abc123def&schema=analytics" }}
Use a service principal with CAN USE permissions on the SQL warehouse and SELECT grants on specific schemas for production workloads. Avoid using personal access tokens in shared environments.
{ "query": "What are total ad spend and attributed revenue for each campaign last month?", "config": { "db_connection_string": "redshift://analyst:s3cr3t@my-cluster.abc123.us-east-1.redshift.amazonaws.com:5439/analytics" }}
SELECT campaign_name, SUM(ad_spend) AS total_spend, SUM(attributed_revenue) AS total_revenueFROM marketing.campaignsWHERE date_trunc('month', event_date) = date_trunc('month', current_date - interval '1 month')GROUP BY campaign_nameORDER BY total_revenue DESCLIMIT 20
Create a read-only Redshift user:
CREATE USER ivory_agent WITH PASSWORD 'strong_password';GRANT USAGE ON SCHEMA analytics TO ivory_agent;GRANT SELECT ON ALL TABLES IN SCHEMA analytics TO ivory_agent;
Use Redshift Serverless or a standard provisioned cluster — both work with this connection format. For VPC-only clusters, ensure the Ivory Finance agent can reach your cluster endpoint (e.g. via VPC peering or an allow-listed IP).
SELECT customer_id, SUM(order_value) AS lifetime_valueFROM `my-gcp-project.customer_analytics.orders`GROUP BY customer_idORDER BY lifetime_value DESCLIMIT 10
In Google Cloud Console, go to IAM & Admin → Service Accounts → Create Service Account.
Name it ivory-agent.
2
Grant BigQuery Data Viewer
Assign the BigQuery Data Viewer and BigQuery Job User roles to the service account.
3
Create and download a key
Click Keys → Add Key → Create new key → JSON. Download the key file.
4
Provide the key to Ivory Finance
Contact support@ivory.finance to securely upload your service account key.
It will be stored encrypted and scoped to your account.
BigQuery queries incur per-byte scanning costs. The agent always adds LIMIT 100 to cap result size, but for very large tables consider creating materialized views or authorized views with pre-aggregated data to minimise costs.
The agent rejects any non-SELECT statement for SQL databases. MongoDB queries are restricted to find operations — insert, update, delete, drop are blocked at the driver level.
Encrypted at Rest
Connection strings stored on the Ivory Finance server are encrypted with AES-256 (Fernet). They are never logged, never returned in API responses, and never shared between accounts.
Row Cap
All database queries are capped at 100 rows. This prevents the agent from accidentally consuming large amounts of context or triggering expensive full-table scans.
Per-Request Isolation
Each request with a db_connection_string uses a fresh, short-lived connection that is closed immediately after the query. There is no connection pooling across requests.
Use a dedicated read-only database user. Never provide superuser or admin credentials. Ivory Finance enforces SELECT-only at the application layer, but having a restricted DB user is an additional layer of defence.