NEWREASONER SDKOctober 1, 2024

Reasoner SDK - Build AI Applications with Full Traceability

Introducing the Reasoner SDK, a powerful toolkit that enables developers to build AI applications with precision, accuracy, and full traceability. With just a few lines of code, you can now:

  • Create and manage indexes for your data sources
  • Add documents and URLs to your indexes
  • Build indexes with full reasoning capabilities
  • Execute traces against your indexes to get fully traceable responses
  • Manage your indexes programmatically

The Reasoner SDK handles authentication and index management automatically, letting you focus on building exceptional AI experiences backed by Reasoner’s traceability engine.

1# Example: Create an index, add sources, and trace with full traceability
2from reasoner import Reasoner
3
4# Initialize the client
5r = Reasoner(api_key="your_api_key")
6
7# Create a new index
8index = r.indexes.create("my_knowledge_base")
9index_uid = index["uid"]
10
11# Add sources to the index
12r.indexes.add_urls(['https://reasoner.com'], index_uid)
13r.indexes.add_documents(['document1.pdf', 'document2.pdf'], index_uid)
14
15# Build the index (blocking call)
16updated_index = r.indexes.build(index_uid, wait=True)
17
18# Execute a trace against the index
19response = r.trace("What insights can you provide from these sources?", index_uid, wait=True)
20print(response) # Full response with reasoning trace
Get Started

Install with pip install reasonercli and transform how you build AI applications with full traceability.