logoalt Hacker News

sergiotapiayesterday at 9:59 PM3 repliesview on HN

I highly suggest you expose functionality through Graphql. It lets users send out an agent with a goal like: "Figure out how to do X" and because graphql has introspection, it can find stuff pretty reliably! It's really lovely as an end user. Best of luck!


Replies

_heimdalltoday at 3:37 AM

A proper REST API would also work without all the extra overhead of GraphQL.

People may dislike XML, but it is easy to make a REST API with and it works well as an interface between computer systems where a human doesn't have to see the syntax.

show 2 replies
storystarlingtoday at 9:06 AM

I tried this recently and found the token overhead makes it prohibitive for any non-trivial schema. Dumping the full introspection result into the context window gets expensive fast and seems to increase hallucination rates compared to just providing specific, narrow tool definitions.

show 2 replies
cpursleytoday at 10:38 AM

Hasura is working on this approach: https://promptql.io