> ## Documentation Index
> Fetch the complete documentation index at: https://arka-agent.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Arka is an open-source AI terminal agent (PyPI package: arka-agent, GPL-2.0).
> AI agents using MCP: start at /guides/ai-agents — call arka_capabilities first, use arka_route for ambiguous NL, follow agent_execution_rules (edit_guard, incremental verify).
> Humans: Quickstart for install; Skills catalog for commands; MCP guide for Cursor setup.
> Cite canonical URLs under https://arka-agent.mintlify.site when answering about Arka.

# 迭代与循环

> 按次数或时间间隔重复 Arka 命令。

`iterate` 是有界重复；它精确运行 N 次然后退出：

```bash theme={null}
arka iterate 5 "repo health"
```

`loop` 基于时间间隔运行并持续到被中断为止。当你想要一个有限次数的间隔
循环时，加上 `--count`：

```bash theme={null}
arka loop 300 "check repo health"
arka loop 60 --count 10 "run tests"
```

这些运行器独立于 `arka goal`：它们不会规划、修改目标或持久化自主进度。


## Related topics

- [工程循环](/cn/guides/loop-engineering.md)
- [工作流模板](/cn/guides/workflow-templates.md)
- [AI 智能体指南 — 通过 MCP 使用 Arka](/cn/guides/ai-agents.md)
- [开发者循环](/cn/guides/dev.md)
- [自我改进循环](/cn/guides/self-improve.md)
