How mehta-amit-codes/agentic-guardrails works
This is a reference ReAct agent service with a Streamlit monitoring interface. A user submits a task through the UI or API; the agent reasons with Grok, selects tools, applies guardrails and budget limits, records traces, and returns a final or partial result. Separate capabilities support run-history browsing, replay, and adversarial guardrail checks. The README documents the module layout and relationships, but the supplied file tree contains only README.md and no source excerpts, so repository-node paths are left null and the graph follows documented behavior only.
Components 18
User interfaces
- Streamlit UI
- FastAPI
Agent runtime
- ReAct agent
- Tool dispatcher
- Calculator
- Web search
- Final answer tool
Guardrails and limits
- Injection scanning
- Output validation
- PII redaction
- Budget and breaker
Trace and evaluation
- Replay service
- Red-team suite
- Trace service
- SQLite trace store
Other components
- User
- Grok API
- DuckDuckGo API
Connections 22
- User → Streamlit UI: submits tasks
- User → FastAPI: calls endpoints
- Streamlit UI → FastAPI: calls API
- FastAPI → ReAct agent: runs task
- ReAct agent → Grok API: requests reasoning
- ReAct agent → Tool dispatcher: dispatches calls
- Tool dispatcher → Calculator: dispatches calculation
- Tool dispatcher → Web search: dispatches search
- Tool dispatcher → Final answer tool: dispatches answer
- Web search → DuckDuckGo API: queries
- ReAct agent → Injection scanning: scans arguments and output
- ReAct agent → Output validation: validates tool output
- ReAct agent → PII redaction: redacts output
- ReAct agent → Budget and breaker: records usage and checks limits
- ReAct agent → Trace service: records spans
- Trace service → SQLite trace store: stores runs and spans
- FastAPI → Trace service: reads run history
- FastAPI → Replay service: starts replay
- Replay service → ReAct agent: reruns task
- FastAPI → Red-team suite: starts adversarial checks
- Red-team suite → ReAct agent: runs test tasks
- Streamlit UI → FastAPI: requests trace data