Skip to content

An interactive console-based Bank Agent System built with Python, the OpenAI Agents SDK, and Gemini API. It manages authentication, deposits, and withdrawals using multiple specialized agents with guardrails and secure context handling.

Notifications You must be signed in to change notification settings

HasnainDevMaster/Bank_Agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ’³ Bank Agent System

A multi-agent, guardrail-enforced banking assistant system built using the OpenAI Agents SDK and Gemini API. This interactive console app authenticates users and delegates banking requests (withdrawals, deposits) to specialized sub-agents, while enforcing both input and output safety checks.


πŸš€ Features

  • Agentic Architecture: Modular agents for authentication, deposits, and withdrawals
  • Guardrails: Input/Output guardrail agents prevent unauthorized access and sensitive data leakage
  • Tool Integration: Leverages function tools for structured banking operations
  • Context Propagation: Authenticated user state is preserved throughout the session
  • Gemini API Integration: Powers the conversational models behind agents

🧠 Architecture Overview

+----------------------------+
|        Bank Agent         |   <-- Entry point
+----------------------------+
      |      |      |
      |      |      |
      v      v      v
Auth Tool Withdraw Deposit 
            Agent   Agent
        (Tool + Guardrail)
  • Bank Agent orchestrates authentication and request routing
  • Sub-agents handle transaction-specific tasks with proper output validation
  • Guardrails ensure safe execution and appropriate responses

πŸ”’ Guardrails

βœ… Input Guardrail

Checks if the user is authenticated or if authentication credentials are present. Blocks requests from unauthenticated users.

βœ… Output Guardrail

Validates the final response to prevent leakage of sensitive data such as PINs or raw account details.


🧰 Tools Used

Tool Name Description
authenticate_user Verifies name, account number, and PIN
cash_deposit Handles deposit requests
cash_withdraw Handles withdrawal requests

🏦 Usage Flow

  1. Enter your name, account number, and PIN to authenticate.
  2. Once authenticated, submit requests such as:
    • "I want to deposit cash"
    • "Withdraw 500"
  3. Agent executes relevant tools and prints the result.
  4. Type 'exit' to leave the session.

About

An interactive console-based Bank Agent System built with Python, the OpenAI Agents SDK, and Gemini API. It manages authentication, deposits, and withdrawals using multiple specialized agents with guardrails and secure context handling.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages