Skip to main content
CowAgent is an out-of-the-box super AI assistant and a complete Agent harness framework, featuring complex task planning, long-term memory, skill extensibility, self-evolution, and multi-agent collaboration.

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.

Multi-Agent Workspace

Once you build an Agent team, each Agent has a complete workspace of its own. The default Agent uses the instance root ~/cow, while every other member lives under ~/cow/agents/<agent-id>/. This splits storage into three categories — system-shared, per-member isolated, and optionally shared:
  • System-shared: the secrets file (~/.cow/.env) and the team config (~/cow/agents/team.json) are shared across the whole instance.
  • Per-member isolated: each Agent’s core files (SYSTEM.md, USER.md, AGENT.md, RULE.md), memory (MEMORY.md, memory/), and output files live inside its own workspace and are not visible to other members.
  • Optionally shared: skills and the knowledge base can either be shared with the team or dedicated to a specific member, and the two modes can be switched at any time.
A sub-Agent is a temporary execution unit spun up by the lead Agent; it shares the lead Agent’s workspace and has no memory of its own. A team member is a persistent, full Agent with a completely independent workspace and memory. See Sub-Agents for details.

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: