結果

目录:

  • 主儀表板概覽
  • 專案
  • 備注
  • 文章
  • 連結
  • 聯絡人
  • 事件
  • 任務和任務範本
  • 檔案
  • 訊息

5. 管理员用户的高级功能

  • 动态表单
  • 集成
  • 高级分析和报告
  • 自动化工作流
  • 数据隔离
  • 加密
  • 用户权限
  • GDPR合规
  • 数据导出选项

对于工作人员:

7. 任务管理

  • 创建和分配任务
  • 更新任务状态
  • 与团队成员协作

对于开发人员:

  • Claude Code: claude mcp add askrobots https://askrobots.com/api/mcp/ -t http -H "Authorization: Token YOUR_TOKEN"
  • Codex: export ASKROBOTS_MCP_TOKEN="YOUR_TOKEN" then codex mcp add askrobots --url https://askrobots.com/api/mcp/ --bearer-token-env-var ASKROBOTS_MCP_TOKEN
  • Codex native MCP resource listing has been verified against AskRobots. Claude Code uses the same hosted endpoint, but should be validated separately in your environment.
  • 托管端点公开MCP工具、资源和资源模板。
  • 完整MCP文档 →

物件(100x架構)

  • 什么: 无需部署即可立即运行的实时Python对象
  • 视图: 在此创建页面 /v/your-view/ - AI编辑代码,您刷新,立即上线
  • 数据存储: 无模式JSON存储 - 无需迁移
  • 触发器: 使用cron表达式的定时自动化
  • 管理对象 →

12. SDK和库

  • 概览和优势
  • 设置和安装
  • 示例代码

13. Webhooks和集成

  • 创建自定义集成
  • 使用Webhooks进行实时更新

14. 开发人员最佳实践

15. 故障排除和常见问题

  • 管理员用户的常见问题
  • 工作人员的常见问题
  • 开发人员特定问题

16. 术语表

  • 术语、缩略词和行话的解释。

17. 反馈和支持

  • 如何提供反馈
  • 联系支持
  • 社区和论坛链接

1. 簡介

关于软件

Our task system is a state-of-the-art web-based solution designed to streamline and simplify task management. With its intuitive interface and advanced features, it provides users an unparalleled platform to accomplish tasks efficiently and effectively.

主要优势

As a Software-as-a-Service (SaaS) offering, our task system offers the benefits of seamless updates, easy scalability, and reduced IT overhead. But what truly sets us apart is our integration with cutting-edge AI technology. This not only augments decision-making capabilities but also introduces predictive analytics and automation, ensuring that your task management is always a step ahead.

支持的平台/浏览器

Compatibility is key. That's why we've ensured that our software supports all major web browsers across both desktop and mobile platforms. Furthermore, for those looking to integrate our capabilities into custom software systems, we offer a robust API that facilitates seamless connectivity.

2. 開始使用

帳號設定

Begin your journey by creating an account using a valid email address. Once your account is set up, explore our range of features. To access premium functionalities, choose from our subscription plans tailored to your needs.

基本設定

Your new account opens up to a clean slate, ready for personalization. While it might seem daunting at first, remember you don't have to master everything immediately. Start with the basics like Notes, Links, Contacts, and Events. As you become more comfortable, gradually explore more advanced features like Tasks, Task Templates, and Shell. Each module is designed to enhance your productivity at your own pace.

初始用戶引導

After registering, you'll receive an email to verify your account. This is an important step to ensure the security of your account and to activate all features. Follow the instructions in the email to complete the verification process and begin your journey with us.

3. 核心功能

主儀表板概覽

Begin by exploring the main dashboard, where you'll have access to an overview of all your projects, tasks, recent activity, and important metrics. This centralized hub allows you to navigate quickly between different sections of the site and monitor ongoing work at a glance.

專案

Your project management system allows you to create, track, and collaborate on projects. Set deadlines, manage tasks within each project, and monitor progress with easy-to-use tools. Use the project section to view all active and archived projects.

備注

After logging in, users can create notes to capture ideas, meeting minutes, or any important information. Notes are automatically saved and can easily be searched for later. Soon you'll be able to organize notes by projects, categories or tags.

文章

The articles section is designed to help you create and publish longer-form content, such as documentation or reports. You can draft, edit, and collaborate on articles with other team members. The built-in version control ensures you can always revert to previous versions if needed.

After discovering useful resources, you can save and organize them under the Links section. Tag, categorize, and search your links for easy retrieval later. This section is perfect for managing research materials, external documentation, or useful references.

聯絡人

After adding contacts to your system, you can manage and organize their details within the Contacts section. You can easily search for specific people, and soon categorize contacts by project or company, and integrate with other tools for communication.

事件

After creating events, you can view all scheduled meetings, reminders, and deadlines within the Events section. Soon you'll be able to sync events with calendars, send out invitations, and manage notifications to stay on top of important dates.

任務和任務範本

After creating tasks, you can organize them by priority, assign them to team members, and track their completion status. Task templates allow you to create reusable task structures for recurring activities, ensuring consistency and saving time.

檔案

The Files section provides a powerful system to upload, organize, and manage documents with automatic categorization, text extraction, and task creation capabilities.

主要功能
  • 智能上传: 拖放多个文件,自动处理
  • 自动分类: 文件自动组织到逻辑文件夹中
  • PDF智能: 文本提取使所有PDF可搜索
  • 任务创建: 从发票、合同和文档自动创建任务
  • 批量操作: 一次管理多个文件
文件上传

通过导航到文件→上传来上传文件。您可以:

  • 一次拖放多个文件
  • 将文件与特定项目关联
  • 查看实时上传进度
  • 上传文档至您方案的限制(10-100 MB)
自动分类

AskRobots使用智能模式识别自动组织您的文件:

  • financial/invoices/2024/ - 用于发票文档
  • contracts/vendor/active/ - 用于供应商协议
  • receipts/travel/2024/ - 用于费用收据
  • personal/photos/vacation/ - 用于个人图像
PDF文本提取

每个PDF都会自动处理以:

  • 提取所有文本以供搜索
  • 识别关键信息(日期、金额、名称)
  • 创建可搜索的元数据
  • 在所有文档中启用全文搜索
从文档创建任务

上传文档,让AI自动创建任务:

  • 發票 → 带有到期日期的付款提醒任务
  • 合同 → 审核和续订提醒任务
  • 会议记录 → 行动项目作为单独的任务
  • 项目文档 → 可交付成果和里程碑任务
按方案的存储限制
方案 总存储 最大文件大小
基本 1 GB 10 MB
专业 10 GB 50 MB
企业 100 GB 100 MB

4. 物件(100x架構)

Objects are live Python code that runs instantly without deployment. This is the 100x architecture - where AI edits code, you refresh your browser, and features are live.

为什么100x?

Traditional development takes 10-30 minutes per change (code, migrations, build, deploy, test). With Objects, changes take 10-30 seconds (edit code, refresh browser, done). That's 100x faster iteration.

对象类型

查看次數

实时网页位于 /v/your-view/

  • 返回HTML、JSON或渲染模板
  • 访问用户上下文和查询参数
  • 调用其他对象获取数据
数据存储

无模式JSON持久化

  • 无需迁移
  • 只需保存/加载JSON
  • TSV支持以确保持久性
触发器

定时自动化

  • Cron表达式
  • 后台执行
  • 错误处理

快速启动示例

以下是AI如何创建简单视图:

# Object: u_1_view_hello
# This renders at /v/hello/

def GET(request, context):
    name = context.get('params', {}).get('name', 'World')
    return {
        'html': f'<h1>Hello, {name}!</h1>',
        'title': 'Greeting'
    }

访问 /v/hello/?name=Dan and see "Hello, Dan!" - no deploy needed.

数据存储示例

# Object: u_1_deals (data store)
# Stores deals as JSON in _state_manager

def GET(request, context):
    deals = _state_manager.get('deals', [])
    return {'deals': deals, 'count': len(deals)}

def POST(request, context):
    deals = _state_manager.get('deals', [])
    new_deal = context.get('data', {})
    deals.append(new_deal)
    _state_manager.set('deals', deals)
    return {'status': 'added', 'count': len(deals)}

通过MCP使用对象

您的AI(Claude Code、Cursor等)可以通过MCP API创建和修改对象:

  • create_object - 使用Python代码创建新对象
  • get_object_source - 读取对象源代码
  • update_object_source - 修改对象代码
  • execute_object - 调用对象方法(GET/POST/PUT/DELETE)
  • get_object_state - 读取对象的持久化状态

对象隔离

每个用户的对象通过前缀隔离:

  • u_1_view_dashboard - 用户1的仪表板视图
  • u_1_deals - 用户1的交易数据存储
  • views_landing - 系统视图(只读)

Users can only see and modify their own objects. System objects are available as read-only examples.

开始: 转到 物件 创建您的第一个对象,或通过MCP连接您的AI并让它为您构建功能。

5. 可定制任务管理的未来:释放动态表单的力量

In an age of relentless digital evolution, the ways we interact with online platforms, handle tasks, and manage workflows are continuously evolving.

Traditional task management systems are static, forcing users into a one-size-fits-all approach. But imagine a world where every task, big or small, fits perfectly. Welcome to our Dynamic Form System.

  • 适应性:随着业务需求的变化发展您的任务。
  • 效率:使用元数据传递数据,消除冗余,提高速度。
  • 个性化:自定义表单的每个元素。
  • 可扩展性:无缝处理任何规模或复杂性的项目。

与我们一起深入探索,体验任务管理的未来。

分解动态表单系统

Our task management system is engineered to offer flexibility and efficiency through its core components: Metadata, JSON Schema, and UI Schema. Each plays a crucial role in the creation and management of dynamic forms.

元数据:
它是什么?
Metadata is essentially "data about data." It functions as a detailed ledger, recording specific attributes and contextual information about each task.
为什么它重要?
Metadata serves as the backbone for contextualizing tasks. It facilitates the seamless integration of data across various tasks, ensuring that important details are carried forward. This continuity is key to maintaining efficiency and coherence in task management.
JSON模式(数据模式):
它是什么?
JSON Schema acts as the architectural blueprint for your task data. It outlines the expected data types, constraints, and overall structure of the data associated with each task.
为什么它重要?
The schema's primary role is to enforce data integrity and structure. By providing a clear definition of data requirements, it ensures that all collected information is consistent, predictable, and conforms to established standards. This is crucial for maintaining data quality and facilitating automation and data processing.
UI模式(视图模型):
它是什么?
The UI Schema is responsible for the visual representation of the data structure defined by the JSON Schema. It provides customization options for the layout and design of form fields, widgets, and other interactive elements.
为什么它重要?
The UI Schema bridges the gap between backend data structures and front-end user experience. Its importance lies in its ability to tailor the presentation and interaction with the data to fit specific user needs and aesthetic preferences. This customization enhances user engagement and ensures a more intuitive and user-friendly interface.

JSON数据和任务模板

从您的JSON数据开始。没有?查看一些 这里的示例在这里创建.

JSON模式(数据模式)

[ 这里放JSON代码或UML图 ]

Describe your form object using a JSON file. It includes names, types, values, and sizes of fields.

创建您的JSON模式 这里在线预览表单.

UI模式(视图模型)

[ 这里放代码及其对应的线框UI图 ]

使用JSON文件列出UI的标签和选项。

用户界面

[ 这里放包含数据的UI,在Bootstrap中渲染 ]

最终结果显示在工作人员表单上。提交的结果存储在 blob 字段中。

基本示例

示例代码:

  • Python

6. 账户和计费

AskRobots uses a simple wallet-based billing system. Add funds as needed, only pay for what you use, with no surprise charges or hidden fees.

我们的钱包系统如何工作

与传统订阅不同,我们的钱包系统给您完全控制:

  • 预付费模式: 随时充值$5-$100
  • 无自动续费: 未经您的许可,您的卡永远不会被收费
  • 基于使用量: 只有在使用AI功能时才扣除资金
  • 永不过期: 您的余额保留至使用
  • 完全透明: 精确查看每次AI操作的成本

订阅方案和功能

虽然计费基于钱包,但方案决定您的功能和限制:

方案 存储 檔案大小 API速率 最适合
基本 1 GB 10 MB max 60/min 个人使用
专业 10 GB 50 MB max 120/min 小型团队
企业 100 GB 100 MB max 300/min 大型组织
查看详细方案

AI使用成本

AI操作根据实际使用量收费:

  • GPT-4o-mini: 每次请求约$0.001
  • GPT-4: 每次请求约$0.03
  • Claude 3.5 Sonnet: 每次请求约$0.015
  • 图像分析: 每张图像约$0.005
  • PDF处理: 每个文档约$0.01

实际成本取决于请求复杂性和响应长度

使用量跟踪

实时监控您的使用量:

  • 儀表板: 查看钱包余额和最近费用
  • AI使用量页面: 按模型和操作的详细分解
  • 交易歷史: 所有费用的完整日志
  • 每日摘要: 跟踪支出模式

付款方式

我们通过Stripe接受所有主要付款方式:

  • 信用卡(Visa、万事达卡、美国运通、Discover)
  • 借记卡
  • 数字钱包(Apple Pay、Google Pay)
  • 银行转账(用于企业)

所有付款通过Stripe安全处理。我们从不存储您的卡详细信息。

充值

  1. 转到 帳單充值
  2. 选择金额(最低$5,最高$100)
  3. 输入付款详细信息
  4. Click "Add Funds"
  5. 资金立即可用

升级/降级程序

更改方案简单且即时:

升级您的方案
  1. 访问 方案页面
  2. 选择您的新方案
  3. 更改立即生效
  4. 存储和限制立即增加
  5. 无按比例收费 - 钱包系统保持不变
降级您的方案
  1. 确保您在较低方案限制内(存储等)
  2. 访问方案页面
  3. 选择较低方案
  4. 如果超出新存储限制,您可能需要删除文件
  5. 功能立即调整

余额不足通知

我们将在以下情况通知您:

  • 余额低于$5.00
  • 余额达到$0.00
  • 由于资金不足,操作失败

计费历史和发票

访问您的完整计费历史:

  • 交易日志: 每笔费用都有时间戳和描述
  • 月度对账单: 所有活动的摘要
  • 导出选项: 下载为CSV或PDF
  • 税务文件: 用于会计的年度摘要

在以下位置找到: 帳單 → 交易歷史

退款政策

我們提供以下退款:

  • 未使用的钱包余额(账户关闭时)
  • 导致多收费的技术错误
  • 重复收费

在30天内联系 support@askrobots.com 提出退款请求。

企业计费

对于需要以下内容的组织:

  • 发票计费(净30天)
  • 批量折扣
  • 多个用户账户
  • 自定义合同

联系 sales@askrobots.com 获取企业选项。

11. API文件

API概览

Our API allows you to interact programmatically with our platform, enabling you to manage tasks, view statuses, and much more. It's designed for developers who want to integrate their applications or automate workflows.

身份验证方法

We use token-based authentication for securing our API. Each request must include a valid API token in the header. Tokens can be obtained through your user dashboard. You can find your API key from the dashboard or through this 链接.

端点、请求和响应格式

The API provides various endpoints to access different functionalities. Requests should be made in JSON format, and responses are also returned as JSON. Here's an example endpoint for tasks: https://askrobots.com/api/tasks/. For a detailed list of all available endpoints, their request methods, and response formats, please refer to our full API documentation.

列出任务
以下是列出任务的curl命令示例:
curl -X GET \
          -H "Authorization: Token YOUR_API_TOKEN" \
          -H "Content-Type: application/json" \
          https://askrobots.com/api/tasks/
将YOUR_API_TOKEN替换为您的实际令牌。
任务详情
获取特定任务的详情:
curl -X GET \
          -H "Authorization: Token YOUR_API_TOKEN" \
          -H "Content-Type: application/json" \
          https://askrobots.com/api/tasks/TASK_ID/
将YOUR_API_TOKEN替换为您的实际令牌,将TASK_ID替换为任务ID。
列出任务模板
curl -X GET \
            -H "Authorization: Token YOUR_API_TOKEN" \
            -H "Content-Type: application/json" \
            https://askrobots.com/api/tasktemplates/
    
将YOUR_API_TOKEN替换为您的实际令牌,将TASK_ID替换为任务ID。
创建任务

         % curl -X POST \
     -H "Authorization: Token YOUR_API_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{
           "title": "New Task with Template",
           "urgency": "normal",
           "template": "TEMPLATE_ID",
           "instructions": "Please follow the template guidelines",
           "json_form": {},
           "metadata": {},
           "priority": 1,
           "due_date": "2024-03-25T00:00:00Z",
           "project": "PROJECT_ID"
         }' \
     https://askrobots.com/api/tasks/
    
将YOUR_API_TOKEN替换为您的实际令牌。 将TEMPLATE_ID替换为您的模板ID。 将PROJECT_ID替换为您的项目ID。
列出项目

         % curl -X GET \
     -H "Authorization: Token YOUR_API_TOKEN" \
     -H "Content-Type: application/json" \
     https://askrobots.com/api/projects/
    
将YOUR_API_TOKEN替换为您的实际令牌。

API端点参考

以下是可用API端点的综合列表:

全局搜索API
方法 端點 描述
GET /api/search/ 搜索所有内容
查询参数:
  • q (必需) - 搜索查询(最少2个字符)
  • types (可选) - Comma-separated list: tasks, projects, contacts, files, notes, links, articles, events, messages
  • limit (可选) - 每种类型的最大结果数(默认10,最大50)
示例请求:
curl -X GET \
     -H "Authorization: Token YOUR_API_TOKEN" \
     "https://askrobots.com/api/search/?q=project&types=tasks,notes&limit=5"
示例响应:
{
  "query": "project",
  "total_count": 15,
  "types_searched": ["tasks", "notes"],
  "results": {
    "tasks": {
      "count": 10,
      "results": [
        {
          "id": "uuid",
          "type": "task",
          "title": "Create project dashboard",
          "snippet": "Build the main project...",
          "created_at": "2026-02-03T...",
          "project": {"id": "uuid", "name": "AskRobots"},
          "status": "open"
        }
      ]
    },
    "notes": {
      "count": 5,
      "results": [...]
    }
  }
}

注意: 结果按用户访问权限筛选。您只能看到您拥有或有权访问的内容。

笔记API
方法 端點 描述
GET /api/notes/ 列出所有笔记
GET /api/notes/{id}/ 获取笔记详情
POST /api/notes/ 创建新笔记
PUT /api/notes/{id}/ 更新笔记
DELETE /api/notes/{id}/ 删除笔记
字段:
  • content (必需) - 笔记文本内容
  • project (可选) - 要关联的项目UUID
  • project_name (只读) - 关联项目的名称
示例请求 - 创建笔记:
curl -X POST \
     -H "Authorization: Token YOUR_API_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{
       "content": "Discussed project timeline and deliverables",
       "project": "PROJECT_UUID"
     }' \
     https://askrobots.com/api/notes/
链接API
方法 端點 描述
GET /api/links/ 列出所有链接
GET /api/links/{id}/ 获取链接详情
POST /api/links/ 创建新链接
PUT /api/links/{id}/ 更新链接
DELETE /api/links/{id}/ 删除链接
事件API
方法 端點 描述
GET /api/events/ 列出所有事件
GET /api/events/{id}/ 获取事件详情
POST /api/events/ 创建新事件
示例请求 - 创建事件:
curl -X POST \
     -H "Authorization: Token YOUR_API_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{
       "title": "Team Meeting",
       "start_date_time": "2025-06-15T14:00:00Z",
       "end_date_time": "2025-06-15T15:00:00Z",
       "description": "Weekly team sync",
       "project": "PROJECT_ID"
     }' \
     https://askrobots.com/api/events/
联系人API
方法 端點 描述
GET /api/contacts/ 列出所有联系人
GET /api/contacts/{id}/ 获取联系人详情
POST /api/contacts/ 创建新联系人
PUT /api/contacts/{id}/ 更新联系人
DELETE /api/contacts/{id}/ 删除联系人

筛选器: ?project=UUID, ?search=text, ?ordering=last_name, ?lead_status=hot, ?organization_entity=UUID

组织API
方法 端點 描述
GET /api/organizations/ 列出所有组织
GET /api/organizations/{id}/ 获取组织详情(包含联系人数量)
POST /api/organizations/ 创建新组织
PATCH /api/organizations/{id}/ 更新组织
DELETE /api/organizations/{id}/ 删除组织

筛选器: ?search=text (搜索名称和行业), ?project=UUID

字段: name, website, industry, description, notes, project

互动API
方法 端點 描述
GET /api/interactions/ 列出所有互动
GET /api/interactions/{id}/ 获取互动详情
POST /api/interactions/ 记录新互动
PATCH /api/interactions/{id}/ 更新互动
DELETE /api/interactions/{id}/ 删除互动

筛选器: ?contact=UUID, ?organization=UUID, ?interaction_type=call|email|meeting|note|task

字段: contact, interaction_type, subject, notes, duration, outcome (positive/neutral/negative/no_answer), occurred_at

标签API
方法 端點 描述
GET /api/tags/ 列出所有标签
POST /api/tags/ 创建标签
PATCH /api/tags/{id}/ 更新标签
DELETE /api/tags/{id}/ 删除标签

字段: name, color (十六进制颜色,默认 #6c757d)

提示: 通过联系人API使用以下方式将标签分配给联系人 tag_ids: [UUID, ...]

文件API
方法 端點 描述
GET /api/files/ 列出所有文件
GET /api/files/{id}/ 获取文件详情
GET /api/files/{id}/download/ 获取下载URL
GET /api/files/stats/ 获取文件统计
POST /api/files/upload/ 上传文件
POST /api/files/categorize/ 批量分类文件

筛选器: ?project=UUID, ?category=path, ?uncategorized=true, ?file_type=document

文件上传示例:
curl -X POST \
     -H "Authorization: Token YOUR_API_TOKEN" \
     -F "file=@/path/to/document.pdf" \
     -F "project=PROJECT_UUID" \
     -F "description=Project documentation" \
     https://askrobots.com/api/files/upload/

上传字段:

  • file (必需) - 要上传的文件(multipart/form-data)
  • project (可选) - 要关联的项目UUID
  • category (可选) - 类别路径字符串
  • description (可选) - 文件描述
时间跟踪API
方法 端點 描述
GET /api/timelogs/ 列出时间条目
GET /api/timelogs/running/ 获取运行中的计时器
POST /api/timelogs/ 创建时间条目
POST /api/timelogs/start/ 启动新计时器
POST /api/timelogs/{id}/stop/ 停止运行计时器

筛选器: ?project=UUID, ?task=UUID, ?is_running=true, ?is_billable=true

AI代理和工作人员管理API

Managed agents are AI agents with their own identity, token, and optional project access. Legacy AI worker endpoints remain available as compatibility paths.

方法 端點 描述
GET /api/workertypes/ 列出工作人员类型
GET /api/aiworkers/ 列出托管代理和旧版AI工作人员
POST /api/aiworkers/ 从兼容端点创建托管代理
GET /api/account/managed-agents/ 列出带有令牌的托管代理
POST /api/account/managed-agents/ 创建具有可选项目访问权限的托管代理
POST /api/account/managed-agents/{id}/rotate-token/ 轮换托管代理令牌
GET /api/invitations/ 列出项目邀请
POST /api/invitations/ 创建邀请
POST /api/invitations/{id}/accept/ 接受邀请
GET /api/projectaccess/ 列出项目权限
计费API(只读)
方法 端點 描述
GET /api/plans/ 列出订阅方案
GET /api/wallet/me/ 获取您的钱包余额
GET /api/subscription/me/ 获取您的订阅状态
GET /api/transactions/ 列出您的交易

注意:计费端点是只读的。通过仪表板管理计费。

代理协调API

用于多个AI代理同时处理任务的多代理环境。

方法 端點 描述
POST /api/tasks/{id}/claim/ 原子性地认领任务(防止竞态条件)
POST /api/tasks/{id}/release/ 将已认领的任务释放回池
POST /api/tasks/{id}/heartbeat/ 延长认领超时
GET /api/tasks/claimable/ 列出可认领的任务
GET /api/tasks/my_claims/ 列出您当前已认领的任务

查询参数: ?timeout_minutes=30, ?stale_minutes=30, ?urgency=high

代理工作流:
# 1. Find claimable tasks
GET /api/tasks/claimable/?urgency=high&limit=5

# 2. Claim a task atomically
POST /api/tasks/{id}/claim/?timeout_minutes=30

# 3. Send heartbeats while working
POST /api/tasks/{id}/heartbeat/

# 4. Complete or release when done
POST /api/tasks/{id}/complete_simple/
# or
POST /api/tasks/{id}/release/

认领默认在30分钟后过期。过期的认领会自动释放。

Shell API

Execute shell commands via the API. Supports all shell commands including AI queries (/ar), quick notes, search, and more.

方法端點描述
POST /api/shell/ 执行Shell命令
请求体:
{
  "command": "/ar What tasks are open?",
  "session_id": "optional-uuid-for-conversation-context"
}
响应:
{
  "output": "You have 12 open tasks...",
  "session_id": null,
  "success": true
}
示例:
curl -X POST https://askrobots.com/api/shell/ \
     -H "Authorization: Token YOUR_API_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{"command": "/ping"}'
命令前缀:
  • /ar — 具有工具访问权限的AI查询(任务、笔记、文件等)
  • /note — 创建快速笔记
  • /search — 搜索笔记
  • /task — 任务管理
  • ^url — 快速书签
  • ~term — 模糊全局搜索

没有前缀的任何文本直接发送到AI代理。

响应格式

所有API响应遵循一致的JSON格式:

成功响应(200 OK):
{
  "id": "uuid-here",
  "title": "Sample Note",
  "content": "This is the note content",
  "created_at": "2025-06-11T12:00:00Z",
  "updated_at": "2025-06-11T12:00:00Z",
  "user": "user-id",
  "project": "project-id"
}
错误响应(400 错误请求):
{
  "error": "Bad Request",
  "message": "Title field is required",
  "field_errors": {
    "title": ["This field is required."]
  }
}
分页响应:
{
  "count": 45,
  "next": "https://askrobots.com/api/notes/?page=2",
  "previous": null,
  "results": [
    {
      "id": "uuid-1",
      "title": "Note 1",
      ...
    },
    {
      "id": "uuid-2", 
      "title": "Note 2",
      ...
    }
  ]
}

速率限制

API请求受速率限制以确保公平使用:

  • 已认证用户每小时1000个请求
  • 未认证请求每小时100个请求
  • 速率限制信息包含在响应头中:
    • X-RateLimit-Limit: 允许的最大请求数
    • X-RateLimit-Remaining: 剩余请求数
    • X-RateLimit-Reset: 限制重置时间

Webhooks

设置webhooks以在事件发生时接收实时通知:

POST /api/webhooks/
{
  "url": "https://your-app.com/webhook",
  "events": ["task.created", "task.updated", "task.completed"],
  "active": true
}

SDK和库

我们为流行语言提供官方SDK:

  • Python: pip install askrobots-sdk
  • JavaScript/Node: npm install @askrobots/sdk
  • Ruby: gem install askrobots
  • PHP: composer require askrobots/sdk
Python SDK示例:
from askrobots import Client

client = Client(api_key="YOUR_API_TOKEN")

# List tasks
tasks = client.tasks.list()

# Create a new task
new_task = client.tasks.create(
    title="Complete API documentation",
    urgency="high",
    project_id="PROJECT_ID"
)

# Update task status
client.tasks.update(new_task.id, status="completed")

身份验证详情

获取API令牌
  1. 导航到 設定 → API密鑰
  2. Click "Generate New Token"
  3. 给您的令牌起一个描述性名称
  4. 立即复制令牌(不会再次显示)
  5. 在您的应用程序中安全存储
在请求中使用令牌

在每个请求的Authorization头中包含您的令牌:

Authorization: Token YOUR_API_TOKEN

使用不同工具的示例:

# curl
curl -H "Authorization: Token YOUR_API_TOKEN" https://askrobots.com/api/tasks/

# Python requests
import requests
headers = {"Authorization": "Token YOUR_API_TOKEN"}
response = requests.get("https://askrobots.com/api/tasks/", headers=headers)

# JavaScript fetch
fetch('https://askrobots.com/api/tasks/', {
    headers: {
        'Authorization': 'Token YOUR_API_TOKEN'
    }
});

速率限制

API速率限制基于您的订阅方案:

方案 速率限制 突发限制 每日限制
基本 60个请求/分钟 10个请求/秒 10,000个请求
专业 120个请求/分钟 20个请求/秒 50,000个请求
企业 300个请求/分钟 50个请求/秒 无限
速率限制头

每个响应包含速率限制信息:

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1698765432

错误代码

API使用标准HTTP状态码并返回JSON错误响应:

状态码 含义 示例响应
200 OK 成功 {"data": {...}}
201 Created 资源成功创建 {"id": "abc123", ...}
400 Bad Request 无效的请求参数 {"error": "Title is required"}
401 Unauthorized 无效或缺失的API令牌 {"error": "Authentication credentials were not provided"}
402 Payment Required 钱包余额不足 {"error": "Insufficient funds", "balance": 0.50}
403 Forbidden 访问资源被拒绝 {"error": "You don't have permission to access this resource"}
404 Not Found 未找到资源 {"error": "Task not found"}
429 Too Many Requests 超出速率限制 {"error": "Rate limit exceeded", "retry_after": 60}
500 Server Error 内部服务器错误 {"error": "An unexpected error occurred"}

分頁

列出端点默认每页返回20个分页结果:

{
    "count": 150,
    "next": "https://askrobots.com/api/tasks/?page=2",
    "previous": null,
    "results": [...]
}

使用查询参数控制分页:

  • page - 页码(默认:1)
  • page_size - 每页项目数(最大:100)

筛选和搜索

大多数列出端点支持筛选:

# Filter tasks by project
/api/tasks/?project=PROJECT_ID

# Filter by status
/api/tasks/?status=open

# Search tasks
/api/tasks/?search=invoice

# Combine filters
/api/tasks/?project=PROJECT_ID&status=open&urgency=high

Webhooks

配置webhooks以接收实时通知:

Webhook事件
  • task.created - 新任务已创建
  • task.completed - 任务已标记为完成
  • file.uploaded - 文件已上传
  • file.processed - 文件处理完成
  • wallet.low_balance - 余额低于$5
Webhook有效载荷示例
{
    "event": "task.completed",
    "timestamp": "2025-06-19T10:30:00Z",
    "data": {
        "id": "task123",
        "title": "Process invoices",
        "completed_by": "user456"
    }
}

API最佳实践

  • 缓存响应 尽可能减少API调用
  • 处理速率限制 使用指数退避优雅处理
  • 使用webhooks 代替轮询进行实时更新
  • 批量操作 在创建多个资源时
  • 只包含所需字段 使用字段选择参数
  • 使用分页 对大型数据集正确使用
  • 安全存储令牌 并定期轮换
需要帮助? 联系 api-support@askrobots.com 提问API相关问题或访问我们的 API示例仓库 获取更多代码示例。

7. 安全和隱私

AskRobots is built with security and privacy at its core. We implement industry best practices to protect your data and ensure compliance with privacy regulations.

数据隔离

每个用户的数据完全隔离:

  • 行级安全: 所有数据库查询按用户ID筛选
  • 无共享数据: 您的文件、任务和项目对其他用户永远不可访问
  • API隔离: 基于令牌的身份验证确保数据访问是用户特定的
  • 项目边界: 即使在团队内部,访问权限也在项目级别控制

加密

我们使用多层加密保护您的数据:

  • 传输中: 所有连接使用TLS 1.3加密
  • 静态: 文件使用AES-256加密
  • 数据库: 敏感字段使用应用程序级加密
  • 備份: 所有备份在存储前都经过加密

备份程序

您的数据通过全面的备份策略得到保护:

  • 自动每日备份 所有数据库
  • 30天保留 用于时间点恢复
  • 定期恢复测试 确保备份完整性

用户权限

细粒度权限控制:

  • 基于角色的访问: 管理员、用户和工作人员角色
  • 项目权限: 控制谁可以查看、编辑或管理项目
  • API权限: 不同访问级别的单独令牌
  • 审计日志: 跟踪所有权限更改

API安全

我们的API实施多种安全措施:

  • 令牌身份验证: 可撤销的安全API令牌
  • 速率限制: 通过智能速率限制防止滥用
  • 输入验证: 所有输入都经过清理和验证
  • CORS保护: 受控的跨源资源共享

GDPR合规

我们尊重您在GDPR下的隐私权:

  • 访问权: 随时导出您的所有数据
  • 删除权: 删除您的账户和所有关联数据
  • 數據可攜性: 以标准格式导出数据(JSON、CSV)
  • 隐私设计: 所有功能都考虑了隐私
  • 数据最小化: 我们只收集必要数据

数据保留政策

關於我們保留您數據多長時間的清晰政策:

  • 活躍帳號: 帳號活躍期間保留數據
  • 已删除项目: 软删除30天,然后永久删除
  • 非活跃账户: 12个月后通知,18个月后删除
  • 负余额账户: 数据删除前90天宽限期
  • 审计日志: 出于安全目的保留1年

数据导出选项

您拥有您的数据并可随时导出:

  • 完整账户导出: 单个ZIP文件中的所有数据
  • 选择性导出: 选择特定项目或日期范围
  • 多种格式: 不同数据类型的JSON、CSV、PDF
  • API访问: 通过我们的REST API进行编程导出
  • 无供应商锁定: 标准格式确保可移植性

用户的安全最佳实践

帮助我们保持您的账户安全:

  • 强密码: 使用唯一、复杂的密码
  • 双因素身份验证: 可用时启用2FA
  • API令牌管理: 定期轮换令牌
  • 监控访问: 定期审查您的活动日志
  • 报告问题: 如果怀疑未经授权的访问,请立即联系我们
安全联系人: 对于安全问题或报告漏洞,请发送电子邮件至 security@askrobots.com