Inspiration

A policy change can turn a sensible business decision into an expensive mistake. A new credit might reward an investment; a new requirement might make a supplier or product a liability. Reading the bill is only the beginning. An owner still needs to know whether it is likely to become law, whether it applies to their business, and whether to act now or wait.

We built Consul around that last question: “Given my business and the evidence available, what should I do?” We wanted to connect legislative research to a concrete decision, with visible assumptions, calculated tradeoffs, and sources a person can inspect.

What it does

Consul turns a selected US federal bill and company information into a passage forecast, financial scenarios, and a short decision brief. It compares responses such as certifying a product, changing suppliers, negotiating conditional terms, or waiting until a rule passes. The calculations show expected first-year impact, worst-case impact, and whether an option would be ready under the modeled passage scenarios.

The company also gets an interactive 3D workspace. Departments make the business easier to explore, while an optional Scene Designer chooses a building and room layout from a constrained design system. Setup-derived estimates and illustrative sample content are distinct from verified business records.

For a decision that deserves a second look, Consul convenes a council over selected saved evidence. Finance evaluates exposure, Operations responds on feasibility, Skeptic challenges the assumptions, and Chair delivers a cited decision while preserving disagreements and missing information. The council can calculate scenarios, retrieve supplementary web evidence, and publish charts, tables, or other visual artifacts.

The deployed demo lets visitors explore curated company workspaces, actual archived CREAO outputs, and saved council discussions. These are shared examples, including a fictional company, rather than private customer accounts. New agent execution runs on our configured local runner; the hosted app reads the saved results.

How we built it

The core pipeline uses four CREAO agents in sequence: Bill Analyst, Researcher, Impact Planner, and Brief Writer. Analyst extracts provisions and status; Researcher supplies context and evidence; Planner proposes company-specific scenarios and options; Writer explains the calculated results. Scene Designer is a separate, optional fifth CREAO agent.

We separated interpretation from arithmetic. Pure Python computes passage probabilities and business impacts. The impact engine accounts for modeled certification costs, supplier changes, inventory exposure, delays, capacity, and contract penalties. A numeric checker flags figures in the brief that cannot be matched to supplied inputs, allowing display rounding. This checks traceability; it does not prove that a legal interpretation or input assumption is correct.

Our forecast uses stage-conditioned logistic regression trained on official govinfo bill-status records for 31,268 House and Senate bills from the 117th and 118th Congresses. It builds historical snapshots using time remaining, bipartisan cosponsors, party control, companion bills, and cosponsor counts. Bills that passed both chambers use an observed rate because that stage has fewer examples. Research can adjust modeled odds within a bounded range.

The council uses the native Factory TypeScript SDK to run four real Droid sessions sequentially. Each role receives saved evidence and the earlier public positions. Dedicated tools expose Python policy calculations, JavaScript calculations, URL research, and visual publishing. Native shell and file tools are disabled. Structured outputs, known source IDs, and literal supporting excerpts constrain numerical claims.

SpacetimeDB provides durable council memory. A private Maincloud database stores company-scoped snapshots containing source evidence, completed turns, decisions, and artifacts. The Next.js server accesses the archive; its publisher identity controls writes, and server-side owner filters constrain reads. Revision checks reject stale updates and conflicting retries. Reopening a saved discussion reads its record without starting another paid session.

Our Next.js interface is deployed on Vercel. ElevenLabs supplies narration for the demonstration video.

Challenges we ran into

The hardest problem was making a plausible answer inspectable. A fluent agent can silently invent an amount, assume a bill applies, or treat a hypothetical benefit as guaranteed. We used constrained JSON, explicit assumptions, calculation tools, and source checks to make those failures easier to detect.

Strict checks also produced false rejections: typographic quotation marks and declared provision labels were initially mishandled. We corrected those narrow cases and revalidated the original saved public outputs, preserving the failure records without repeating paid calls.

Forecasting rare events brought a different challenge. Only 627 of the 31,268 bills in our training dataset became law themselves. Cross-Congress backtests beat the stage-only baseline in both directions, but some middle-probability predictions were overconfident. A useful forecast still needs its limits shown.

What we learned

AI works better here when its jobs are explicit: read evidence, propose options, challenge assumptions, and explain results. Code supplies the arithmetic and validates the output contract. Neither replaces human judgment about source quality, applicability, or the realism of a scenario.

We also learned that persistence is part of trust. Saving the exact evidence alongside the discussion lets someone revisit what the recommendation actually rested on, rather than receiving a fresh answer with silently different inputs.

What's next

We want to connect internal financial and operational accounts so scenarios require less manual setup. We also want explicit decision deadlines, clearer applicability questions, and conditions that would cause a recommendation to change.

State, local, and international rules are future extensions. Market trends could add context, but our first priority is a stronger link between a specific policy change, a company's commitments, and a decision it can defend.

Built With

Share this project:

Updates

Submission history