Skip to main content

A Python client library for interacting with the General Reasoning platform

Project description

AGI Client

A Python client library for interacting with the General Reasoning platform API.

The documentation is available here.

Installation

You can install the package using pip:

pip install agi

Making API Calls

Obtain an API key from the website. Then:

import agi

client = agi.Client(api_key=YOUR_API_KEY)

# Download reasoning traces and verifications as a .jsonl
client.data.get(task='math-word-problems', model='DeepSeek-R1')

Evaluating your reasoning model

The full evaluation guide is available here. A boilerplate example is shown below:

import agi
                
client = agi.Client("YOUR_API_KEY")
model = "USERNAME/MODEL_NAME"

# Retrieve test questions
data = client.evals.get(
    task='mathematical-brainteasers', 
    split='test'
)
question = data['questions']

# Submit model evaluations
for question in questions:
    reasoning_trace, answer = MyModel(
        system_prompt=question['system_prompt'],
        question=question['text']
    ) # Replace with your model logic
    client.evals.submit(
        id=question['id'],
        model=model,
        reasoning_trace=reasoning_trace,
        answer=answer
    )

Running our verification and grading models

Read more about our grader and verifier here

import agi 
 
client = agi.Client(api_key=YOUR_API_KEY)
 
response = client.verify.create(
  model="endeavour-preview",
  question="Are Dyson spheres feasible to build?",
  model_answer="Yes"
)
import agi 
 
client = agi.Client(api_key=YOUR_API_KEY)
 
response = client.grade.create(
  model="endeavour-preview",
  question="Are Dyson spheres feasible to build?",
  model_answer="Yes",
  ground_truth_answer="No",
)

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agi-0.2.1.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agi-0.2.1-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file agi-0.2.1.tar.gz.

File metadata

  • Download URL: agi-0.2.1.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.4

File hashes

Hashes for agi-0.2.1.tar.gz
Algorithm Hash digest
SHA256 6f436da08e897edb318bc285e08559ee577b3fe16263b5a7d58567a5b778c5ba
MD5 1669402cd9794aab3c68526ff1766531
BLAKE2b-256 fb8a0131850098cfd39da9b658970fa05bd0dc9b7db2901409bd84060d547e13

See more details on using hashes here.

File details

Details for the file agi-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: agi-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.4

File hashes

Hashes for agi-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3ab2a164a949a58957d6b7e1c7721bb4df4d4ae8b721cb7076b5e05c1664ec8f
MD5 398428982f8ba4682a52f770849affbf
BLAKE2b-256 9ffd311c2b65366bfaa03ef06384aa1c58ed068aaa99dffa640af4ccc22af860

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page