Future AGI SDKs: Python, TypeScript, Java, and C#

Evaluate LLM outputs, trace AI calls, optimize prompts, and test voice agents. Python, TypeScript, Java, and C# supported.

📝
TL;DR
  • Python: evals, tracing, datasets, prompts, optimization, simulation
  • TypeScript: evals, tracing, datasets, prompts
  • Java / C#: tracing
  • For a first Python evaluation, install agent-learning-kit==0.3.7 in a fresh virtual environment. The local example below needs no keys.

Future AGI is a set of packages that evaluate LLM outputs, trace calls across your stack, optimize prompts, and load-test voice agents. Install what you need, skip what you don’t.

Language Support

ModulePythonTypeScriptJavaC#
EvaluationsYesYesNoNo
TracingYesYesYesYes
DatasetsYesYesNoNo
PromptsYesYesNoNo
Prompt OptimizationYesNoNoNo
SimulationYesNoNoNo

Quickstart

Start in a fresh virtual environment. Install agent-learning-kit and use its fi.alk.evals module. Existing from fi.evals import evaluate code also works with this package.

python3.12 -m venv .venv-evals
source .venv-evals/bin/activate  # Windows PowerShell: .venv-evals\Scripts\Activate.ps1
python -m pip install agent-learning-kit==0.3.7

Try a local check. It needs no API key:

from fi.alk import evals

result = evals.evaluate("contains", output="Unused gear can be returned within 30 days.", keyword="30 days")
print(result.passed)  # True

For a hosted template, see Cloud evals. For tracing setup, see Tracing.

Use the local ESM entry point for a string check that needs no keys. Start in an empty directory with Node.js 22.18 or later.

npm install @future-agi/agent-learning-kit@0.4.0

Save this as local-eval.mts and run node local-eval.mts. The output is 1 because the reply includes the return window.

import { LocalEvaluator } from "@future-agi/agent-learning-kit/local";

const evaluator = new LocalEvaluator();
const result = evaluator.evaluate(
  "contains",
  [{ response: "Unused gear can be returned within 30 days." }],
  { keyword: "30 days" },
);
console.log(result.results.eval_results[0].output);

Want tracing too?

npm install @traceai/fi-core @traceai/openai

Java support covers tracing. To resolve the OpenAI instrumentor and its provider SDK from Maven Central, save this as pom.xml in an empty directory. With a JDK and Maven installed, run mvn -B -ntp dependency:resolve.

<project xmlns="http://maven.apache.org/POM/4.0.0">
  <modelVersion>4.0.0</modelVersion>
  <groupId>example.ridgeline</groupId>
  <artifactId>support-tracing</artifactId>
  <version>1.0.0</version>
  <dependencies>
    <dependency>
      <groupId>com.futureagi</groupId>
      <artifactId>traceai-java-openai</artifactId>
      <version>1.4.1</version>
    </dependency>
    <dependency>
      <groupId>com.openai</groupId>
      <artifactId>openai-java</artifactId>
      <version>0.8.0</version>
    </dependency>
  </dependencies>
</project>

See the Tracing docs for setup instructions.

C# support covers tracing only. With the .NET 10 SDK installed, create a console project and add the tracing package:

dotnet new console --framework net10.0 --output RidgelineSupport
dotnet add RidgelineSupport/RidgelineSupport.csproj package fi-instrumentation-otel --version 1.0.0
dotnet build RidgelineSupport/RidgelineSupport.csproj

See the Tracing docs for setup instructions.

Getting an error? Check these common issues

ModuleNotFoundError: No module named 'fi.evals': Activate the eval environment and run python -m pip install agent-learning-kit==0.3.7 with the same Python interpreter you use for the example.

Authentication error on a Turing eval: Set both FI_API_KEY and FI_SECRET_KEY. Local string checks do not read these keys.

Packages

Python

Choose the package for the task:

PackageInstallWhat it doesPython
futureagipip install futureagiDatasets, prompt versioning, knowledge bases3.9+
agent-learning-kitpython -m pip install agent-learning-kit==0.3.7Local evaluation metrics and hosted Turing evaluations3.10+
fi-instrumentation-otelpip install fi-instrumentation-otelOpenTelemetry tracing core3.10–3.15 for core 1.5.0 (HTTP or gRPC); the legacy evaluation extra supports 3.10–3.14
traceai-*pip install traceAI-openaiFramework-specific tracingDepends on the instrumentor and framework version

The kit also provides fi.alk.optimize for prompt optimization and fi.alk.simulate for agent simulation.

Note

Use separate virtual environments for Agent Learning Kit and the futureagi platform SDK. Their current wheels install different code at some of the same fi/ paths. For example, installing the kit after futureagi==0.7.0 can break from fi import Client. Installing the packages in the other order is not a fix.

Warning

Moving from ai-evaluation? Install Agent Learning Kit in a new virtual environment. Both packages install the same fi/ files, so uninstalling ai-evaluation after the kit is in place deletes files the kit needs and from fi.evals import evaluate fails. If you must reuse an environment, run python -m pip uninstall -y ai-evaluation futureagi before you install the kit. ai-evaluation releases before 1.1.0 also install futureagi, which should stay in a separate environment from the kit, as the note above explains.

TypeScript

PackageInstallWhat it does
@future-agi/sdknpm install @future-agi/sdkDatasets, prompt versioning, knowledge bases
@future-agi/agent-learning-kitnpm install @future-agi/agent-learning-kitEval metrics and guardrails
@traceai/fi-corenpm install @traceai/fi-coreTracing core
@traceai/openainpm install @traceai/openaiOpenAI tracing instrumentor

Java and C#

Tracing only. Java instrumentors are published on Maven Central under com.futureagi. The C# package fi-instrumentation-otel is published on NuGet. See the Tracing reference for details.

List of SDKs

Follow the reference for the SDK you need.

Was this page helpful?

Questions & Discussion