Skip to main content

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.

Metadata

Release files for agi 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agi 0.2.1
File Size Uploaded Provenance Actions
agi-0.2.1.tar.gz 4.9 kB Without provenance Details for agi-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agi 0.2.1
File Interpreter ABI Platform Actions
agi-0.2.1-py3-none-any.whl Python 3 none any Details for agi-0.2.1-py3-none-any.whl

Total release size: 9.8 kB

Release files / agi-0.2.1.tar.gz

Download URL agi-0.2.1.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6f436da08e897edb318bc285e08559ee577b3fe16263b5a7d58567a5b778c5ba
BLAKE2b-256 checksum
How to use checksums
fb8a0131850098cfd39da9b658970fa05bd0dc9b7db2901409bd84060d547e13
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.4

Release files / agi-0.2.1-py3-none-any.whl

Download URL agi-0.2.1-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3ab2a164a949a58957d6b7e1c7721bb4df4d4ae8b721cb7076b5e05c1664ec8f
BLAKE2b-256 checksum
How to use checksums
9ffd311c2b65366bfaa03ef06384aa1c58ed068aaa99dffa640af4ccc22af860
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.4

Security for agi 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page