How mayurd8862/frameworkless-agent works
This is a small framework-free Python agent: a CLI conversation enters an explicit state, Gemini proposes a JSON decision, and Python validates it, detects missing tool parameters, and either asks for clarification, runs a registered tool, or returns an answer. The graph preserves the prompt, model interface, state validation, and both example tools. Edges reflect the README and sampled source; unsampled notebook and configuration files are omitted.
Main entry points: main.py Turn orchestration · call_llm.py Gemini client · tools.py Tool executor · prompt.py Agent prompt
Components 13
Agent orchestration
- CLI loop
frameworkless-agent/main.py - Turn orchestration
frameworkless-agent/main.py - Conversation state
frameworkless-agent/state.py - Response validation
frameworkless-agent/state.py
Gemini interface
- Gemini client
frameworkless-agent/call_llm.py - Agent prompt
frameworkless-agent/prompt.py
Tool runtime
- Tool registry
frameworkless-agent/tools.py - Parameter checks
frameworkless-agent/tools.py - Tool executor
frameworkless-agent/tools.py - Weather example
frameworkless-agent/tools.py - Sum example
frameworkless-agent/tools.py
Other components
- User
- Google Gemini
Connections 16
- User → CLI loop: enters request
frameworkless-agent/main.py - CLI loop → Turn orchestration: runs turn
frameworkless-agent/main.py - CLI loop → Conversation state: appends message
frameworkless-agent/main.py - Turn orchestration → Conversation state: reads and updates
frameworkless-agent/main.py - Turn orchestration → Gemini client: requests decision
frameworkless-agent/main.py - Gemini client → Agent prompt: sets instruction
frameworkless-agent/call_llm.py - Agent prompt → Tool registry: uses descriptions
frameworkless-agent/prompt.py - Gemini client → Google Gemini: sends conversation
frameworkless-agent/call_llm.py - Google Gemini → Gemini client: returns JSON
frameworkless-agent/call_llm.py - Turn orchestration → Response validation: validates response
frameworkless-agent/main.py - Turn orchestration → Parameter checks: checks required values
frameworkless-agent/main.py - Turn orchestration → Tool registry: checks tool name
frameworkless-agent/main.py - Turn orchestration → Tool executor: executes selected tool
frameworkless-agent/main.py - Tool executor → Weather example: dispatches
frameworkless-agent/tools.py - Tool executor → Sum example: dispatches
frameworkless-agent/tools.py - Turn orchestration → CLI loop: prints answer
frameworkless-agent/main.py