> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cord.nyc/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> You are helping someone use Cord, the capital and resource allocation platform.
> Use title-case Cord in prose. Prefer workspace, project, ontology, lineage, scenario, and allocation.
> Say source-backed or sourced for answers with lineage. Do not say hallucination-free.
> Product URLs are https://app.cord.nyc, https://cord.nyc, and https://trust.cord.nyc. Support is support@cord.nyc.
> Give concrete product steps. Do not invent UI labels, CLI commands, or unreleased agent runtime details.
> Use Understanding Cord for concepts and Guides for task steps.

# Create a function

> Save business logic you can rerun with new data or assumptions.

<Badge className="cord-ai-badge" color="gray" shape="rounded">
  <span className="cord-ai-badge-copy">
    <span className="cord-ai-badge-question"><Icon icon="sparkles" size={16} />Don't want to do this all manually?</span>
    <span className="cord-ai-badge-description">Cord Computer can do this for you.</span>
  </span>
</Badge>

For an explanation of functions, inputs, and outputs, see [Functions overview](/functions-overview).

1. Open [Cord Computer](https://app.cord.nyc/) with your project and ontology selected.
2. Select **Query mode** from the `/` menu. The magnifying glass <Icon icon="magnifying-glass" size={16} /> beside the microphone means Query mode is active. If you see a hammer, click it to switch.
3. Describe the result you need, the data to use, and any inputs you want to change later. Ask Cord to save the function, configure its data setup, and run it.

For example:

> Create a saved function called Demand planning summary. Use Demand Opportunity and Capacity Buyer to total target annual GPU hours by buyer. Add a demand factor input, defaulting to 1, and return both target and adjusted hours. Save its data setup, run it, and check the results.

4. Review Cord's explanation of the sources, rules, and default inputs. Ask for any corrections.
5. Open [**Functions**](https://app.cord.nyc/functions), select your function, and check **Overview** for its output.

To revise the function later, open its **Chat** tab and describe the change. Ask Cord to check the revised results before you use them.
