Skip to content

API Reference parrot_tools.legal.boe.sync

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot_tools.legal.boe.sync

View source

sync_boe — thin entrypoint that runs the BOE delta sync for a tenant.

Constructs the OntologyRefreshPipeline collaborators and calls run(tenant_id, domain="legal"). Deliberately free of any scheduler import — the deploying agent decides whether to wire this to @schedule (ai-parrot-server) or an external cron; see sync_boe's docstring for the wiring recipe.

Function sync_boe

Run the BOE delta sync for one tenant.

Constructs a standalone OntologyRefreshPipeline (tenant manager, graph store, relation discovery, the shared DataSourceFactory, and an ontology cache — no vector store, since v1 does no embedding) and runs it against the "legal" domain. After the pipeline's node sync completes, also bridges the modifica/deroga provenance edges parsed by BOEDataSource directly into ArangoOntologyGraphStore.create_edges — see _sync_provenance_edges's docstring for why the generic pipeline cannot create them on its own.

Deployment note: this function has no scheduler dependency (this module never imports the parrot.scheduler package — importing the scheduler here would make the legal toolkit depend on the ai-parrot-server satellite). It is therefore equally callable from an external cron, or wired to ai-parrot-server's autonomous scheduler by the deploying agent using the schedule decorator and ScheduleType enum that parrot.scheduler exposes, e.g. (import added by the consuming module, not here)::

@schedule(ScheduleType.DAILY, hour=4, minute=0)
async def nightly_boe(self):
    await sync_boe(tenant_id="legal_civil")

sync_boe(tenant_id: str, since: date | None = None) -> RefreshReport

Parameter Type Default Description
tenant_id str Tenant identifier to resolve via TenantOntologyManager.resolve(tenant_id, domain="legal").
since date | None None Optional lower bound for incremental sync. Threaded into the BOEDataSource config as source_configs={"boe": {"since": since}}.

Returns: RefreshReport — The RefreshReport produced by OntologyRefreshPipeline.run(tenant_id, domain="legal").

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally