Concepts

The Hub

The Hub is the folder behind every Hubzoid agent. It holds the instructions, knowledge, skills and tools that chat, workflows and connected assistants share.

A Hub is a folder, usually in Git, that holds what one agent needs to do its work: instructions, knowledge, skills, sub-agents and the tools it may call. Every surface that uses the Hub, from chat to scheduled work and assistants connected over MCP, builds on the same files, so you provide context once.

Why it matters

Context takes effort to build. Without a Hub it ends up copied into prompts, chat histories and tool settings, and each copy drifts. With a Hub, a rule changes in one file and every surface uses the new rule.

"Provide context once" does not mean everyone sees everything. Each surface keeps its own history and access rules, and restricted tools run only for the people and workflows granted them.

The smallest Hub

hubzoid init my-hub writes a starter for Kestrel & Oak, a fictional home-goods shop. Two files do most of the work. The instructions:

my-hub/AGENTS.md
---
description: A starter assistant for Kestrel & Oak, a fictional home-goods shop. Make it yours.
suggestions:
  - A customer wants a refund 40 days after delivery. What can we offer?
  - Who has to approve a $650 order?
  - When is support open?
---

You are the team assistant for Kestrel & Oak, a fictional home-goods shop
used as Hubzoid's starter. Answer from the files in `knowledge/` and name the
file you used. If they do not answer the question, say so instead of
guessing. Keep answers short.

And the knowledge it answers from:

my-hub/knowledge/house-rules.md
# House rules

- **Refunds.** A customer can return an unused item within 30 days of
  delivery for a full refund. After 30 days we offer store credit or a
  repair, not a refund.
- **Large orders.** An order over $500 needs a manager's approval before it
  ships.
- **Support hours.** Support answers from 09:00 to 18:00 UTC, Monday to Friday.

Ask about a refund 40 days after delivery and the agent reads house-rules.md, answers that store credit or a repair is possible, and names the file. Change the rule in the file and the answer changes, in chat, in scheduled work and in Claude Code alike. Project structure lists every file the starter writes.

Video lesson 2 · 3:15Knowledge and skills: how AI agents use your business knowledgeGive an agent the right knowledge and procedure for a task.

What a Hub holds

Read as one agent, a Hub is a definition with two sides: what the agent knows and what it can reach. Hubzoid supplies the surfaces and services around it.

What it knows

  • Knowledge

    knowledge/raw_data/

    Reference documents read on demand, and raw material searched as text.

  • Skills

    skills/

    Procedures loaded when a request matches their description.

Definition

AGENTS.mdagents/

Who the agent serves, its job and its rules, plus any sub-agents.

What it can reach

  • Tools

    tools_local/

    Your Python functions, beside the built-in tools.

  • Connections

    connectors/restricted/

    Live systems through MCP servers, and restricted tools that run only with a permission.

What Hubzoid provides

Surfaces
  • Web app
  • Your own app
  • Slack
  • WhatsApp
  • Telegram
  • OpenAI-compatible API
  • MCP
  • Webhooks
Services
  • Built-in tools
  • Workflow engine
  • Sign-in and grants
  • Activity log
  • Settings
  • Evals
The four parts of an agent around its definition, on the services every Hub gets.
Every part, its files and how it reaches the agent
PartFilesHow it reaches the agent
InstructionsAGENTS.mdThe body is the system prompt for every run.
Knowledgeknowledge/**/*.mdListed by name and description in the system prompt. Read in full with read_knowledge when relevant.
Skillsskills/*.md, skills/<name>/SKILL.mdListed in the system prompt. Loaded with load_skill when a request matches.
Sub-agentsagents/*.md, agents/<name>/AGENTS.mdLoaded as skills, or called as delegates on their own model.
ToolsBuilt-in tools, tools_local/*.py, connectors/.mcp.jsonOffered to the model as callable tools.
Restricted toolsrestricted/*.pyOffered only to callers with the matching permission. Checked again at call time.
Unstructured dataraw_data/Searched with grep_data and read with read_file.
Recurring workschedule/*.md, workflows/<name>/*.pyRun on the workflow engine with the same context.
Quality checksevals/*.mdRun against the same agent with hubzoid eval run.
Sender lookupidentity/access.pyOptional. Names WhatsApp and Telegram senders whose numbers are not recorded in Settings. Grants nothing.

How it works

Chat uses the agent the bridge builds from the Hub folder when it starts. Scheduled tasks and hub.call_agent build it again for each run, so they pick up edits without a restart. hubzoid reload my-hub checks the folder and restarts a running Hub so every change takes effect.

  1. AGENTS.md body
  2. Runtime addendum
  3. Tool registry
  4. Access guard
  5. Model call
What the model receives, in order.

Knowledge and skill bodies are not in the system prompt. The model sees the menus and loads what it needs, which keeps prompts small as a Hub grows.

What each part of the prompt and tool list contains
  1. Instructions. The AGENTS.md body is the start of the system prompt.
  2. Runtime addendum. Hubzoid appends the Hub name, runtime, model and date, the menu of knowledge documents and skills (name and description only), any delegates, and short guidance on using tools. Set auto_addendum: false in the AGENTS.md frontmatter to send the body alone.
  3. Tool registry. Built-in tools, then your tools_local/ tools (a local tool with a built-in's name replaces it), then restricted tools, which win any name conflict. MCP servers from connectors/.mcp.json join beside them.
  4. Access guard. Each restricted tool is wrapped so that a caller without the permission does not see it and is refused if they call it anyway, with the decision recorded.
  5. The turn itself. The conversation arrives as the prompt. In the web app, the person's own notes come first. With claude-local and codex-local, Hubzoid also names the signed-in person, so the model does not mistake the CLI's login for the user.

Instructions

AGENTS.md is written for the model: who it serves, what it is responsible for, how to use the Hub's knowledge and tools, and what to refuse. Keep facts that change in knowledge/ and procedures in skills/, and point to them by name. Design an agent shows how to write them.

Knowledge

A knowledge document is Markdown with optional name and description frontmatter. The description is what the model sees in the menu, so write it as a statement of when the document is useful. Every *.md under knowledge/ is loaded, subfolders included, and the name defaults to the file name.

When edits take effect, raw data and personal sources

read_knowledge and list_knowledge read the folder from disk on every call, so an edited document is used by the next call. The menu in the chat agent's system prompt refreshes when the Hub restarts.

Use knowledge/ for reference material the agent should read and quote. Use raw_data/ for large or unedited material, such as exports and code checkouts, that the agent should search with grep_data rather than read whole. People can also keep their own collections of files and pages under Settings → Sources, which the agent searches with search_sources and cites. See memory and history.

Skills

A skill is a named procedure with a name and a description. The model loads it with load_skill(name) when a request matches the description, then follows it. A name defined in an earlier place wins:

  1. skills/ in the Hub.
  2. Sub-agents in agents/ that run as skills.
  3. Skills shipped with Hubzoid, such as dashboard, which builds a single-file HTML dashboard in chat.

Tools

Every Hub has built-in tools. tools_local/ adds your own Python tools, connectors/.mcp.json adds MCP servers, and administrators can add connectors that each person connects with their own account.

Where tools come from

  • Built-in tools

    Files, knowledge, sources, skills, search, the web, workflows, reports and access.

  • Your tools

    tools_local/*.py

    A tool with the name of a built-in replaces it.

  • Restricted tools

    restricted/*.py

    Wrapped in the access guard. They win any name conflict.

One tool registry

Name, description, arguments and code, written once.

How each caller sees it

  • OpenAI Agents SDK

    Function tools on the agent.

  • Claude Agent SDK

    mcp__hubzoid__<name>

    One in-process MCP server.

  • Local Codex

    Dynamic tools that Hubzoid runs for Codex.

  • Connected assistants

    /mcp

    The same tools without the chat-only ones, the memory tools, call_jev and delegates.

Beside the registry

connectors/.mcp.jsonHUBZOID_BROWSERmcp__my_<id>__<tool>

MCP servers, the shared browser and connectors added in Settings, used by the Hub agent in chat, tasks, workflows and evals. They are not passed on to connected assistants.

Registry tools run inside the bridge process, where the access guard checks every restricted call.

The model only ever asks for a tool. Architecture follows one call through the bridge. The built-in tools reference lists every argument and limit. Tools and connectors shows how to write a local tool and add an MCP server or a connector.

The built-in tools by group

The built-in tools fall into a few groups:

  • Files, knowledge and skills: read_file, list_files, list_knowledge, read_knowledge, search_sources, list_skills, load_skill and grep_data. File tools stay inside the Hub folder and refuse private paths such as restricted/, .hubzoid/ and .env files.
  • Chat files and the web: write_artifact, read_upload, http_get, web_search and current_time.
  • Memory: save_memory and remove_memory for a person's own notes, and remember and propose_hub_change for shared changes when in-app editing is on.
  • Workflows, reports and schedules: run_workflow, my_reports, repeat_request, schedule_workflow and their companions, each for people who hold the matching capability.
  • Access: who_has_access, explain_access, propose_access_change and their companions, for people with Manage access from chat.
  • Scheduled tasks only: run_git, write_hub_file, and publish_artifact and send_email when the task opts in.

Restricted tools

Put a tool in restricted/ when only some people or workflows should run it. The file name is the permission: every tool in restricted/ledger.py needs the ledger permission. Hubzoid enforces this in code, outside the model. Grants are made in Settings or with hubzoid grant. See restrict a tool.

How restricted tools are checked, hidden, recorded and given secrets
  • Every call is checked when it runs, on all three runtimes and over MCP, and refused unless the caller holds the permission on a surface allowed to reach restricted tools.
  • The tool is also hidden from callers who lack the permission.
  • Every allow and deny decision is recorded before the call runs. A call whose decision cannot be recorded does not run.
  • Secrets for these tools go in restricted/.env. They are loaded into the process environment, and the agent's file tools cannot read the folder.

The same Hub on every surface

SurfaceWhat it uses from the Hub
Chat (web app, your own app, Slack, WhatsApp, Telegram, API)The full agent: instructions, menus, all tools the person may use, delegates and the shipped skills.
Markdown tasksThe same agent and model, plus tools that exist only for scheduled runs: run_git, write_hub_file for the paths the task declares, and publish_artifact and send_email when the task opts in.
Code workflowshub.call_agent runs the full agent as the run's account. hub.call_llm is one model call with no tools and no Hub instructions.
MCP clientsThe tools the person may use, including the knowledge and skill tools and their reports, without the chat-only tools, the memory and hub change tools, call_jev and delegates. The AGENTS.md body arrives as server instructions, and the client's own model does the reasoning.

Scoping a Hub

A Hub can serve one product, one team or a whole company. Scope it by the context and access that belong together:

  • One Hub per team or function when each team has its own knowledge, tools and people, for example finance and operations.
  • One Hub per product when several teams need the same product knowledge and tools.
  • One company Hub for shared questions such as policies, alongside team Hubs for sensitive work.

Each Hub is independent: its own .env and model, knowledge, tools, schedules and conversations. Its folder name is its access domain, so permissions granted in one Hub do not apply in another.

To run several Hubs behind one sign-in and one web app, list them:

Terminal
hubzoid run ./finance ./operations ./company

To keep that list, write it under hubs: in a hubzoid.yaml in the folder that holds the Hub folders, and run plain hubzoid run there. People sign in once and see only the agents they are granted. See running several Hubs.

Choose which cookies Hubzoid can use. You can change this at any time from Cookie settings in the footer. Read the Cookie Policy for details.