System Architecture
CowAgent’s architecture consists of the following core modules:
Core Modules
| Module | Description |
|---|---|
| Channels | Message channel layer for receiving and sending messages. Supports Web, Feishu, DingTalk, WeCom, WeChat Official Account, and more |
| Agent Core | Agent engine including task planning, memory system, and skills engine |
| Tools | Tool layer for Agent to access OS resources. 10+ built-in tools |
| Models | Model layer with unified access to mainstream LLMs |
Agent Mode Workflow
When Agent mode is enabled, CowAgent runs as an autonomous agent with the following workflow:- Receive Message — Receive user input through channels
- Understand Intent — Analyze task requirements and context
- Plan Task — Break complex tasks into multiple steps
- Invoke Tools — Select and execute appropriate tools for each step
- Update Memory — Store important information in long-term memory
- Return Result — Send execution results back to the user
Workspace Directory Structure
The Agent workspace is located at~/cow by default and stores system prompts, memory files, and skill files:
~/.cow directory for security:
Core Configuration
Configure Agent mode parameters inconfig.json:
| Parameter | Description | Default |
|---|---|---|
agent | Enable Agent mode | true |
agent_workspace | Workspace path | ~/cow |
agent_max_context_tokens | Max context tokens | 40000 |
agent_max_context_turns | Max context turns | 30 |
agent_max_steps | Max decision steps per task | 15 |
