PRD-35: Tool Catalog & Registry Architecture

Version: 2.0 Status: 🟡 Design Phase Priority: HIGH - Core Platform Architecture Author: Automatos AI Platform Team Last Updated: 2026-01-17 Dependencies: PRD-33 (MCP Gateway Integration), PRD-34 (Unified Integrations Adapter), PRD-18 (Credential Management)


Executive Summary

This PRD defines a production-grade architecture for tool discovery, catalog, assignment, and execution across the Automatos platform. The architecture supports three consumer types:

  1. Automatos UI Users (Hosted Mode) - Agents, Chat, Workflows with stored credentials

  2. Widgets (BYO Mode) - Embedded experiences with bring-your-own credentials

  3. Third-Party Integrations (BYO Mode) - API access with bring-your-own credentials

Key Principles:

  • Adapter owns tool definitions (single source of truth)

  • Context Forge is the unified MCP gateway (single entry point)

  • Automatos owns enablement, assignments, and credentials

  • BYO credentials for widgets/third-parties - no credential storage for external consumers


1. Problem Statement

Current Pain

  • Tool definitions exist in multiple places (Automatos DB + Adapter DB)

  • No clear agent-tool assignment model

  • ToolRegistry is just a lookup with no access control

  • Unclear credential resolution flow between systems

  • Context Forge role not properly integrated

Desired State

  • Single source of truth for tool definitions (Adapter)

  • Clear agent-tool assignment with explicit enablement

  • 1:1 tool:credential mapping at enablement time

  • Support for both hosted credentials and BYO credentials

  • Context Forge as the unified execution gateway


2. Scope

In Scope

  • Tool catalog ownership and data flow

  • Agent-tool assignment model

  • Credential resolution (hosted vs BYO)

  • Execution via Context Forge → Adapter

  • Consumer models (Automatos, Widgets, Third-Party)

Out of Scope

  • Widget UI implementation details

  • Third-party API client libraries

  • Multi-region deployment

  • Advanced observability


3. Architecture Overview

3.1 Component Responsibilities

3.2 Consumer Model

3.3 Full Architecture Diagram


4. Data Model

4.1 Data Ownership

Data
Owner
Description

Tool definitions

Adapter

Name, description, capabilities, OpenAPI URL, auth config

Tool enablement

Automatos

Which tools are enabled for which tenant

Tool:Credential mapping

Automatos

1:1 mapping when tool is enabled

Agent-tool assignments

Automatos

Which agents can use which tools

Credentials

Automatos

Encrypted storage for hosted mode

4.2 Adapter Data Model (Source of Truth)

4.3 Automatos Data Model (Enablement & Assignment)


5. Execution Flows

5.1 Tool Discovery Flow

5.2 Tool Execution (Hosted Mode - Automatos)

5.3 Tool Execution (BYO Mode - Widget/Third-Party)

5.4 Credential Resolution Callback (Hosted Mode)


6. API Contracts

6.1 Adapter APIs

6.2 Automatos APIs

6.3 Context Forge APIs


7. Tool Enablement & Assignment Flow

7.1 User Enables a Tool (Settings > Tools)

7.2 User Assigns Tool to Agent (Agent Config)

7.3 Runtime: Get Tools for Agent


8. Migration Plan

Phase 1: Data Model Updates

Phase 2: API Implementation

Phase 3: UI Updates

Phase 4: Runtime Integration


9. Security Considerations

Credential Security

  • Credentials stored encrypted in Automatos (existing)

  • BYO credentials never stored - used and discarded

  • Credential resolution requires service token authentication

  • No credentials in logs (redaction in Adapter)

Access Control

  • Tenant isolation via tenant_id in all queries

  • Agent can only use explicitly assigned tools

  • Tool must be enabled at tenant level first

  • JWT authentication at Context Forge gateway


10. Success Metrics

  • SM-1: 100% of tool executions route through CF → Adapter

  • SM-2: Agent-tool assignments enforced at runtime

  • SM-3: Credential resolution callback latency < 100ms

  • SM-4: Zero credential leakage in logs

  • SM-5: Widget BYO mode functional end-to-end


11. Open Questions (Resolved)

Question
Resolution

Should Automatos have a local tool table?

YES - for enablement/assignment only, NOT definitions

Who resolves hosted credentials?

Adapter calls back to Automatos API

Widget/Third-party auth?

JWT with tenant_id, BYO credentials

Tool:Credential mapping?

1:1 at tool enablement time (tenant_tool_config)

Agent:Tool mapping?

1:many (agent_tool_assignments), like skills


12. References

  • PRD-33: MCP Gateway Integration (Context Forge)

  • PRD-34: Unified Integrations Adapter

  • Code: automatos-ai/orchestrator/modules/tools/

  • Code: automatos-unified-adapter/src/unified_adapter/

Last updated