Financial Agent (MCP + RAM)

This folder contains a financial agent example built with SAS Retrieval Agent Manager (RAM). It combines structured data (the database and market tools) and unstructured retrieval (from the financial news collection) to generate client-specific daily updates.

Input to This Agent Experiment

Retrieval Settings - System Prompt

Use the Retrieval Settings page to configure a system prompt for this agent. Use the system prompt content from SYSTEM_PROMPT.txt

Tools

Configure these tools in the agent experiment:

  • Database tools (Container MCP server connected to the financial client database):
  • Finance market tools (Code MCP server):
  • Chart tools (Container MCP server):
    • See chart_generator for the container MCP server used by this agent.
    • generate_bar_chart
    • generate_line_chart
    • generate_pie_chart

Collections

Configure these collections:

  • Minimum recommendation: a daily financial news collection.
  • Recommended setting: turn on agentic retrieval.

Environment Variables (optional)

No environment variables are required for this example.

Agent-specific Configuration

Edit run.py to set the target client values:

  • CLIENT_NAME
  • CLIENT_ID

These values are used by the daily summary flow. Update the values to match your target environment and client data.

Runtime Commands

This agent supports the following commands:

  • #help: Show available commands.
  • #displayupdate: Return the latest stored daily summary.
  • #generateupdate: Generate a new daily summary and store it.

For normal user prompts, the agent delegates to the RAM LangGraph agent and returns the model response.

Automation Hook (Optional)

The init(client) function in run.py is intended for scheduled RAM automation. When triggered, it generates and stores the daily summary.


Back to top

Open source under the Apache License 2.0. Provided AS IS, without warranties, responsibility, or support from SAS except where applicable law requires otherwise.