Skip to content

Astra AI Agent

Astra is the AI chat agent at agnifolio.com/portfolio-discuss. Astra has read-only access to your portfolio data and can also propose mutations — adding entries, editing transactions, deleting holdings — that you confirm before they execute. Every action is logged in an audit trail.

Astra has access to a registry of tools — small typed functions that read or modify your portfolio. The tools fall into two categories:

CategoryExamplesBehavior
Read-onlylist_holdings, get_entry_details, compute_concentration, get_recent_transactionsReturns data inline in chat; no confirmation needed
Mutatingadd_portfolio_entry, edit_entry, delete_entry, add_transactionAstra proposes the action as a card; you confirm before it executes

The split is the safety primitive: Astra can investigate freely, but anything that changes your portfolio requires explicit approval.

  • “What’s my total exposure to US tech?”
  • “Show me dividend income for FY 2025–26 broken down by holding”
  • “Which positions have lost more than 10% from cost basis?”
  • “If I sell all my INR positions, what’s my net realised gain in USD?”

Astra runs the right read-only tools, fetches data, and returns a structured answer inline. No mutation, no confirmation.

  • “If I sell my entire RELIANCE position at today’s price, how does my net worth change?”
  • “Simulate adding 10 BTC at current price — what does that do to my crypto allocation?”

These produce hypothetical previews without modifying actual holdings.

  • “Add 50 shares of HDFCBANK at ₹1,520 to my Zerodha account”
  • “Record a $200 dividend on AAPL from today”
  • “Delete the duplicate TCS entry in my Groww account”

Astra proposes the action as a ToolCallCard — a confirmation widget showing exactly what will happen. Click Confirm and it executes. Click Cancel and nothing changes.

Paste a broker statement (PDF text, CSV, or plain-text rows) into the chat:

“Here’s my Zerodha contract note for last quarter — please add these transactions”

[paste statement text]

Astra parses every row, maps tickers to your existing entries, and proposes the transactions as a batch card. Review, edit individual rows if needed, then confirm to add them all.

Mechanically:

  1. Your message arrives at the backend
  2. The LLM (currently Nvidia Nemotron via OpenRouter) decides which tool(s) to call
  3. For mutating tools, the backend persists a PendingToolCall row and returns the proposal to the UI
  4. The UI renders the ToolCallCard — “Add this entry?” / “Delete this transaction?”
  5. You click Confirm → the tool actually runs and the action is logged
  6. You click Cancel → the pending row is discarded, no audit log entry

Every tool execution writes a row to the agent_audit_log table. Visible to you (and to admin telemetry) in the Astra AI card on the Admin Dashboard (admin users only).

Each entry records: timestamp, tool name, input parameters, result, whether it was confirmed, and how long it took.

Astra’s tools are per-user scoped at the database level — your data never leaks across users. Tool implementations use repository.findByIdAndUser(id, user) patterns, and cross-user attack surface is tested in the backend’s AgentSecurityTest suite.

The LLM call itself goes to OpenRouter, which routes to Nvidia Nemotron (configurable in admin settings). Your data is sent as context for the current chat session and is not retained by the model provider beyond that session.

  • Real-time price quotes — Astra reads cached daily prices, not the live tape. Use your broker’s app for execution-time prices.
  • Tax filings — Astra can summarise realised gains but isn’t a tax advisor. Export the data and consult a CPA.
  • Multi-step “do X then Y then Z” automations — Astra is per-turn; for chained workflows, the dedicated UI flows are faster.

Astra is feature-flagged. The backend property app.features.astra.agent.enabled=false falls back to a simpler chat that can answer questions without tool-calling. No data loss — use this for emergency rollback if needed.

  • Transactions — Astra is the fastest way to record many transactions at once via bulk import
  • Portfolio Insights — the static view; Astra is the dynamic Q&A surface
  • Wealth Legacy Planning — Astra can help you build out nominee records, but the legacy transfer itself is a separate background system