Skip to main content
CowAgent 2.0 has evolved from a simple chatbot into a super intelligent assistant with Agent architecture, featuring autonomous thinking, task planning, long-term memory, and skill extensibility.

System Architecture

CowAgent’s architecture consists of the following core modules: CowAgent Architecture

Core Modules

ModuleDescription
ChannelsMessage channel layer for receiving and sending messages. Supports Web, Feishu, DingTalk, WeCom, WeChat Official Account, and more
Agent CoreAgent engine including task planning, memory system, and skills engine
ToolsTool layer for Agent to access OS resources. 10+ built-in tools
ModelsModel 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:
  1. Receive Message — Receive user input through channels
  2. Understand Intent — Analyze task requirements and context
  3. Plan Task — Break complex tasks into multiple steps
  4. Invoke Tools — Select and execute appropriate tools for each step
  5. Update Memory — Store important information in long-term memory
  6. 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/
├── system.md          # Agent system prompt
├── user.md            # User profile
├── memory/            # Long-term memory storage
│   ├── core.md        # Core memory
│   └── daily/         # Daily memory
└── skills/            # Custom skills
    ├── skill-1/
    └── skill-2/
Secret keys are stored separately in ~/.cow directory for security:
~/.cow/
└── .env               # Secret keys for skills

Core Configuration

Configure Agent mode parameters in config.json:
{
  "agent": true,
  "agent_workspace": "~/cow",
  "agent_max_context_tokens": 40000,
  "agent_max_context_turns": 30,
  "agent_max_steps": 15
}
ParameterDescriptionDefault
agentEnable Agent modetrue
agent_workspaceWorkspace path~/cow
agent_max_context_tokensMax context tokens40000
agent_max_context_turnsMax context turns30
agent_max_stepsMax decision steps per task15