TypeScript & Python SDKs

One client for prompts, the gateway, and tracing.

Install one package and you get cached prompt rendering, an OpenAI-compatible chat call, tool loops that stay in a single trace, and feedback — with the same surface in both languages.

install.shshell
# TypeScript / Node 18+
npm i @acruxcoreai/sdk

# Python 3.9+, async
pip install acruxcore

# hosted API base URL:
#   https://api.acruxcore.com/api/v1
export ACRUXCORE_API_KEY=ak_…

The surface

Six methods cover the whole platform.

The Python client is a full async port of the TypeScript one, so every capability below exists in both — only the naming convention changes.

prompts.render()

Resolve a prompt by name and alias

Returns the templated messages plus the version's attached tools. Cached locally per prompt and alias: a fresh entry answers with no network call, a stale one answers immediately and refreshes in the background, so promoting a new version never adds latency to the call that noticed.

gateway.chat()

Call any model through the gateway

One OpenAI-compatible completion. Pass stream for token-by-token output, and read the gateway metadata — provider, priced cost, cache status — off the same result.

gateway.runToolLoop()gateway.run_tool_loop()

Run the whole function-calling loop

Hand it messages, tools, and a dispatch map. It runs the turns, dispatches tool calls concurrently, and threads a single trace id through all of them — so a five-turn agent is one trace, not five orphans.

traces.ingest()

Record a step the gateway never saw

Report a span yourself for work that happens outside a model call — a retrieval step, a database read, a validation pass — and it joins the same trace tree.

traces.submitFeedback()traces.submit_feedback()

Attach feedback in code

Send a rating, label, or comment against a trace or one span, then update it later. This is the raw material an evaluation dataset is built from.

traces.get() · traces.list()

Read traces back

Fetch one trace with its spans, tokens, latency, and cost, or list traces with filters — useful for assertions in your own test suite.

agent.tsTypeScript
import acruxcore, { acrux } from '@acruxcoreai/sdk';
import { z } from 'zod/v4';

const hub = new acruxcore({ apiKey });

// a tool, registered with a decorator-style call
const lookupOrder = acrux.tool(
  { name: 'lookup_order', parameters: z.object({
    orderId: z.string(),
  }) },
  async ({ orderId }) => ({ orderId, status: 'shipped' }),
);

// prompt + its tools, served from cache
const render = await hub.prompts.render(
  'support-agent', 'production', { ticket },
);

// the whole tool loop, one trace + session
const result = await hub.gateway.runToolLoop({
  model: 'gpt-4o',
  messages: render.messages,
  tools: [lookupOrder],
  trace: { sessionId: 'ticket-4471' },
});

await hub.traces.submitFeedback({
  traceId: result.traceId, rating: 1,
});
agent.pyPython
from acruxcore import AcruxCore, acrux

hub = AcruxCore(api_key=api_key)

# a tool, registered with a decorator
@acrux.tool
async def lookup_order(order_id: str) -> dict:
    """Look up an order’s shipping status."""
    return {"order_id": order_id, "status": "shipped"}

# prompt + its tools, served from cache
render = await hub.prompts.render(
    "support-agent", "production",
    {"ticket": ticket},
)

# the whole tool loop, one trace + session
result = await hub.gateway.run_tool_loop(
    model="gpt-4o",
    messages=render.messages,
    tools=[lookup_order],
    trace={"session_id": "ticket-4471"},
)

await hub.traces.submit_feedback(
    trace_id=result.trace_id, rating=1,
)

No SDK? No problem

Everything is plain REST underneath.

The SDKs are conveniences, not gatekeepers. Every capability on this page is an HTTP endpoint you can call from any language — and the gateway speaks the OpenAI wire format, so most existing clients already work.

Get a key and install it.

Free while AcruxCore is in beta. Bring your own provider keys and the first render is a few lines away.