Auracle docs
Auracle/Docs/Developer

Developer

Three machine surfaces: HTTP/JSON, MCP, and direct Postgres. Each authenticates with a separate token from ~/auracle/.env.

HTTP API

All HTTP routes are served by the Houston container at http://localhost:1969/api/. Every route requires X-API-Key: $HOUSTON_API_KEY — no exceptions, no fallback. Cross-origin requests are rejected by default.

Forge routes

External (through Caddy TLS) URLs are /api/forge/*; Caddy strips /api/ and forwards to Houston at /forge/*. The direct Houston port (1969) is what the local-dev examples below show.

Method · path (direct to Houston)Returns
GET /forge/providers The bundled providers registry. No params.
GET /forge/catalog List datasets. Query params: verdict, provider, asset_class, limit, offset.
GET /forge/catalog/{id} Single dataset with full quality-dimension breakdown.
GET /forge/ambient The current AmbientContext as JSON.

Example: filter catalog

curl -s http://localhost:1969/forge/catalog?verdict=useful \
  -H "X-API-Key: $HOUSTON_API_KEY" \
  | jq '.datasets[] | {id, provider, capability, usefulness_score, verdict}'

{ "id": 12, "provider": "polygon.io", "capability": "bars.daily",
  "usefulness_score": 87, "verdict": "useful" }
{ "id":  7, "provider": "polygon.io", "capability": "options.chains",
  "usefulness_score": 81, "verdict": "useful" }
…

Example: ambient context

curl -s http://localhost:1969/forge/ambient \
  -H "X-API-Key: $HOUSTON_API_KEY"

{
  "install_uuid": "00000000-…",
  "tier": "pro",
  "enabled": true,
  "catalog_signature": "7a3f9e1b2c4d5e6f",
  "relevant_datasets": [ … 5 entries … ],
  "system_prompt_injection": "─── Auracle ambient context …"
}

Errors

Standard problem-detail responses (application/problem+json).

StatusMeaning
401Missing or invalid bearer.
403License tier doesn't permit this endpoint.
404Dataset / plan / candidate id not found.
409Conflicting state (e.g. promote a candidate that's already promoted).
429Per-day cost cap reached.
503Forge scan in progress; retry with the Retry-After header.

MCP tools

The MCP server is a standalone process at http://localhost:7777, separate from Houston. It speaks the Model Context Protocol over streamable HTTP. Point Claude Desktop (or any MCP client) at it with Authorization: Bearer $AURACLE_MCP_TOKEN from your .env. The server negotiates api_version: 1; future versions are added additively.

ToolWhat it does
forge_inspect_catalogReturn the current catalog, optionally filtered. Read-only.
forge_dataset_detailDetailed quality breakdown for one dataset. Read-only.
forge_propose_planAsk the Planner to emit a hypothesis from a free-text description plus a list of dataset ids.
forge_run_synthesisKick off a Synthesis run on a queued plan. Returns a job id; poll forge_job_status.
forge_job_statusPoll for the result of any agent job.
forge_promote_candidateMove a candidate out of _forge/. Requires confirm: true in the params.

Schema

Eight tables underpin the Forge. All live in the default Postgres schema; all use BIGSERIAL primary keys and timestamp-with-tz columns. Schema migrations run idempotently on every boot — new columns and tables land additively.

providers

id              BIGSERIAL PRIMARY KEY
name            TEXT NOT NULL UNIQUE
kind            TEXT NOT NULL   -- market_data | broker | llm | notification | infra
base_url        TEXT NOT NULL
auth_type       TEXT NOT NULL
openapi_url     TEXT
adapter_path    TEXT
capability_taxonomy  JSONB
registry_source TEXT NOT NULL DEFAULT 'bundled'
confidence      NUMERIC(4,3) NOT NULL DEFAULT 1.000
created_at      TIMESTAMPTZ NOT NULL DEFAULT NOW()

forge_datasets

id                  BIGSERIAL PRIMARY KEY
provider_id         BIGINT NOT NULL REFERENCES providers(id)
capability          TEXT   NOT NULL          -- e.g. 'bars.daily', 'options.chains'
name                TEXT   NOT NULL          -- human label
asset_class         TEXT                     -- equities | crypto | futures | …
grain               TEXT                     -- '1d' | '1m' | 'tick'
history_years       NUMERIC(5,2)
schema_json         JSONB NOT NULL
storage_uri         TEXT  NOT NULL           -- e.g. postgres://…  s3://…

coverage            INTEGER  CHECK (coverage BETWEEN 0 AND 100)
freshness           INTEGER  CHECK (freshness BETWEEN 0 AND 100)
completeness        INTEGER  CHECK (completeness BETWEEN 0 AND 100)
uniqueness          INTEGER  CHECK (uniqueness BETWEEN 0 AND 100)
stability           INTEGER  CHECK (stability BETWEEN 0 AND 100)
trading_relevance   INTEGER  CHECK (trading_relevance BETWEEN 0 AND 100)

usefulness_score    INTEGER                  -- geometric mean of the six dims
verdict             TEXT                     -- useful | marginal | poor | irrelevant
suggested_uses      JSONB                    -- array of free-text use cases
scored_at           TIMESTAMPTZ
created_at          TIMESTAMPTZ NOT NULL DEFAULT NOW()

Other tables (summary)

TablePurpose
forge_tool_registryPer-install record of probe adapters discovered or generated for unknown providers.
forge_dataset_metadataFree-form key/value notes attached to a dataset (sample rows, column histograms).
forge_lineageEdges between datasets — e.g. dataset 18 is a derivative of dataset 12.
forge_research_plansThe structured-hypothesis records.
forge_strategy_candidatesSynthesis output: code path, backtest result blob, status.
forge_agent_runsAudit log: every agent invocation with cost, fingerprints, duration.

Compatibility matrix

Auracle ships under semver. The Forge HTTP and MCP surfaces negotiate an explicit api_version on every request — the server accepts the lowest version it supports and the client adapts.

AuracleHTTP api_versionMCP api_versionSchemaNotes
2.0.xv1Pre-Forge releases.
2.1.x11v2 (additive)Forge substrate (schema + read API).
2.2.x11v2Discovery + Probe ship.
2.3.x1 (+2 opt-in)1 (+2 opt-in)v3 (additive)Planner ships.

Within a major version, removed fields appear as null for older clients; new fields are ignored. Across majors, the schema migrates additively and the API version bumps explicitly.

Contributing

The bundled providers registry lives in auracle/providers/registry.py as a tuple of ProviderSpec dataclasses. To add a provider:

  1. Fork the auracle-installer repo (the registry will be moved here in 2.2).
  2. Add a ProviderSpec entry. Required fields: name, kind, base_url, auth_type, key_prefixes (a tuple of regex patterns), capabilities (a tuple of capability strings).
  3. If the provider needs a custom adapter (most do), drop a Python module under auracle/adapters/<name>.py conforming to the ProbeAdapter protocol.
  4. Add a registry test in tests/test_providers_registry.py with a sample key string that classify_key should match.
  5. Open a PR. The CI runs the test matrix; merging requires green CI and one approver.
# Example: adding "twelvedata"
ProviderSpec(
    name="twelvedata",
    kind="market_data",
    base_url="https://api.twelvedata.com",
    auth_type="api_key",
    key_prefixes=(r"^[a-f0-9]{32}$",),
    capabilities=("bars.daily", "bars.intraday", "fundamentals"),
    adapter_path="auracle.adapters.twelvedata",
    docs_url="https://twelvedata.com/docs",
),
Pattern ordering The registry is scanned in order. If two providers share an overlapping key prefix, list the more specific one first. The sharadar entry is intentionally last with empty key_prefixes=() — it's an explicit-label-only provider that would otherwise shadow generic patterns.