Skip to main content

function.json (bicycle.function/v1 — function.json)

Synced from bicycle-studio-api

Source: _generated/function-manifest.md in the local directory context-collection (not yet on origin/platform), synced 2026-09-26. Do not edit this page here; change the source and run yarn sync:studio.

That source is itself generated (by arch/context-collection/build.py from data-app-runtime b21a421 bicycle_exec/schemas/bicycle.function.v1.schema.json); change its source and re-run its build.

Required: schema, name, input_schema, output_schema, capabilities.

fieldtypenotes
schema
namestringRegistry key within the scope; <= 56 chars so the MCP tool name fn_<name> is <= 64.
titlestring
kindenum code/llm/agent/lookup/classifyContract 1.1. code: entrypoint + image + *.py, quality gate tests[]. llm / agent: no code, no image; quality gate evals. Contract 1.2 (additive): lookup (one read-only connector tool, run as the viewer) and classify (a closed label set); no code, run remotely, evals optional. Immutable per function name.
entrypointstringmodule:function, e.g. main:handler. Signature: def handler(input: dict, ctx) -> dict.
imagestringCatalog name and major, e.g. bda-python:3. The lock pins the digest. v1 accepts only bda-python:3.
input_schemajsonSchemaObject
output_schemajsonSchemaObject
capabilitiesarray
resourcesobject
resources.classenum fn-xs/fn-small/fn-medium
resources.jobenum small/medium/largeJob path (workflow callers only in v1). Mutually exclusive with class.
timeout_msinteger<= 30000 when mode is sync; <= 900000 on the warm path. Longer runs take the Job path.
modeenum sync/asyncasync = :submit + poll (the v1 kit default). sync is flag-gated until on-demand nodes exist.
deterministicbooleantrue enables caching of workflow function nodes; the validator then lints wall-clock and unseeded randomness (422 volatile_in_deterministic).
visibilityobject
visibility.audienceenum private/app/tenant/bicycle
visibility.exposeobject
visibility.expose.mcpboolean
visibility.expose.agentsboolean
visibility.expose.workflowsboolean
visibility.expose.appsboolean
testsarrayRequired for kind code; optional for llm and agent (evals are their gate).
llmobjectkind llm only: one structured model call. prompt/system are package files; the prompt uses {{input<pointer>}} only.
llm.modelmodelId
llm.promptpromptPath
llm.systempromptPath
llm.effortenum low/medium/high
llm.max_output_tokensinteger
llm.on_invalidenum repair_once/fail
llm.max_cost_usdnumber
agentobjectkind agent only: a Bicycle agent by ref, or an inline agent-spec/v1 (exactly one).
agent.refstring
agent.specobject
lookupobjectkind lookup only: one read-only connector tool, run as the viewer on the viewer's own connection. config is closed per tool by the executor.
lookup.connectorstring
lookup.toolstring
lookup.access
lookup.configobject
classifyobjectkind classify only: one text field of the input into a closed label set. The text is classified, never put into instructions.
classify.labelsarray
classify.multi_labelboolean
classify.instructionsstring
classify.text_fieldstring
grantsobjectkind agent only: what the agent may use, intersected with the deployment's and the tenant's connections.
grants.connectorsarray
grants.functionsarray
budgetsobjectkind agent only.
budgets.max_stepsinteger
budgets.max_cost_usdnumber
budgets.max_wall_sinteger
evalsobjectEval suites in the package. Opt-in (DECISIONS #32): an empty list or no block at all is valid; an eval policy in Studio is what makes them a publish gate.
evals.suitesarray
docsobject
docs.summarystring
docs.descriptionstring<= 1000 when expose.mcp.
docs.examplesarray

kind: lookup is RETIRED (DECISIONS #42): do not create one; read a connection with an agent that has access to it. agent.spec is typed as a bare object here: its fields are in 04-agents.md until agent-spec/v1 has a published schema (MCP-GITHUB-CHANGES.md Rank 9).