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.
What Astra can do
Section titled “What Astra can do”Astra has access to a registry of tools — small typed functions that read or modify your portfolio. The tools fall into two categories:
| Category | Examples | Behavior |
|---|---|---|
| Read-only | list_holdings, get_entry_details, compute_concentration, get_recent_transactions | Returns data inline in chat; no confirmation needed |
| Mutating | add_portfolio_entry, edit_entry, delete_entry, add_transaction | Astra 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.
Example prompts
Section titled “Example prompts”Analytics
Section titled “Analytics”- “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.
Scenario modeling
Section titled “Scenario modeling”- “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.
Portfolio mutations
Section titled “Portfolio mutations”- “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.
Bulk transaction import
Section titled “Bulk transaction import”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.
The confirmation flow
Section titled “The confirmation flow”Mechanically:
- Your message arrives at the backend
- The LLM (currently Nvidia Nemotron via OpenRouter) decides which tool(s) to call
- For mutating tools, the backend persists a
PendingToolCallrow and returns the proposal to the UI - The UI renders the ToolCallCard — “Add this entry?” / “Delete this transaction?”
- You click Confirm → the tool actually runs and the action is logged
- You click Cancel → the pending row is discarded, no audit log entry
Audit trail
Section titled “Audit trail”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.
Privacy and data scope
Section titled “Privacy and data scope”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.
When Astra is the wrong tool
Section titled “When Astra is the wrong tool”- 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.
Disabling Astra
Section titled “Disabling Astra”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.
What’s next
Section titled “What’s next”- 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