Skip to content

gramener/apiagent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API Agent

API Agent Screenshot

API Agent is an interactive web application that allows users to query APIs through natural language. It translates user questions into API calls, fetches real-time data, and presents the results in a user-friendly format.

Features

  • Natural Language Interface: Ask questions in plain English to interact with APIs
  • Multiple API Support: Connect to GitHub, StackOverflow, Jira, and more
  • Real-time Data: Access up-to-date information from various platforms
  • Code Generation: Automatically generates and executes JavaScript code for API calls
  • Result Validation: Verifies that the results answer the original question
  • Dark/Light Mode: Supports theme switching for comfortable viewing
  • Token Management: Securely store API tokens for authenticated requests

Usage

  1. Enter your question in the input field (e.g., "What are the trending Python repositories this week?")
  2. Click "Submit" to process your request
  3. View the step-by-step process:
    • Developer analysis of required API endpoints
    • Generated code to fetch the data
    • Results from the API call
    • Validation of the results

Example Questions

  • What are the most starred JavaScript repositories on GitHub?
  • What are the most recent questions about React on StackOverflow?
  • Who are the top contributors to the TensorFlow repository?
  • What are the trending Python repositories this week?
  • What are the most upvoted JavaScript questions on StackOverflow?

Setup

Prerequisites

Local Setup

  1. Clone this repository
  2. Open index.html in your browser
  3. Log in to LLM Foundry when prompted
  4. (Optional) Add your API tokens in the "API Tokens" section

Deployment

The application can be deployed to any static web hosting service:

  1. Upload all files to your web server
  2. Ensure CORS is properly configured for API requests
  3. Set up proper authentication for the LLM Foundry service

Technical Details

Architecture

API Agent uses a client-side architecture with the following components:

  • Frontend: HTML, CSS (Bootstrap), and JavaScript
  • LLM Integration: Connects to LLM Foundry for natural language processing
  • API Connector: Dynamically generates and executes JavaScript to call external APIs
  • Result Renderer: Formats and displays results using lit-html and marked

Dependencies

License

MIT

About

Calls APIs to execute tasks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published