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.
- 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
+----------------------------+
| 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
Checks if the user is authenticated or if authentication credentials are present. Blocks requests from unauthenticated users.
Validates the final response to prevent leakage of sensitive data such as PINs or raw account details.
| Tool Name | Description |
|---|---|
authenticate_user |
Verifies name, account number, and PIN |
cash_deposit |
Handles deposit requests |
cash_withdraw |
Handles withdrawal requests |
- Enter your name, account number, and PIN to authenticate.
- Once authenticated, submit requests such as:
"I want to deposit cash""Withdraw 500"
- Agent executes relevant tools and prints the result.
- Type
'exit'to leave the session.