# hanishdhanwalkar/agentware architecture

> Architecture diagram of the GitHub repository hanishdhanwalkar/agentware, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hanishdhanwalkar/agentware
- Repository: https://github.com/hanishdhanwalkar/agentware

## Overview

Agentware is a lightweight Python framework for LLM agents that can call registered tools. Its principal workflow accepts user input, stores conversation messages, sends them and available tool schemas to an LLM, executes requested tools, then asks the LLM for a final response. The repository also contains a separate Selenium-based web-surfer capability. The core agent, Ollama client, general tools, and browser code are sampled; other module paths and capabilities are included only where supported by the tree or README.

Main entry points: [`openagents/core/agent.py`](https://github.com/hanishdhanwalkar/agentware/blob/main/openagents/core/agent.py) (Agent), [`openagents/__init__.py`](https://github.com/hanishdhanwalkar/agentware/blob/main/openagents/__init__.py) (Agent factory), [`openagents/llm/ollama_me.py`](https://github.com/hanishdhanwalkar/agentware/blob/main/openagents/llm/ollama_me.py) (Ollama client), [`openagents/tools/registry.py`](https://github.com/hanishdhanwalkar/agentware/blob/main/openagents/tools/registry.py) (Tool registry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Agent orchestration"]
  node_factory["Agent factory<br/>[__init__.py]"]
  node_agent["Agent<br/>[agent.py]"]
  node_state["Conversation state<br/>[state.py]"]
end

subgraph group_models["LLM integration"]
  node_llm_registry["LLM registry<br/>[providers.py]"]
  node_llm_base["LLM interface<br/>[base.py]"]
  node_ollama["Ollama client<br/>[ollama_me.py]"]
end

subgraph group_tools["Tool system"]
  node_tool_registry["Tool registry<br/>[registry.py]"]
  node_tool["Tool definition<br/>[base.py]"]
  node_general_tools["General tools<br/>[general.py]"]
end

subgraph group_web["Web surfing"]
  node_web_surfer["WebSurfer<br/>[web_elements.py]"]
  node_web_search["Browser search<br/>[web_search.py]"]
end

node_user(("User"))
node_ollama_service(("Ollama API"))
node_browser(("Firefox browser"))
node_websites(("Websites"))

node_user -->|"submits input"| node_agent
node_factory -->|"selects provider"| node_llm_registry
node_factory -->|"creates registry"| node_tool_registry
node_factory -->|"registers tools"| node_general_tools
node_factory -->|"creates agent"| node_agent
node_agent -->|"stores messages"| node_state
node_agent -->|"lists and retrieves"| node_tool_registry
node_agent -->|"requests responses"| node_llm_base
node_agent -->|"executes selected tool"| node_tool
node_agent -->|"returns response"| node_user
node_llm_registry -->|"selects implementation"| node_ollama
node_ollama -->|"sends chat request"| node_ollama_service
node_ollama_service -->|"returns response"| node_ollama
node_ollama -->|"implements interface"| node_llm_base
node_tool_registry -->|"stores and retrieves"| node_tool
node_general_tools -->|"provides tools"| node_tool
node_web_surfer -->|"controls browser"| node_browser
node_web_search -->|"navigates and searches"| node_browser
node_web_search -->|"searches pages"| node_websites

click node_factory "https://github.com/hanishdhanwalkar/agentware/blob/main/openagents/__init__.py"
click node_agent "https://github.com/hanishdhanwalkar/agentware/blob/main/openagents/core/agent.py"
click node_state "https://github.com/hanishdhanwalkar/agentware/blob/main/openagents/core/state.py"
click node_llm_registry "https://github.com/hanishdhanwalkar/agentware/blob/main/openagents/llm/providers.py"
click node_llm_base "https://github.com/hanishdhanwalkar/agentware/blob/main/openagents/llm/base.py"
click node_ollama "https://github.com/hanishdhanwalkar/agentware/blob/main/openagents/llm/ollama_me.py"
click node_tool_registry "https://github.com/hanishdhanwalkar/agentware/blob/main/openagents/tools/registry.py"
click node_tool "https://github.com/hanishdhanwalkar/agentware/blob/main/openagents/tools/base.py"
click node_general_tools "https://github.com/hanishdhanwalkar/agentware/blob/main/openagents/tools/general.py"
click node_web_surfer "https://github.com/hanishdhanwalkar/agentware/blob/main/websurfer/web_elements.py"
click node_web_search "https://github.com/hanishdhanwalkar/agentware/blob/main/websurfer/web_search.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_factory,node_agent,node_state,node_user,node_browser toneBlue
class node_llm_registry,node_llm_base,node_ollama toneAmber
class node_tool_registry,node_tool,node_general_tools,node_ollama_service toneMint
class node_web_surfer,node_web_search toneRose
class node_websites toneIndigo
```

## Components

### Agent orchestration

- [Agent factory](https://github.com/hanishdhanwalkar/agentware/blob/main/openagents/__init__.py): `openagents/__init__.py`
- [Agent](https://github.com/hanishdhanwalkar/agentware/blob/main/openagents/core/agent.py): `openagents/core/agent.py`
- [Conversation state](https://github.com/hanishdhanwalkar/agentware/blob/main/openagents/core/state.py): `openagents/core/state.py`

### LLM integration

- [LLM registry](https://github.com/hanishdhanwalkar/agentware/blob/main/openagents/llm/providers.py): `openagents/llm/providers.py`
- [LLM interface](https://github.com/hanishdhanwalkar/agentware/blob/main/openagents/llm/base.py): `openagents/llm/base.py`
- [Ollama client](https://github.com/hanishdhanwalkar/agentware/blob/main/openagents/llm/ollama_me.py): `openagents/llm/ollama_me.py`

### Tool system

- [Tool registry](https://github.com/hanishdhanwalkar/agentware/blob/main/openagents/tools/registry.py): `openagents/tools/registry.py`
- [Tool definition](https://github.com/hanishdhanwalkar/agentware/blob/main/openagents/tools/base.py): `openagents/tools/base.py`
- [General tools](https://github.com/hanishdhanwalkar/agentware/blob/main/openagents/tools/general.py): `openagents/tools/general.py`

### Web surfing

- [WebSurfer](https://github.com/hanishdhanwalkar/agentware/blob/main/websurfer/web_elements.py): `websurfer/web_elements.py`
- [Browser search](https://github.com/hanishdhanwalkar/agentware/blob/main/websurfer/web_search.py): `websurfer/web_search.py`

### Other components

- **User**
- **Ollama API**
- **Firefox browser**
- **Websites**

## Connections

- User → Agent: submits input
- Agent factory → LLM registry: selects provider
- Agent factory → Tool registry: creates registry
- Agent factory → General tools: registers tools
- Agent factory → Agent: creates agent
- Agent → Conversation state: stores messages
- Agent → Tool registry: lists and retrieves
- Agent → LLM interface: requests responses
- Agent → Tool definition: executes selected tool
- Agent → User: returns response
- LLM registry → Ollama client: selects implementation
- Ollama client → Ollama API: sends chat request
- Ollama API → Ollama client: returns response
- Ollama client → LLM interface: implements interface
- Tool registry → Tool definition: stores and retrieves
- General tools → Tool definition: provides tools
- WebSurfer → Firefox browser: controls browser
- Browser search → Firefox browser: navigates and searches
- Browser search → Websites: searches pages
