Job Lawyer¶
job_lawyer — G6 Lawyer job agent.
Cluster: Job Agents | Type: component | MCP Tools: 33
Overview¶
Domain-specialist job agent for legal professionals. Drafts contracts and legal instruments, reviews documents for risk, researches case precedent, prepares court briefs, files motions, and performs case analysis -- providing a structured legal-practice workflow within G6's safety-bounded, human-review-flagging JobAgentBlock framework.
MVP legal-use scope
job_lawyer is suitable for MVP and pilot workflows as legal research, drafting, review, checklist, and workflow support. It is not a lawyer, law firm, legal-opinion engine, compliance certification system, court-filing authority, or substitute for advice from a lawyer licensed in the relevant jurisdiction.
High-stakes legal operations require a jurisdiction and structured professional attestation before the block emits jurisdiction-specific legal output. The current attestation check is structural; it verifies that credential fields are present, but it does not independently validate bar membership, authority to practise, conflicts, privilege, current law, local filing rules, or client-specific facts. External legal/compliance review is required before using outputs for regulated-industry claims, enterprise commitments, court filings, or client-facing legal advice.
Live legal sources and enrichment integrations can be enabled where configured, but default behaviour prioritises deterministic pilot operation. Treat retrieved statutes, cases, regulations, risk scores, and compliance flags as decision support that must be checked against authoritative sources before action.
When to use:
- Drafting first-pass commercial contracts or NDAs from a structured brief
- Reviewing third-party agreements for unfavourable clauses, missing terms, or jurisdiction issues
- Researching relevant precedent and legislation to support a legal argument
- Preparing structured court briefs or regulatory submissions for qualified review
Example:
from mvp.job_lawyer import JobLawyerBlock, JobLawyerInput
block = JobLawyerBlock()
result = block.infer(JobLawyerInput(
task="Draft a commercial software development agreement between an Australian SaaS vendor and a US enterprise client",
jurisdiction="AU-NSW",
context={
"attestation": {
"credential_id": "NSW-SOLICITOR-ID",
"jurisdiction": "AU-NSW",
"issuer": "Relevant legal regulator",
},
"governing_law": "NSW",
"ip_ownership": "vendor",
"liability_cap_aud": 500_000,
},
))
# result.ok -> True; result.value -> JobLawyerOutput with result, artifacts
Works well with: job_framework, job_administration, job_consultant
Public API¶
JobLawyerBlock(JobAgentBlock)¶
G6 Lawyer job agent — matter-type routing + safety gate.
| Field | Type | Default |
|---|---|---|
name | str | 'job_lawyer' |
sector | SectorClassification | field(default_factory=lambda: _SECTOR) |
toolkit | ToolkitSpec \| None | field(default_factory=lambda: JOB_TOOLKITS.get('lawyer')) |
mcp_module | str | 'mvp.job_lawyer.lawyer_mcp.server' |
capabilities | ClassVar[set[type]] | {Extensible, HumanLearnable, Collaborative, ProblemSolvable, KnowledgeGrounded, Memorable, AgentCommunicable} |
CaseRecord(BaseModel)¶
A legal case record.
| Field | Type | Default |
|---|---|---|
case_id | str | '' |
case_number | str | '' |
title | str | '' |
case_type | str | '' |
status | str | 'open' |
client_id | str | '' |
jurisdiction | str | '' |
filed_date | str | '' |
facts | list[str] | Field(default_factory=list) |
issues | list[str] | Field(default_factory=list) |
ContractRecord(BaseModel)¶
A contract record.
| Field | Type | Default |
|---|---|---|
contract_id | str | '' |
title | str | '' |
contract_type | str | '' |
parties | list[dict[str, str]] | Field(default_factory=list) |
effective_date | str | '' |
expiry_date | str | '' |
status | str | 'draft' |
terms | dict[str, Any] | Field(default_factory=dict) |
LegalFinding(BaseModel)¶
A single legal finding from analysis.
| Field | Type | Default |
|---|---|---|
category | str | '' |
description | str | '' |
severity | str | 'info' |
recommendation | str | '' |
ComplianceFlag(BaseModel)¶
A compliance issue flag.
| Field | Type | Default |
|---|---|---|
regulation | str | '' |
requirement | str | '' |
status | str | 'non_compliant' |
details | str | '' |
PrecedentCitation(BaseModel)¶
A cited legal precedent.
| Field | Type | Default |
|---|---|---|
citation | str | '' |
court | str | '' |
year | int | 0 |
relevance_score | float | 0.0 |
summary | str | '' |
binding | bool | False |
JobLawyerInput(JobInput)¶
Input for the Lawyer job agent.
JobLawyerOutput(JobOutput)¶
Output from the Lawyer job agent.
JobLawyerMCPBlock(AIBlock[MCPJobLawyerInput, MCPJobLawyerOutput, dict])¶
26-op MCP block for the Lawyer job agent.
| Field | Type | Default |
|---|---|---|
name | str | 'job_lawyer_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: MCPJobLawyerInput) -> Result[MCPJobLawyerOutput]¶
MCPJobLawyerInput(BaseModel)¶
Input to JobLawyerMCPBlock — 26-op dispatch.
| Field | Type | Default |
|---|---|---|
op | Literal['draft_contract', 'review_document', 'research_precedent', 'prepare_brief', 'file_motion', 'analyze_case', 'evaluate_risk', 'assess_compliance', 'benchmark_outcomes', 'audit_procedures', '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 | '' |
MCPJobLawyerOutput(BaseModel)¶
Output from JobLawyerMCPBlock.
| 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 |
LawyerStore(JobStore)¶
SQLite store for the Lawyer job agent.
Constructor:
| Parameter | Type | Default |
|---|---|---|
db_path | str | ':memory:' |
Methods:
create_case(title: str, case_type: str = '', case_number: str = '', client_id: str = '', jurisdiction: str = '', filed_date: str = '', data: dict | None = None) -> str¶
get_case(case_id: str) -> dict | None¶
list_cases(status: str = '', case_type: str = '', limit: int = 50) -> list[dict]¶
update_case(case_id: str, **fields: Any) -> bool¶
create_contract(title: str, contract_type: str = '', parties: list | None = None, effective_date: str = '', expiry_date: str = '', data: dict | None = None) -> str¶
get_contract(contract_id: str) -> dict | None¶
list_contracts(status: str = '', limit: int = 50) -> list[dict]¶
create_precedent(citation: str, court: str = '', year: int = 0, relevance_score: float = 0.0, summary: str = '', data: dict | None = None) -> str¶
search_precedents(query: str = '', min_relevance: float = 0.0, limit: int = 20) -> list[dict]¶
get_precedent(precedent_id: str) -> dict | None¶
create_compliance_record(regulation: str, entity: str = '', findings: dict | None = None, assessed_date: str = '') -> str¶
list_compliance_records(regulation: str = '', entity: str = '', limit: int = 50) -> list[dict]¶
store_legal_artifact(name: str, content: dict, inputs: dict | None = None, constraints: dict | None = None, tags: str = '') -> str¶
Store a legal artifact with matter metadata and text redaction.
retrieve_legal_artifact(artifact_id: str, matter_id: str) -> dict | None¶
Retrieve a legal artifact only when the requested matter matches.
Functions¶
assemble_review_text(output: Any) -> str¶
Collect the reviewable free text from a JobLawyerOutput (duck-typed).
assess_lawyer_output(output: Any, qa_block: Any | None = None, generate: Any | None = None) -> GroundedRunResult¶
Run grounded four-valued QA over a lawyer output.
MCP Tools¶
| Operation | Source |
|---|---|
draft_contract | lawyer_mcp |
review_document | lawyer_mcp |
research_precedent | lawyer_mcp |
prepare_brief | lawyer_mcp |
file_motion | lawyer_mcp |
analyze_case | lawyer_mcp |
evaluate_risk | lawyer_mcp |
assess_compliance | lawyer_mcp |
benchmark_outcomes | lawyer_mcp |
audit_procedures | lawyer_mcp |
create_proposal | lawyer_mcp |
review_deliverable | lawyer_mcp |
delegate_task | lawyer_mcp |
report_status | lawyer_mcp |
request_feedback | lawyer_mcp |
store_artifact | lawyer_mcp |
retrieve_artifact | lawyer_mcp |
list_artifacts | lawyer_mcp |
search_artifacts | lawyer_mcp |
archive | lawyer_mcp |
plan_sprint | lawyer_mcp |
track_progress | lawyer_mcp |
reflect_on_outcome | lawyer_mcp |
get_capabilities | lawyer_mcp |
info | lawyer_mcp |
list_patterns | lawyer_mcp |
draft | lawyer_mcp |
review | lawyer_mcp |
ready | lawyer_mcp |
unknown | lawyer_mcp |
potentially_privileged | lawyer_mcp |
privileged | lawyer_mcp |
not_privileged | lawyer_mcp |