# Technical Architecture

{% embed url="<https://github.com/0xdevpro/deepcore>" %}

DeepCore is built on the innovative MCP (Model-Controller-Protocol) architecture, a design pattern that enables us to build highly flexible and powerful intelligent agent systems.

<figure><img src="/files/fChXn4iIYHuirnTbXymF" alt=""><figcaption></figcaption></figure>

DeepCore's architecture consists of three main layers:

#### 1. Web3 Agent Store Layer

The top layer provides a marketplace of specialized agents for different purposes:

* **Analysis Agent** - For data analytics and insights generation
* **Trade Agent** - For executing trading strategies on various platforms
* **Media Agent** - For content creation and media interaction
* **DeepResearch Agent** - For in-depth research and knowledge discovery
* **Additional specialized agents** - Extensible for various domain-specific tasks

#### 2. DeepCore Agent Protocol Layer

The core protocol layer is where the main agent intelligence and orchestration happens:

**Service Components**

* **MCP Service** - Implements the Model-Controller-Protocol pattern
* **SSE (Server-Sent Events)** - Provides real-time communication
* **CMD** - Command interface for agent control
* **HTTP Service** - RESTful API endpoints for integrations
* **OpenAPIs** - Standardized API interfaces for external connectivity
* **SDKs** - Software Development Kits for various programming languages

**Agent Orchestration**

* **Planner Agent** - Central coordinator that breaks down complex tasks
* **TaskAgents** - Specialized agents that execute specific subtasks
* **Tools Integration** - Various tool categories available to agents:
  * **CodeAct** - For code generation and execution
  * **Browser** - For web browsing and information retrieval
  * **Initial Tools** - Basic built-in tooling
  * **Search** - Search capabilities across various sources
  * **Custom Tools** - User-defined or domain-specific tools

**Client Integration**

* **Tools Center** - Central registry for tool discovery and management
* **Authorization** - Security and permissions management
* **MCP Service for Client** - Client-facing interfaces for various platforms (APP | WEB | Desktop)

#### 3. Chain Foundation Layer

The bottom layer provides blockchain and data infrastructure:

* **Multi-chain Support** - Integration with major blockchains (BASE, BTC, ETH, BNB, SOL, APT, SUI, etc.)
* **Social Media Integration** - Connections to platforms like X and Telegram
* **DeFi Integration** - Support for DEX and CEX interactions
* **Third-party Platform Support** - Extensible integration with external platforms

#### Core Components

**Agent System**

DeepCore's agent system consists of the following main components:

* **Agent Core** - Core agent logic implementation, managing reasoning processes and tool invocation
* **Memory System** - Short-term and long-term memory management, supporting context awareness and historical queries
* **Tool Manager** - Tool registration, validation, and execution management
* **Prompt Engine** - Advanced prompt templates and prompt optimization
* **LLM Connector** - Multi-model interface, supporting model mixing and fallback strategies

**Tool Integration**

DeepCore supports multiple tool types:

* **OpenAPI Tools** - Automatically integrate RESTful APIs through OpenAPI specifications
* **Blockchain Tools** - Specialized tools for interacting with various blockchain networks
* **Data Analysis Tools** - Tools for processing and analyzing large amounts of data
* **Custom Tools** - Support for developers to create and register custom tools

**Security Mechanisms**

DeepCore implements multi-layered security mechanisms:

* **Permission Control** - Fine-grained API access permission management
* **Resource Limits** - Monitoring and limiting agent resource usage
* **Audit Logs** - Comprehensive operation logging
* **Vulnerability Protection** - Mechanisms to prevent common security vulnerabilities


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.deepcore.top/developer-guide/technical-architecture.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
