Show HN: Api2ai – create an API agent from any OpenAPI Spec
github.comapi2ai parses OpenAPI Spec to generate an agent that can make API calls. For context, I recently need to explore a handful of API suites and thought LLMs can help expedite this process. After some digging, I found OpenAPI Specs are perfect fit for function calling.
Based on a text prompt, api2ai can select the right endpoint and properly parse request params and make api calls. It also handles authentication, currently it supports basic auth, api keys, and bearer token schemes. The tool has helped me explore and see APIs in action without a deep dive into the docs or using postman. It’s open source and hopefully can be useful for you, too.
Please let me know if you have any questions or feedback. Would pair nicely with Magic Loops: https://news.ycombinator.com/item?id=36958731 I'm actually working on something similar, but it's a SAAS rather than a library, https://news.ycombinator.com/item?id=37037555 - The benefit is that you don't need hosting or maintenance. How do you handle very large OpenAPI specs? For example, I think stripe's is over a megabyte. What's the summarization strategy? It’s done in two steps:
1. Create an array of every endpoint’s summary text and ask AI to select one based on the user prompt
2. Use function calling with parameters of the selected operation in step 1 How might this be different than Langchain open app agent?