Skip to main content

CrewAI tools for the OptionsAhoy equity-compensation calculators.

Project description

crewai-optionsahoy

CrewAI tools for the OptionsAhoy equity-compensation calculators. One crewai.tools.BaseTool per OptionsAhoy REST endpoint, built on the keyless optionsahoy client. No OptionsAhoy account, no application programming interface (API) key, full federal tax code plus all 50 states and the District of Columbia (DC).

Why not just ask the model?

We benchmarked five frontier large language models (LLMs), 3 runs each, 15 trials total, on the same multi-year incentive stock option (ISO) exercise problem. Every trial overshot the true after-tax outcome, by 2x to 20x. Multi-year scheduling has a search space larger than an LLM can reason through in-context; these tools return the verifiable answer instead.

Raw responses and scoring: llm-iso-benchmark. Full write-up: But can it do taxes though?.

What it provides

get_optionsahoy_tools() returns seven CrewAI BaseTools, each with a pydantic args_schema mirroring its endpoint:

  • optionsahoy_amt_iso_optimize - multi-year ISO exercise optimizer under the alternative minimum tax (AMT)
  • optionsahoy_nso_calculate - non-qualified stock option (NSO) exercise tax, sell-at-exercise versus hold
  • optionsahoy_rsu_sell_vs_hold - restricted stock unit (RSU) sell at vest versus hold for long-term capital gains
  • optionsahoy_concentration_analyze - single-stock concentration risk and the after-tax cost of diversifying
  • optionsahoy_protective_put_price - protective put and zero-cost collar pricing
  • optionsahoy_qsbs_check - qualified small business stock (QSBS) Section 1202 eligibility and exclusion
  • optionsahoy_equity_funding_plan - multi-year plan to fund a cash goal from equity by a target date

Coverage spans the full federal tax code plus all 50 states and DC. The adapter pulls in the keyless optionsahoy client automatically. No API key is read, stored, or sent anywhere.

Install

pip install crewai-optionsahoy

Quickstart

Equip a CrewAI agent with the tools and run a crew. CrewAI reads the model from the standard provider environment variables (for example OPENAI_API_KEY):

from crewai import Agent, Crew, Process, Task

from crewai_optionsahoy import get_optionsahoy_tools

tools = get_optionsahoy_tools()

advisor = Agent(
    role="Equity-compensation analyst",
    goal="Answer equity-compensation tax questions using the OptionsAhoy tools.",
    backstory=(
        "You analyze stock-option and equity tax questions for technology workers. "
        "You always call the OptionsAhoy tools for exact numbers instead of "
        "estimating the tax math yourself."
    ),
    tools=tools,
    llm="gpt-4o-mini",
    verbose=True,
)

task = Task(
    description=(
        "A founder acquired original-issuance stock in a US C-corporation on "
        "2018-01-01 for an adjusted basis of $10000, in the tech-software industry, "
        "issuer under $50M in gross assets at issuance and meeting the active-business "
        "test. They plan to sell on 2026-02-01 for an expected gain of $2,000,000. "
        "They file single in California with $250000 of ordinary income. Does this "
        "qualify for QSBS, and how much gain is excludable? "
        "Use the optionsahoy_qsbs_check tool."
    ),
    expected_output="Whether the position qualifies and the dollar amount of excludable gain.",
    agent=advisor,
)

crew = Crew(agents=[advisor], tasks=[task], process=Process.sequential, verbose=True)
print(crew.kickoff())

Pass your own configured client with get_optionsahoy_tools(client=OptionsAhoyClient(...)).

The seven endpoints accept forward-looking fields (such as expectedSalePrice or volatility) that the schema marks optional but the API requires at call time; set a covered ticker (for example "NVDA") to let the API derive them, or pass explicit values. Omitting both returns a clear 400 explaining which field is needed.

Runnable example and source

Related

Sibling packages wrapping the same calculators:

Other surfaces for the same calculators:

Built by AlphaLatitude Inc., the company behind OptionsAhoy.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

crewai_optionsahoy-0.1.1.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crewai_optionsahoy-0.1.1-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file crewai_optionsahoy-0.1.1.tar.gz.

File metadata

  • Download URL: crewai_optionsahoy-0.1.1.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for crewai_optionsahoy-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6ef99cc54d114e055393735956123f35ac57d54f92f8350e85064f0d2f1c0adc
MD5 8826a4158d06f382bb98e34a33706fdf
BLAKE2b-256 7221a1763ca35a4e5a8df6270113102ccbbff63af883130f99f62a0817ec5b07

See more details on using hashes here.

Provenance

The following attestation bundles were made for crewai_optionsahoy-0.1.1.tar.gz:

Publisher: publish-python.yml on AlvisoOculus/optionsahoy-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file crewai_optionsahoy-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for crewai_optionsahoy-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a194263014db6c500b9a5ea8650ba2060cf9cefd3cbc229e678466707ed81239
MD5 4a1a21cfab61d9701fa3a1d3b0459699
BLAKE2b-256 0f36b89f9c0e9075bf45073328b263710f564c1cad8870f42a9f245caf246917

See more details on using hashes here.

Provenance

The following attestation bundles were made for crewai_optionsahoy-0.1.1-py3-none-any.whl:

Publisher: publish-python.yml on AlvisoOculus/optionsahoy-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page