OpenMandate
Post a mandate — what you need and what you offer. OpenMandate keeps working on your behalf and introduces both sides when there is strong mutual fit.
Setup
1. Get an API key. Your user signs up at openmandate.ai and creates a key on the API Keys page.
2. Set the environment variable:
CODEBLOCK0
If OPENMANDATE_API_KEY is not set, stop and ask the user to create one at https://openmandate.ai/api-keys
How to Interact with OpenMandate
Preferred: MCP tools. If your coding agent supports MCP, configure the OpenMandate MCP server (setup guide). You get 15 tools: list_contacts, add_contact, verify_contact, update_contact, delete_contact, resend_otp, create_mandate, get_mandate, list_mandates, submit_answers, close_mandate, list_matches, get_match, respond_to_match, submit_outcome. Use them directly.
Fallback: Shell helper. For agents without MCP support, use the bundled Python script:
CODEBLOCK1
No pip dependencies. Stdlib only. Python 3.8+.
For developers: SDKs. Python (pip install openmandate) or JavaScript (npm install openmandate). See references/sdks.md.
Workflow
CODEBLOCK2
Before creating a mandate, ensure the user has at least one verified contact. Use list contacts to check. If none exist, use add-contact to add an email and verify-contact with the OTP code.
One mandate = one match. The agent keeps looking until it finds the right one.
MCP Tools Reference
All tools are prefixed with openmandate_:
| Tool | Purpose |
|---|
| INLINECODE23 | List verified contacts. Check before creating a mandate. |
| INLINECODE24 |
Add an email contact. Sends a verification code (OTP). |
|
openmandate_verify_contact | Verify a contact with the OTP code from email. |
|
openmandate_update_contact | Update display label or set a contact as primary. |
|
openmandate_delete_contact | Permanently delete a contact. |
|
openmandate_resend_otp | Resend verification code for a pending contact. |
|
openmandate_create_mandate | Create a new mandate. Auto-selects primary verified contact. |
|
openmandate_get_mandate | Get mandate details by ID. |
|
openmandate_list_mandates | List open mandates (default). Pass
status to filter (e.g.
closed for history). |
|
openmandate_submit_answers | Submit answers to intake questions. Check response for more
pending_questions. |
|
openmandate_close_mandate | Permanently close a mandate. |
|
openmandate_list_matches | List all matches. |
|
openmandate_get_match | Get match details — grade, strengths, concerns. Contact info after mutual accept. |
|
openmandate_respond_to_match | Accept or decline a match. Pass
action:
"accept" or
"decline". |
|
openmandate_submit_outcome | Report how a confirmed match went. Pass
outcome:
"succeeded",
"ongoing", or
"failed". |
Shell Commands Reference
Contact Management
CODEBLOCK3
Create a Mandate
CODEBLOCK4
- - Two required positional arguments:
want (what you're looking for) and offer (what you bring). - Primary verified contact is auto-selected.
Returns the mandate with status: "intake" and pending_questions.
Answer Intake Questions
CODEBLOCK5
This is the critical loop. After each answer submission:
- 1. Check
pending_questions in the response - If not empty — read the new questions, answer them, submit again
- If empty and
status is "active" — intake is done, an agent starts working on your behalf
Question types:
- -
text: Write a substantive answer. Respect min_length in constraints. Give specifics. - INLINECODE57 : Pick one
value from the options array. Use the option value field, not the label. - INLINECODE62 : Comma-separated
value strings from options, e.g. "option_a, option_b".
Answer each question distinctly. "What are you looking for?" and "What do you bring to the table?" are different questions — give different answers.
Other Commands
CODEBLOCK6
Full Example (Shell)
CODEBLOCK7
Tips
- - The user gets emailed when a match is found. No need to poll.
- OpenMandate may ask follow-up questions. Detailed answers lead to better matches.
- Matches are graded: Good Match, Strong Match, or Exceptional Match. Review strengths and concerns before accepting.
- For SDK usage patterns and API reference, see the
references/ directory.
OpenMandate
发布一个任务——你需要什么以及你能提供什么。OpenMandate会持续为你工作,并在双方高度匹配时促成对接。
设置
1. 获取API密钥。 你的用户在openmandate.ai注册,并在API密钥页面创建一个密钥。
2. 设置环境变量:
bash
export OPENMANDATEAPIKEY=omlive...
如果未设置OPENMANDATEAPIKEY,请停止操作并要求用户在https://openmandate.ai/api-keys创建一个密钥。
如何与OpenMandate交互
推荐:MCP工具。 如果你的编码代理支持MCP,请配置OpenMandate MCP服务器(设置指南)。你将获得15个工具:listcontacts、addcontact、verifycontact、updatecontact、deletecontact、resendotp、createmandate、getmandate、listmandates、submitanswers、closemandate、listmatches、getmatch、respondtomatch、submit_outcome。直接使用它们。
备用方案:Shell辅助工具。 对于不支持MCP的代理,请使用附带的Python脚本:
bash
python3 {baseDir}/scripts/openmandate.py [args]
无需pip依赖。仅使用标准库。Python 3.8+。
面向开发者:SDK。 Python(pip install openmandate)或JavaScript(npm install openmandate)。参见references/sdks.md。
工作流程
检查/添加联系人 → 创建任务(需求 + 提供) → 回答后续问题 → 任务变为活跃状态
→ OpenMandate持续为你工作 → 找到匹配 → 你收到通知 → 查看匹配
→ 接受或拒绝 → 如果双方都接受,联系方式公开 → 报告结果
在创建任务之前,确保用户至少有一个已验证的联系人。使用list contacts检查。如果没有,使用add-contact添加邮箱,并使用verify-contact配合OTP码进行验证。
一个任务 = 一个匹配。代理会持续寻找,直到找到合适的匹配。
MCP工具参考
所有工具都以openmandate_为前缀:
| 工具 | 用途 |
|---|
| openmandatelistcontacts | 列出已验证的联系人。创建任务前进行检查。 |
| openmandateaddcontact |
添加邮箱联系人。发送验证码(OTP)。 |
| openmandate
verifycontact | 使用邮箱中的OTP码验证联系人。 |
| openmandate
updatecontact | 更新显示标签或设置主要联系人。 |
| openmandate
deletecontact | 永久删除联系人。 |
| openmandate
resendotp | 为待验证的联系人重新发送验证码。 |
| openmandate
createmandate | 创建新任务。自动选择已验证的主要联系人。 |
| openmandate
getmandate | 按ID获取任务详情。 |
| openmandate
listmandates | 列出开放任务(默认)。传递status进行筛选(例如closed查看历史)。 |
| openmandate
submitanswers | 提交问题答案。检查响应中是否有更多pending_questions。 |
| openmandate
closemandate | 永久关闭任务。 |
| openmandate
listmatches | 列出所有匹配。 |
| openmandate
getmatch | 获取匹配详情——等级、优势、顾虑。双方接受后显示联系方式。 |
| openmandate
respondto_match | 接受或拒绝匹配。传递action:accept或decline。 |
| openmandate
submitoutcome | 报告已确认匹配的结果。传递outcome:succeeded、ongoing或failed。 |
Shell命令参考
联系人管理
bash
python3 {baseDir}/scripts/openmandate.py contacts # 列出联系人
python3 {baseDir}/scripts/openmandate.py add-contact user@example.com # 添加邮箱联系人(发送OTP)
python3 {baseDir}/scripts/openmandate.py verify-contact vc_abc123 12345678 # 使用OTP码验证
python3 {baseDir}/scripts/openmandate.py update-contact vc_abc123 --label 工作 --primary # 更新联系人
python3 {baseDir}/scripts/openmandate.py delete-contact vc_abc123 # 删除联系人
python3 {baseDir}/scripts/openmandate.py resend-otp vc_abc123 # 重新发送验证码
创建任务
bash
python3 {baseDir}/scripts/openmandate.py create 为我们的B2B仪表板寻找UX设计机构 A轮金融科技公司,180万美元ARR,两名前端工程师已就位
- - 两个必需的位置参数:want(你寻找的内容)和offer(你提供的内容)。
- 自动选择已验证的主要联系人。
返回状态为intake且包含pending_questions的任务。
回答问题
bash
python3 {baseDir}/scripts/openmandate.py answer mndabc123 [{questionid:q_xxx,value:我们需要一个UX设计机构来设计我们的B2B仪表板。预算4-6万美元,8周。}]
这是关键循环。 每次提交答案后:
- 1. 检查响应中的pending_questions
- 如果不为空——阅读新问题,回答它们,再次提交
- 如果为空且status为active——问题收集完成,代理开始为你工作
问题类型:
- - text:写出实质性的答案。遵守约束中的minlength。提供具体信息。
- singleselect:从options数组中选择一个value。使用选项的value字段,而不是label。
- multiselect:从options中选择逗号分隔的value字符串,例如optiona, option_b。
每个问题都要明确回答。 你在寻找什么?和你能提供什么?是不同的——给出不同的答案。
其他命令
bash
python3 {baseDir}/scripts/openmandate.py get mnd_abc123 # 获取任务详情
python3 {baseDir}/scripts/openmandate.py list # 列出所有任务
python3 {baseDir}/scripts/openmandate.py list --status active # 按状态筛选
python3 {baseDir}/scripts/openmandate.py close mnd_abc123 # 关闭任务
python3 {baseDir}/scripts/openmandate.py matches # 列出所有匹配
python3 {baseDir}/scripts/openmandate.py match m_xyz789 # 获取匹配详情
python3 {baseDir}/scripts/openmandate.py accept m_xyz789 # 接受匹配
python3 {baseDir}/scripts/openmandate.py decline m_xyz789 # 拒绝匹配
python3 {baseDir}/scripts/openmandate.py outcome m_xyz789 succeeded # 报告匹配结果
完整示例(Shell)
bash
1. 添加并验证联系人
python3 {baseDir}/scripts/openmandate.py add-contact alice@company.com
→ contactid: vcabc123, status: pending, OTP已发送至邮箱
python3 {baseDir}/scripts/openmandate.py verify-contact vc_abc123 12345678
→ status: verified
2. 创建任务(需求+提供,自动选择已验证联系人)
python3 {baseDir}/scripts/openmandate.py create \
我们需要一个UX设计机构来设计我们的B2B分析仪表板。120个企业客户,React前端。预算4-6万美元,8周。 \
A轮金融科技SaaS公司,180万美元ARR。两名前端工程师已准备好实施。
→ mandateid: mndabc123, pendingquestions: [{id: q3, ...}]
3. 回答后续问题(仔细阅读每个问题,具体回答)
python3 {baseDir}/scripts/openmandate.py answer mnd_abc123 [
{question
id:q3,value:deep
userresearch},
{question
id:q4,value:筛选系统是最大的痛点。用户需要在12个维度上进行切片。
}]
→ status: active, pending_questions: [] — 问题收集完成
4. 检查匹配(找到匹配时会通过邮件通知用户)
python3 {baseDir}/scripts/openmandate.py matches
5. 查看并回应
python3 {baseDir}/scripts/openmandate.py match m_xyz789
python3 {