Job Services¶
job_services — G6 Services job agent.
Cluster: Job Agents | Type: component | MCP Tools: 26
Overview¶
Domain-specialist job agent for customer service and field-service professionals. Handles inbound requests, resolves complaints using structured root-cause analysis, schedules service appointments, sends follow-up communications, captures satisfaction ratings, and analyses support-ticket trends — all within G6's safety-bounded, audit-trailed JobAgentBlock framework.
Pilot-ready, not enterprise-ready
job_services is suitable for MVP pilots, local MCP workflows, and design-partner validation where deterministic service triage, SLA review, sentiment analysis, and audit support are useful. It should not be presented as an enterprise production service on its own. Before using it for paid or regulated customer workflows, run a clean-machine MCP install smoke test, verify the surrounding dependency/plugin environment, confirm persistence and backup expectations, and enable live LLM/search integrations only after the configured backends have passed health checks.
By default, live LLM, debate, and web-search enrichment are disabled so first-run workflows remain fast, local, and deterministic. Set G6_JOB_LIVE_LLM=1 or G6_JOB_LIVE_SEARCH=1 only when the operator accepts the extra latency, availability dependency, and possible API cost.
When to use:
- Triaging and routing inbound service requests based on urgency, category, and SLA
- Resolving customer complaints with structured RCA and a documented resolution path
- Scheduling field-service appointments against technician availability and territory
- Analysing ticket volume and resolution-time trends to surface systemic issues
Example:
from mvp.job_services import JobServicesBlock, JobServicesInput
block = JobServicesBlock()
result = block.infer(JobServicesInput(
task="Handle an escalated complaint from a business customer reporting 3 days of intermittent broadband outages and draft the resolution response",
context={"customer_id": "BUS-44821", "ticket_id": "T-98203", "sla_tier": "business-gold"},
))
# result.ok → True; result.value → JobServicesOutput with result, artifacts
Works well with: job_framework, job_hospitality, job_manager
Public API¶
JobServicesInput(JobInput)¶
Input for the Services job agent.
JobServicesOutput(JobOutput)¶
JobServicesBlock(JobAgentBlock)¶
G6 Services job agent — Tier 1 block with MCP delegation.
| Field | Type | Default |
|---|---|---|
name | str | 'job_services' |
sector | SectorClassification | field(default_factory=lambda: _SECTOR) |
toolkit | ToolkitSpec \| None | field(default_factory=lambda: JOB_TOOLKITS.get('services')) |
mcp_module | str | 'mvp.job_services.services_mcp.server' |
capabilities | ClassVar[set[type]] | {Extensible, HumanLearnable, Collaborative, ProblemSolvable, KnowledgeGrounded, Memorable, AgentCommunicable} |
Methods:
infer(data)¶
MCPJobServicesInput(BaseModel)¶
Input to JobServicesMCPBlock — 26-op dispatch.
| Field | Type | Default |
|---|---|---|
op | Literal['handle_request', 'resolve_complaint', 'schedule_service', 'follow_up', 'rate_satisfaction', 'analyze_tickets', 'evaluate_sla', 'assess_sentiment', 'benchmark_response_time', 'audit_resolution', 'create_proposal', 'review_deliverable', 'delegate_task', 'report_status', 'request_feedback', 'store_artifact', 'retrieve_artifact', 'list_artifacts', 'search_artifacts', 'archive', 'plan_sprint', 'track_progress', 'reflect_on_outcome', 'get_capabilities', 'info', 'list_patterns'] | required |
task | str | '' |
context | dict[str, Any] | Field(default_factory=dict) |
parameters | dict[str, Any] | Field(default_factory=dict) |
artifact_id | str | '' |
query | str | '' |
request_id | str | '' |
run_id | str | '' |
run_mode | str | 'beta' |
reviewer_signature | str | '' |
MCPJobServicesOutput(BaseModel)¶
Output from JobServicesMCPBlock.
| Field | Type | Default |
|---|---|---|
op | str | required |
result | str | '' |
artifacts | list[dict[str, Any]] | Field(default_factory=list) |
records | list[dict[str, Any]] | Field(default_factory=list) |
message | str | '' |
count | int | 0 |
found | bool | False |
metadata | dict[str, Any] | Field(default_factory=dict) |
degraded | bool | False |
degradation_reason | str \| None | None |
completion_state | Literal['verified', 'qualified-draft', 'blocked-escalated'] | 'qualified-draft' |
request_id | str | '' |
run_id | str | '' |
JobServicesMCPBlock(AIBlock[MCPJobServicesInput, MCPJobServicesOutput, dict])¶
26-op MCP block for the Services job agent.
| Field | Type | Default |
|---|---|---|
name | str | 'job_services_mcp' |
state | dict | field(default_factory=dict) |
db_path | str | ':memory:' |
resource_bounds | ResourceBounds | field(default_factory=ResourceBounds) |
usage | ResourceUsage | field(default_factory=ResourceUsage) |
Methods:
infer(data: MCPJobServicesInput) -> Result[MCPJobServicesOutput]¶
ServicesStore(JobStore)¶
SQLite store for the Services job agent.
Constructor:
| Parameter | Type | Default |
|---|---|---|
db_path | str | ':memory:' |
Methods:
save_client(client_id: str = '', name: str = '', tier: str = 'standard', industry: str = '', contact_email: str = '', annual_value: float = 0, satisfaction: float = 0, status: str = 'active', data: dict | None = None) -> str¶
get_client(client_id: str) -> dict | None¶
list_clients(status: str = '') -> list[dict]¶
save_engagement(engagement_id: str = '', client_id: str = '', title: str = '', service_type: str = '', fee_structure: str = 'hourly', contract_value: float = 0, start_date: str = '', end_date: str = '', status: str = 'active', milestones: list | None = None, data: dict | None = None) -> str¶
get_engagement(engagement_id: str) -> dict | None¶
list_engagements(client_id: str = '', status: str = '') -> list[dict]¶
save_contract(contract_id: str = '', client_id: str = '', engagement_id: str = '', terms: dict | None = None, monthly_value: float = 0, term_months: int = 12, renewal_date: str = '', status: str = 'active', data: dict | None = None) -> str¶
get_contract(contract_id: str) -> dict | None¶
list_contracts(client_id: str = '', status: str = '') -> list[dict]¶
save_ticket(ticket_id: str = '', client_id: str = '', category: str = '', priority: str = 'P3', subject: str = '', description: str = '', status: str = 'open', assigned_to: str = '', resolution: str = '', sla_target_hrs: float = 24, resolved_at: str = '') -> str¶
get_ticket(ticket_id: str) -> dict | None¶
list_tickets(status: str = '', client_id: str = '') -> list[dict]¶
count_tickets(status: str = '') -> int¶
save_sla_record(period: str = '', total_tickets: int = 0, met_sla: int = 0, compliance_pct: float = 0, avg_handle_sec: float = 0, abandoned: int = 0, data: dict | None = None) -> str¶
list_sla_records(limit: int = 20) -> list[dict]¶
save_article(article_id: str = '', category: str = '', title: str = '', content: str = '', views: int = 0, helpful_yes: int = 0, helpful_no: int = 0, tickets_deflected: int = 0, status: str = 'published', data: dict | None = None) -> str¶
get_article(article_id: str) -> dict | None¶
list_articles(category: str = '') -> list[dict]¶
save_agent(agent_id: str = '', name: str = '', skills: list | None = None, categories: list | None = None, languages: list | None = None, tiers: list | None = None, available: bool = True, utilization_pct: float = 0, quality_score: float = 0, data: dict | None = None) -> str¶
list_agents(available_only: bool = False) -> list[dict]¶
Functions¶
assemble_review_text(output: Any) -> str¶
Collect the reviewable free text from a JobServicesOutput (duck-typed).
assess_services_output(output: Any, qa_block: Any | None = None, generate: Any | None = None) -> GroundedRunResult¶
Run grounded four-valued QA over a services output.
MCP Tools¶
| Operation | Source |
|---|---|
handle_request | services_mcp |
resolve_complaint | services_mcp |
schedule_service | services_mcp |
follow_up | services_mcp |
rate_satisfaction | services_mcp |
analyze_tickets | services_mcp |
evaluate_sla | services_mcp |
assess_sentiment | services_mcp |
benchmark_response_time | services_mcp |
audit_resolution | services_mcp |
create_proposal | services_mcp |
review_deliverable | services_mcp |
delegate_task | services_mcp |
report_status | services_mcp |
request_feedback | services_mcp |
store_artifact | services_mcp |
retrieve_artifact | services_mcp |
list_artifacts | services_mcp |
search_artifacts | services_mcp |
archive | services_mcp |
plan_sprint | services_mcp |
track_progress | services_mcp |
reflect_on_outcome | services_mcp |
get_capabilities | services_mcp |
info | services_mcp |
list_patterns | services_mcp |