Field Agent Status
Overview
Use this skill to query the field-agent-ai backend for registered field members and their work progress. The backend treats Feishu Bot registration as the account entry point: a user sends /register name or 注册 name, an admin approves the member, then Agent status queries can read that member's progress.
Required Runtime Settings
The query script can read runtime settings from environment variables:
FIELD_AGENT_API_BASE_URL=https://test-waiqin.cloudplus.im
AGENT_API_TOKEN=your_agent_api_token
FIELD_AGENT_USER_AGENT=Mozilla/5.0 (compatible; FieldAgentStatusSkill/0.1.4; +https://test-waiqin.cloudplus.im)
In production, create a Skill Operator in the Web admin page and use the generated token as AGENT_API_TOKEN. New or reset tokens are shown only once; copy the token immediately because the admin list only shows the token prefix later.
To persist the Agent-side token across Skill upgrades, save it to the user-level config file:
python skills/field-agent-status/scripts/query_status.py --configure
Non-interactive setup:
python skills/field-agent-status/scripts/query_status.py --save-config --base-url https://test-waiqin.cloudplus.im --token your_agent_api_token
The config is saved outside the Skill directory:
~/.field-agent-ai/skill-config.json
Skill upgrades replace the package files but do not overwrite this user-level config. Environment variables still take precedence when set.
The packaged skill defaults to:
https://test-waiqin.cloudplus.im
Use FIELD_AGENT_API_BASE_URL only when overriding the deployment domain, such as local development or a staging migration.
Use FIELD_AGENT_USER_AGENT only when an edge firewall requires a specific allowed User-Agent for the /agent/* API path.
For local development:
FIELD_AGENT_API_BASE_URL=http://127.0.0.1:8000
If neither the server-wide AGENT_API_TOKEN nor any active Skill Operator exists, the API allows unauthenticated dev access. In production, create at least one active Skill Operator or set the server-wide token.
Query Progress
Prefer the bundled script:
python skills/field-agent-status/scripts/query_status.py <feishu_open_id>
Optional record limit:
python skills/field-agent-status/scripts/query_status.py <feishu_open_id> --limit 10
Show the persistent config path:
python skills/field-agent-status/scripts/query_status.py --config-path
The script calls:
GET /agent/members/{feishu_open_id}/status
It returns:
- member account status
- total field records
- result status counts
- review status counts
- latest field records
Interpret Results
member.status = active: the person is approved and valid.member.status = pending: the person registered through Feishu but still needs web/admin approval.member.status = rejected: the person cannot submit valid field records.total_records = 0: no accepted field records have been submitted yet.review_status_counts.need_revieworlow_confidence: mention that human review is needed.- Latest records are ordered newest first and include customer, task type, result, next action, and review status.
Registration Workflow
Feishu user command:
/register Zhang San
注册 张三
Admin approval endpoint:
POST /admin/members/{member_id}/approve
Admin rejection endpoint:
POST /admin/members/{member_id}/reject
Response Style
When answering a human, summarize in operational terms:
- whether the person is a valid approved member
- how many records they have submitted
- what the latest task/result/next action is
- whether any records need review
Avoid exposing raw tokens or internal headers.