From cd0888dc3396f29aba083b8119a6fa1262fe6dcd Mon Sep 17 00:00:00 2001 From: Jiang Bohan Date: Sat, 31 Jan 2026 02:06:01 +0800 Subject: [PATCH] docs(tools): add Agent Profile integration section Add architecture diagram showing Hub-Agent-Client relationship and document how Profile config.json integrates with tools configuration. Mark Phase 2 as complete. Co-Authored-By: Claude Opus 4.5 --- src/agent/tools/README.md | 59 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 56 insertions(+), 3 deletions(-) diff --git a/src/agent/tools/README.md b/src/agent/tools/README.md index 76df8cf0..121a16b8 100644 --- a/src/agent/tools/README.md +++ b/src/agent/tools/README.md @@ -268,6 +268,60 @@ Run the policy system tests: npx tsx src/agent/tools/policy.test.ts ``` +## Agent Profile Integration + +Tools configuration can be defined in Agent Profile's `config.json`, allowing different agents to have different tool capabilities: + +``` +┌─────────────────────────────────────────────────────────────────┐ +│ Super Multica Hub │ +│ │ +│ ┌───────────┐ ┌───────────┐ ┌───────────┐ │ +│ │ Agent A │ │ Agent B │ │ Agent C │ │ +│ │ Profile: │ │ Profile: │ │ Profile: │ │ +│ │ coder │ │ reviewer │ │ devops │ │ +│ │ │ │ │ │ │ │ +│ │ tools: │ │ tools: │ │ tools: │ │ +│ │ coding │ │ minimal │ │ full │ │ +│ └─────┬─────┘ └─────┬─────┘ └─────┬─────┘ │ +│ │ │ │ │ +└─────────┼────────────────┼────────────────┼─────────────────────┘ + │ │ │ + ▼ ▼ ▼ + ┌──────────┐ ┌──────────┐ ┌──────────┐ + │ Client │ │ Client │ │ Client │ + └──────────┘ └──────────┘ └──────────┘ +``` + +Each Agent's Profile can define its own tools configuration in `config.json`: + +```json +{ + "tools": { + "profile": "coding", + "deny": ["exec"] + }, + "provider": "anthropic", + "model": "claude-sonnet-4-20250514" +} +``` + +See [Profile README](../profile/README.md) for full documentation. + +### Config Priority + +When both Profile config and CLI options are provided: + +1. **Profile `config.json`** - Base configuration +2. **CLI options** - Override/extend profile settings + +```bash +# Profile has tools.profile = "coding" +# CLI adds --tools-deny exec +# Result: coding profile without exec tool +pnpm agent:cli --profile my-agent --tools-deny exec "list files" +``` + ## Roadmap ### Phase 1: Infrastructure (Done) @@ -276,9 +330,8 @@ npx tsx src/agent/tools/policy.test.ts - [x] CLI support (`--tools-profile`, `--tools-allow`, `--tools-deny`) - [x] Tools inspection CLI (`pnpm tools:cli`) -### Phase 2: Config File Support -- [ ] `multica.json` tools section - configure tools via project config file -- [ ] Agent Profile tools integration - default tools config per profile +### Phase 2: Config File Support (Done) +- [x] Agent Profile tools integration - default tools config per profile ### Phase 3: Core Tools - [ ] Browser tool - simplified web automation (screenshot, click, type)