# mlabonne/gorilla-custom architecture

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

- Interactive diagram: https://gitdiagram.com/mlabonne/gorilla-custom
- Repository: https://github.com/mlabonne/gorilla-custom

## Overview

This repository is a collection of Gorilla-related products rather than one end-to-end application: an agent-comparison frontend, function-calling benchmarks and inference tools, OpenFunctions, GoEx, Gorilla model utilities, and RAFT. The graph preserves those distinct product branches and their principal documented capabilities. Sampled source establishes several internal calls; where only the README or file tree supports a subsystem, links are documented or marked unverified rather than presented as inspected runtime wiring.

Main entry points: [`goex/main.py`](https://github.com/mlabonne/gorilla-custom/blob/main/goex/main.py) (Action Runtime), [`berkeley-function-call-leaderboard/bfcl_eval/_llm_response_generation.py`](https://github.com/mlabonne/gorilla-custom/blob/main/berkeley-function-call-leaderboard/bfcl_eval/_llm_response_generation.py) (Response Generation), [`agent-arena/client/src/components/AgentArena.js`](https://github.com/mlabonne/gorilla-custom/blob/main/agent-arena/client/src/components/AgentArena.js) (Agent Comparison), [`agent-arena/client/src/App.js`](https://github.com/mlabonne/gorilla-custom/blob/main/agent-arena/client/src/App.js) (Arena Router)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_arena["Agent Arena"]
  node_arena_app["Arena Router<br/>[App.js]"]
  node_arena_compare["Agent Comparison<br/>[AgentArena.js]"]
  node_arena_agents["Agent Selection<br/>[AgentDropdown.js]"]
  node_arena_editor["Prompt Editor<br/>[CodeEditor.js]"]
  node_arena_output["Agent Output<br/>[AgentOutput.js]"]
  node_arena_leaderboard["ELO Leaderboard<br/>[Leaderboard.js]"]
  node_arena_users["Community Profiles<br/>[UserPrompts.js]"]
end

subgraph group_bfcl["Function Call Benchmark"]
  node_bfcl_user(("Benchmark User"))
  node_bfcl_config["Categories and Config<br/>[eval_config.py]"]
  node_bfcl_generate["Response Generation"]
  node_bfcl_handlers["Model Handlers<br/>[base_handler.py]"]
  node_bfcl_local["Local Model Serving"]
  node_bfcl_check["Result Evaluation"]
  node_bfcl_multiturn["Stateful Scenarios"]
  node_bfcl_results["Scores and Results<br/>[eval_config.py]"]
end

subgraph group_goex["Action Execution"]
  node_goex_user(("Agent or Client"))
  node_goex_server["HTTP Interface<br/>[server.py]"]
  node_goex_runtime["Action Runtime<br/>[main.py]"]
  node_goex_pipeline["Action Generation<br/>[pipeline.py]"]
  node_goex_api["API Execution<br/>[api_executor.py]"]
  node_goex_sandbox["Docker Sandbox<br/>[docker_sandbox.py]"]
  node_goex_fs["Filesystem Manager<br/>[fs_manager.py]"]
  node_goex_db["Database Manager<br/>[db_manager.py]"]
  node_goex_undo["Validation and Undo"]
  node_goex_services[("External APIs and Stores")]
end

subgraph group_gorilla["Gorilla Model Tools"]
  node_gorilla_user(("Model Developer"))
  node_gorilla_infer["Gorilla Inference<br/>[gorilla_eval.py]"]
  node_gorilla_retrieval["API Retrieval"]
  node_gorilla_eval["Model Evaluation"]
  node_gorilla_delta["Model Delta Utility<br/>[apply_delta.py]"]
end

subgraph group_openfunctions["OpenFunctions"]
  node_openfunctions_user(("Function-Calling Client"))
  node_openfunctions_hosted["Hosted Inference"]
  node_openfunctions_local["Local Inference<br/>[inference_local.py]"]
end

subgraph group_raft["RAFT"]
end

node_person(("User"))

node_person -->|"opens"| node_arena_app
node_arena_app -->|"routes to"| node_arena_compare
node_arena_compare -->|"selects agents"| node_arena_agents
node_arena_compare -->|"uses editor"| node_arena_editor
node_arena_compare -->|"renders output"| node_arena_output
node_arena_app -->|"routes to"| node_arena_leaderboard
node_arena_app -->|"routes to"| node_arena_users
node_arena_compare -.->|"submits comparisons"| node_arena_leaderboard
node_bfcl_user -->|"runs benchmark"| node_bfcl_generate
node_bfcl_generate -->|"loads settings"| node_bfcl_config
node_bfcl_generate -->|"requests inference"| node_bfcl_handlers
node_bfcl_generate -->|"starts local server"| node_bfcl_local
node_bfcl_handlers -->|"uses state utilities"| node_bfcl_multiturn
node_bfcl_generate -->|"writes responses"| node_bfcl_results
node_bfcl_generate -.->|"evaluates results"| node_bfcl_check
node_bfcl_check -.->|"checks stateful cases"| node_bfcl_multiturn
node_bfcl_config -->|"defines output paths"| node_bfcl_results
node_goex_user -->|"sends actions"| node_goex_server
node_goex_server -->|"dispatches"| node_goex_runtime
node_goex_runtime -.->|"generates actions"| node_goex_pipeline
node_goex_runtime -->|"executes API calls"| node_goex_api
node_goex_runtime -->|"runs sandbox code"| node_goex_sandbox
node_goex_runtime -->|"manages files"| node_goex_fs
node_goex_runtime -->|"executes database calls"| node_goex_db
node_goex_runtime -.->|"checks reversals"| node_goex_undo
node_goex_sandbox -.->|"confines execution"| node_goex_services
node_goex_api -.->|"calls services"| node_goex_services
node_goex_db -.->|"reads and writes"| node_goex_services
node_gorilla_user -->|"runs model"| node_gorilla_infer
node_gorilla_user -->|"evaluates model"| node_gorilla_eval
node_gorilla_eval -.->|"retrieves APIs"| node_gorilla_retrieval
node_gorilla_user -->|"prepares model"| node_gorilla_delta
node_openfunctions_user -->|"requests inference"| node_openfunctions_hosted
node_openfunctions_user -->|"runs locally"| node_openfunctions_local

click node_arena_app "https://github.com/mlabonne/gorilla-custom/blob/main/agent-arena/client/src/App.js"
click node_arena_compare "https://github.com/mlabonne/gorilla-custom/blob/main/agent-arena/client/src/components/AgentArena.js"
click node_arena_agents "https://github.com/mlabonne/gorilla-custom/blob/main/agent-arena/client/src/components/AgentDropdown.js"
click node_arena_editor "https://github.com/mlabonne/gorilla-custom/blob/main/agent-arena/client/src/components/CodeEditor.js"
click node_arena_output "https://github.com/mlabonne/gorilla-custom/blob/main/agent-arena/client/src/components/AgentOutput.js"
click node_arena_leaderboard "https://github.com/mlabonne/gorilla-custom/blob/main/agent-arena/client/src/components/Leaderboard.js"
click node_arena_users "https://github.com/mlabonne/gorilla-custom/blob/main/agent-arena/client/src/components/UserPrompts.js"
click node_bfcl_config "https://github.com/mlabonne/gorilla-custom/blob/main/berkeley-function-call-leaderboard/bfcl_eval/constants/eval_config.py"
click node_bfcl_generate "https://github.com/mlabonne/gorilla-custom/blob/main/berkeley-function-call-leaderboard/bfcl_eval/_llm_response_generation.py"
click node_bfcl_handlers "https://github.com/mlabonne/gorilla-custom/blob/main/berkeley-function-call-leaderboard/bfcl_eval/model_handler/base_handler.py"
click node_bfcl_local "https://github.com/mlabonne/gorilla-custom/blob/main/berkeley-function-call-leaderboard/bfcl_eval/model_handler/local_inference/base_oss_handler.py"
click node_bfcl_check "https://github.com/mlabonne/gorilla-custom/tree/main/berkeley-function-call-leaderboard/bfcl_eval/eval_checker"
click node_bfcl_multiturn "https://github.com/mlabonne/gorilla-custom/tree/main/berkeley-function-call-leaderboard/bfcl_eval/eval_checker/multi_turn_eval"
click node_bfcl_results "https://github.com/mlabonne/gorilla-custom/blob/main/berkeley-function-call-leaderboard/bfcl_eval/constants/eval_config.py"
click node_goex_server "https://github.com/mlabonne/gorilla-custom/blob/main/goex/server.py"
click node_goex_runtime "https://github.com/mlabonne/gorilla-custom/blob/main/goex/main.py"
click node_goex_pipeline "https://github.com/mlabonne/gorilla-custom/blob/main/goex/exec_engine/pipeline.py"
click node_goex_api "https://github.com/mlabonne/gorilla-custom/blob/main/goex/exec_engine/api_executor.py"
click node_goex_sandbox "https://github.com/mlabonne/gorilla-custom/blob/main/goex/exec_engine/docker_sandbox.py"
click node_goex_fs "https://github.com/mlabonne/gorilla-custom/blob/main/goex/exec_engine/fs_manager.py"
click node_goex_db "https://github.com/mlabonne/gorilla-custom/blob/main/goex/exec_engine/db_manager.py"
click node_goex_undo "https://github.com/mlabonne/gorilla-custom/blob/main/goex/exec_engine/negation_manager.py"
click node_gorilla_infer "https://github.com/mlabonne/gorilla-custom/blob/main/gorilla/inference/gorilla_eval.py"
click node_gorilla_retrieval "https://github.com/mlabonne/gorilla-custom/tree/main/gorilla/eval/retrievers"
click node_gorilla_eval "https://github.com/mlabonne/gorilla-custom/blob/main/gorilla/eval/get_llm_responses.py"
click node_gorilla_delta "https://github.com/mlabonne/gorilla-custom/blob/main/gorilla/inference/apply_delta.py"
click node_openfunctions_hosted "https://github.com/mlabonne/gorilla-custom/blob/main/openfunctions/inference_hosted.py"
click node_openfunctions_local "https://github.com/mlabonne/gorilla-custom/blob/main/openfunctions/inference_local.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_arena_app,node_arena_compare,node_arena_agents,node_arena_editor,node_arena_output,node_arena_leaderboard,node_arena_users,node_person toneBlue
class node_bfcl_user,node_bfcl_config,node_bfcl_generate,node_bfcl_handlers,node_bfcl_local,node_bfcl_check,node_bfcl_multiturn,node_bfcl_results toneAmber
class node_goex_user,node_goex_server,node_goex_runtime,node_goex_pipeline,node_goex_api,node_goex_sandbox,node_goex_fs,node_goex_db,node_goex_undo,node_goex_services toneMint
class node_gorilla_user,node_gorilla_infer,node_gorilla_retrieval,node_gorilla_eval,node_gorilla_delta toneRose
class node_openfunctions_user,node_openfunctions_hosted,node_openfunctions_local toneIndigo
```

## Components

### Agent Arena

- [Arena Router](https://github.com/mlabonne/gorilla-custom/blob/main/agent-arena/client/src/App.js): `agent-arena/client/src/App.js`
- [Agent Comparison](https://github.com/mlabonne/gorilla-custom/blob/main/agent-arena/client/src/components/AgentArena.js): `agent-arena/client/src/components/AgentArena.js`
- [Agent Selection](https://github.com/mlabonne/gorilla-custom/blob/main/agent-arena/client/src/components/AgentDropdown.js): `agent-arena/client/src/components/AgentDropdown.js`
- [Prompt Editor](https://github.com/mlabonne/gorilla-custom/blob/main/agent-arena/client/src/components/CodeEditor.js): `agent-arena/client/src/components/CodeEditor.js`
- [Agent Output](https://github.com/mlabonne/gorilla-custom/blob/main/agent-arena/client/src/components/AgentOutput.js): `agent-arena/client/src/components/AgentOutput.js`
- [ELO Leaderboard](https://github.com/mlabonne/gorilla-custom/blob/main/agent-arena/client/src/components/Leaderboard.js): `agent-arena/client/src/components/Leaderboard.js`
- [Community Profiles](https://github.com/mlabonne/gorilla-custom/blob/main/agent-arena/client/src/components/UserPrompts.js): `agent-arena/client/src/components/UserPrompts.js`

### Function Call Benchmark

- **Benchmark User**
- [Categories and Config](https://github.com/mlabonne/gorilla-custom/blob/main/berkeley-function-call-leaderboard/bfcl_eval/constants/eval_config.py): `berkeley-function-call-leaderboard/bfcl_eval/constants/eval_config.py`
- [Response Generation](https://github.com/mlabonne/gorilla-custom/blob/main/berkeley-function-call-leaderboard/bfcl_eval/_llm_response_generation.py): `berkeley-function-call-leaderboard/bfcl_eval/_llm_response_generation.py`
- [Model Handlers](https://github.com/mlabonne/gorilla-custom/blob/main/berkeley-function-call-leaderboard/bfcl_eval/model_handler/base_handler.py): `berkeley-function-call-leaderboard/bfcl_eval/model_handler/base_handler.py`
- [Local Model Serving](https://github.com/mlabonne/gorilla-custom/blob/main/berkeley-function-call-leaderboard/bfcl_eval/model_handler/local_inference/base_oss_handler.py): `berkeley-function-call-leaderboard/bfcl_eval/model_handler/local_inference/base_oss_handler.py`
- [Result Evaluation](https://github.com/mlabonne/gorilla-custom/tree/main/berkeley-function-call-leaderboard/bfcl_eval/eval_checker): `berkeley-function-call-leaderboard/bfcl_eval/eval_checker`
- [Stateful Scenarios](https://github.com/mlabonne/gorilla-custom/tree/main/berkeley-function-call-leaderboard/bfcl_eval/eval_checker/multi_turn_eval): `berkeley-function-call-leaderboard/bfcl_eval/eval_checker/multi_turn_eval`
- [Scores and Results](https://github.com/mlabonne/gorilla-custom/blob/main/berkeley-function-call-leaderboard/bfcl_eval/constants/eval_config.py): `berkeley-function-call-leaderboard/bfcl_eval/constants/eval_config.py`

### Action Execution

- **Agent or Client**
- [HTTP Interface](https://github.com/mlabonne/gorilla-custom/blob/main/goex/server.py): `goex/server.py`
- [Action Runtime](https://github.com/mlabonne/gorilla-custom/blob/main/goex/main.py): `goex/main.py`
- [Action Generation](https://github.com/mlabonne/gorilla-custom/blob/main/goex/exec_engine/pipeline.py): `goex/exec_engine/pipeline.py`
- [API Execution](https://github.com/mlabonne/gorilla-custom/blob/main/goex/exec_engine/api_executor.py): `goex/exec_engine/api_executor.py`
- [Docker Sandbox](https://github.com/mlabonne/gorilla-custom/blob/main/goex/exec_engine/docker_sandbox.py): `goex/exec_engine/docker_sandbox.py`
- [Filesystem Manager](https://github.com/mlabonne/gorilla-custom/blob/main/goex/exec_engine/fs_manager.py): `goex/exec_engine/fs_manager.py`
- [Database Manager](https://github.com/mlabonne/gorilla-custom/blob/main/goex/exec_engine/db_manager.py): `goex/exec_engine/db_manager.py`
- [Validation and Undo](https://github.com/mlabonne/gorilla-custom/blob/main/goex/exec_engine/negation_manager.py): `goex/exec_engine/negation_manager.py`
- **External APIs and Stores**

### Gorilla Model Tools

- **Model Developer**
- [Gorilla Inference](https://github.com/mlabonne/gorilla-custom/blob/main/gorilla/inference/gorilla_eval.py): `gorilla/inference/gorilla_eval.py`
- [API Retrieval](https://github.com/mlabonne/gorilla-custom/tree/main/gorilla/eval/retrievers): `gorilla/eval/retrievers`
- [Model Evaluation](https://github.com/mlabonne/gorilla-custom/blob/main/gorilla/eval/get_llm_responses.py): `gorilla/eval/get_llm_responses.py`
- [Model Delta Utility](https://github.com/mlabonne/gorilla-custom/blob/main/gorilla/inference/apply_delta.py): `gorilla/inference/apply_delta.py`

### OpenFunctions

- **Function-Calling Client**
- [Hosted Inference](https://github.com/mlabonne/gorilla-custom/blob/main/openfunctions/inference_hosted.py): `openfunctions/inference_hosted.py`
- [Local Inference](https://github.com/mlabonne/gorilla-custom/blob/main/openfunctions/inference_local.py): `openfunctions/inference_local.py`

### Other components

- **User**

## Connections

- User → Arena Router: opens (evidence: `agent-arena/client/src/App.js`)
- Arena Router → Agent Comparison: routes to (evidence: `agent-arena/client/src/App.js`)
- Agent Comparison → Agent Selection: selects agents (evidence: `agent-arena/client/src/components/AgentArena.js`)
- Agent Comparison → Prompt Editor: uses editor (evidence: `agent-arena/client/src/components/AgentArena.js`)
- Agent Comparison → Agent Output: renders output (evidence: `agent-arena/client/src/components/AgentArena.js`)
- Arena Router → ELO Leaderboard: routes to (evidence: `agent-arena/client/src/App.js`)
- Arena Router → Community Profiles: routes to (evidence: `agent-arena/client/src/App.js`)
- Agent Comparison → ELO Leaderboard: submits comparisons
- Benchmark User → Response Generation: runs benchmark
- Response Generation → Categories and Config: loads settings (evidence: `berkeley-function-call-leaderboard/bfcl_eval/_llm_response_generation.py`)
- Response Generation → Model Handlers: requests inference (evidence: `berkeley-function-call-leaderboard/bfcl_eval/_llm_response_generation.py`)
- Response Generation → Local Model Serving: starts local server (evidence: `berkeley-function-call-leaderboard/bfcl_eval/_llm_response_generation.py`)
- Model Handlers → Stateful Scenarios: uses state utilities (evidence: `berkeley-function-call-leaderboard/bfcl_eval/model_handler/base_handler.py`)
- Response Generation → Scores and Results: writes responses (evidence: `berkeley-function-call-leaderboard/bfcl_eval/_llm_response_generation.py`)
- Response Generation → Result Evaluation: evaluates results (evidence: `berkeley-function-call-leaderboard/bfcl_eval/_llm_response_generation.py`)
- Result Evaluation → Stateful Scenarios: checks stateful cases
- Categories and Config → Scores and Results: defines output paths (evidence: `berkeley-function-call-leaderboard/bfcl_eval/constants/eval_config.py`)
- Agent or Client → HTTP Interface: sends actions
- HTTP Interface → Action Runtime: dispatches (evidence: `goex/server.py`)
- Action Runtime → Action Generation: generates actions (evidence: `goex/main.py`)
- Action Runtime → API Execution: executes API calls (evidence: `goex/main.py`)
- Action Runtime → Docker Sandbox: runs sandbox code (evidence: `goex/main.py`)
- Action Runtime → Filesystem Manager: manages files (evidence: `goex/main.py`)
- Action Runtime → Database Manager: executes database calls (evidence: `goex/main.py`)
- Action Runtime → Validation and Undo: checks reversals
- Docker Sandbox → External APIs and Stores: confines execution
- API Execution → External APIs and Stores: calls services
- Database Manager → External APIs and Stores: reads and writes
- Model Developer → Gorilla Inference: runs model
- Model Developer → Model Evaluation: evaluates model
- Model Evaluation → API Retrieval: retrieves APIs
- Model Developer → Model Delta Utility: prepares model
- Function-Calling Client → Hosted Inference: requests inference
- Function-Calling Client → Local Inference: runs locally
