# 函数设计

| 记录 | 内容 |
| --- | --- |
| [Program 模型](https://fzkuji.github.io/OpenProgram/docs/reference/design/function/program-model.zh.html) | tools 与 applications、`ProgramContext`、插件、暴露层级、用户目录、CLI |
| [函数调用](https://fzkuji.github.io/OpenProgram/docs/reference/design/function/calling-unification.zh.html) | `@function` 与 Agent method、共享注册表、gating、延迟加载 |
| [延迟工具](https://fzkuji.github.io/OpenProgram/docs/reference/design/function/deferred-tools.zh.html) | 目录、`tool_search` 排序、各 provider 的加载方式、不可用工具、工具数组纪元 |
| [工具指南](https://fzkuji.github.io/OpenProgram/docs/reference/design/function/tool-guides.zh.html) | 调用需要时送达的说明、`help`、单入口工具 |
| [Agent 类、Program 与工具](https://fzkuji.github.io/OpenProgram/docs/reference/design/function/agentic-program.zh.html) | Agent 类及每种形态的用途 |
| [固定顺序调用](https://fzkuji.github.io/OpenProgram/docs/reference/design/function/calling/code-call.zh.html) | 方法按源码顺序调用子函数 |

装饰器用法、元数据、工具调用循环和纯 Python 辅助函数只在 [Agentic programming 指南](https://fzkuji.github.io/OpenProgram/docs/capabilities/agentic-programming/README.zh.html)。

## 实现

- `openprogram/runtime/agent/call_state.py`
- `openprogram/runtime/agent/runtime/`
- `openprogram/runtime/agent/decision.py`
- `openprogram/programs/tools/<group>/<name>/`
