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

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 & Knowledge — Store important information in long-term memory and organize structured knowledge into the knowledge base
  6. Return Result — Send execution results back to the user

Workspace

System Workspace

The Agent’s system workspace is located at ~/cow by default and stores system prompts, memory files, and skill files:
Secret keys are stored separately in ~/.cow directory for security:

Project Workspace

Besides the default workspace, each session can be bound to its own project directory. The Agent’s file reads/writes and command execution happen inside that directory, giving you multi-project isolation; memory, skills, and the like still live in the default workspace. When more than one project is in use, the Web/desktop history list automatically groups sessions by project.

Per-Session Model & Permission

Workspace, model, and permission can all be set per session, falling back to the global default when unset:
  • Model: different sessions can switch to different models, making it easy to pick the right one per task.
  • Permission: controls what the Agent is allowed to do, in three levels — read-only, workspace-write, and full-access. You can set a global default (agent_permission_mode) in the config; new sessions inherit it and can be adjusted individually as needed. Permissions reduce the risk of accidental changes; for strong isolation, run inside a container.

Core Configuration

Configure Agent mode parameters in config.json: