Job Political¶
job_political — G6 Political job agent.
Cluster: Job Agents | Type: component | MCP Tools: 26
Overview¶
Domain-specialist job agent for political staff and public sector advisors. Drafts policy documents, analyses legislation, prepares public statements and ministerial briefings, coordinates campaigns, manages constituent relations, and analyses polling data — providing structured political-office support within G6's safety-bounded, audit-trailed JobAgentBlock framework.
This component is decision-support software. It does not provide legal advice, electoral advice, or authority to publish, file, spend, target, or act without qualified human review. Public communications, campaign actions, compliance filings, regulatory reliance, and work involving personal data must be reviewed by an accountable human.
Live search, LLM enrichment, grounding, Experta, and Bayesian enrichment are opt-in (G6_JOB_LIVE_SEARCH=1, G6_JOB_LIVE_LLM=1, G6_JOB_ENABLE_GROUNDING=1, G6_JOB_ENABLE_EXPERTA=1, G6_JOB_ENABLE_BAYESIAN=1). With those flags disabled, the component uses deterministic local analysis and mock/degraded enrichment so first-run MCP usage remains fast and predictable.
Caveats and warnings:
- Outputs are decision support only, not legal, electoral, campaign-finance, compliance, publication, or lobbying advice.
- Human review is required before public statements, campaign actions, compliance filings, regulatory reliance, spending decisions, targeting decisions, or use with personal data.
- Built-in defaults are illustrative. If users do not provide real poll data, stakeholder lists, budgets, campaign details, jurisdictions, or source material, the component returns demo-grade analysis, not real-world findings.
- Jurisdiction matters. Electoral law, campaign finance, lobbying, FOI, parliamentary procedure, privacy, records-retention, and public-sector ethics rules vary by country, state, municipality, agency, and election cycle.
- Constituent and campaign workflows may involve sensitive personal or political data. Avoid unnecessary PII and follow applicable privacy, electoral-data, retention, consent, and access-control requirements.
When to use:
- Drafting a policy position paper with evidence base, stakeholder impact analysis, and recommendations
- Analysing draft legislation for implementation implications and unintended consequences
- Preparing ministerial question-time briefings with concise lines and supporting evidence
- Analysing polling or survey data to inform campaign messaging strategy
Example:
from mvp.job_political import JobPoliticalBlock, JobPoliticalInput
block = JobPoliticalBlock()
result = block.infer(JobPoliticalInput(
task="Draft a policy position paper on expanding renewable energy subsidies for residential solar in regional Australia",
context={"electorate": "regional-QLD", "party_platform": "net-zero-2035", "target_audience": "cabinet"},
))
# result.ok → True; result.value → JobPoliticalOutput with result, artifacts
Works well with: job_framework, job_researcher, job_public_relations
Public API¶
JobPoliticalBlock(JobAgentBlock)¶
G6 Political job agent — Tier 1 block with MCP delegation and one safety floor.
| Field | Type | Default |
|---|---|---|
name | str | 'job_political' |
sector | SectorClassification | field(default_factory=lambda: _SECTOR) |
toolkit | ToolkitSpec \| None | field(default_factory=lambda: JOB_TOOLKITS.get('political')) |
mcp_module | str | 'mvp.job_political.political_mcp.server' |
capabilities | ClassVar[set[type]] | {Extensible, HumanLearnable, Collaborative, ProblemSolvable, KnowledgeGrounded, Memorable, AgentCommunicable} |
Methods:
infer(data)¶
JobPoliticalInput(JobInput)¶
Input for the Political job agent.
JobPoliticalOutput(JobOutput)¶
JobPoliticalMCPBlock(AIBlock[MCPJobPoliticalInput, MCPJobPoliticalOutput, dict])¶
26-op MCP block for the Political job agent.
| Field | Type | Default |
|---|---|---|
name | str | 'job_political_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: MCPJobPoliticalInput) -> Result[MCPJobPoliticalOutput]¶
MCPJobPoliticalInput(BaseModel)¶
Input to JobPoliticalMCPBlock — 26-op dispatch.
| Field | Type | Default |
|---|---|---|
op | Literal['draft_policy', 'analyze_legislation', 'prepare_statement', 'coordinate_campaign', 'manage_constituents', 'analyze_polls', 'evaluate_platform', 'assess_sentiment', 'benchmark_engagement', 'audit_compliance', '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 | '' |
run_mode | str | 'beta' |
reviewer_signature | str | '' |
MCPJobPoliticalOutput(BaseModel)¶
Output from JobPoliticalMCPBlock.
| 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' |
human_review_required | bool | False |
PoliticalStore(JobStore)¶
SQLite store for the Political job agent.
Constructor:
| Parameter | Type | Default |
|---|---|---|
db_path | str | ':memory:' |
Methods:
save_policy(policy_id: str = '', title: str = '', domain: str = 'general', status: str = 'draft', summary: str = '', impact_score: float = 0.0, cost_estimate: float = 0.0, benefit_estimate: float = 0.0, stakeholders: list | None = None, equity_score: float = 0.0, feasibility: float = 0.0, data: dict | None = None) -> str¶
get_policy(policy_id: str) -> dict | None¶
list_policies(status: str = '', domain: str = '') -> list[dict]¶
save_legislation(bill_id: str = '', title: str = '', bill_type: str = 'bill', chamber: str = '', sponsor: str = '', status: str = 'introduced', summary: str = '', constitutional: bool = True, regulatory_impact: float = 0.0, sections: list | None = None, amendments: list | None = None, sunset_date: str = '', data: dict | None = None) -> str¶
get_legislation(bill_id: str) -> dict | None¶
list_legislation(status: str = '', bill_type: str = '') -> list[dict]¶
save_constituent(constituent_id: str = '', name: str = '', district: str = '', party: str = '', contact_email: str = '', issues: list | None = None, engagement_score: float = 0.0, voter_status: str = 'registered', demographics: dict | None = None, data: dict | None = None) -> str¶
get_constituent(constituent_id: str) -> dict | None¶
list_constituents(district: str = '', party: str = '') -> list[dict]¶
save_campaign(campaign_id: str = '', name: str = '', campaign_type: str = 'election', candidate: str = '', district: str = '', status: str = 'planning', budget: float = 0.0, spent: float = 0.0, poll_average: float = 0.0, target_turnout: float = 0.0, platform: list | None = None, volunteers: int = 0, data: dict | None = None) -> str¶
get_campaign(campaign_id: str) -> dict | None¶
list_campaigns(status: str = '') -> list[dict]¶
save_poll(campaign_id: str = '', pollster: str = '', sample_size: int = 0, margin_of_error: float = 0.0, candidate_a_pct: float = 0.0, candidate_b_pct: float = 0.0, undecided_pct: float = 0.0, methodology: str = '', quality_score: float = 0.0, poll_date: str = '', data: dict | None = None) -> str¶
get_polls(campaign_id: str) -> list[dict]¶
get_poll_average(campaign_id: str) -> dict¶
Compute weighted average of polls for a campaign.
save_compliance_record(entity_type: str = '', entity_id: str = '', compliance_type: str = '', status: str = 'pending', score: float = 0.0, violations: list | None = None, review_date: str = '', data: dict | None = None) -> str¶
get_compliance_records(entity_id: str = '', compliance_type: str = '') -> list[dict]¶
save_consultation(title: str = '', policy_id: str = '', status: str = 'open', start_date: str = '', end_date: str = '', submissions: int = 0, sentiment_score: float = 0.0, stakeholder_groups: list | None = None, summary: str = '', data: dict | None = None) -> str¶
get_consultations(policy_id: str = '', status: str = '') -> list[dict]¶
Functions¶
assemble_review_text(output: Any) -> str¶
Collect the reviewable free text from a JobPoliticalOutput (duck-typed).
assess_political_output(output: Any, qa_block: Any | None = None, generate: Any | None = None) -> GroundedRunResult¶
Run grounded four-valued QA over a political output.
MCP Tools¶
| Operation | Source |
|---|---|
draft_policy | political_mcp |
analyze_legislation | political_mcp |
prepare_statement | political_mcp |
coordinate_campaign | political_mcp |
manage_constituents | political_mcp |
analyze_polls | political_mcp |
evaluate_platform | political_mcp |
assess_sentiment | political_mcp |
benchmark_engagement | political_mcp |
audit_compliance | political_mcp |
create_proposal | political_mcp |
review_deliverable | political_mcp |
delegate_task | political_mcp |
report_status | political_mcp |
request_feedback | political_mcp |
store_artifact | political_mcp |
retrieve_artifact | political_mcp |
list_artifacts | political_mcp |
search_artifacts | political_mcp |
archive | political_mcp |
plan_sprint | political_mcp |
track_progress | political_mcp |
reflect_on_outcome | political_mcp |
get_capabilities | political_mcp |
info | political_mcp |
list_patterns | political_mcp |