examples/server-hono-adapter/README.md
This example demonstrates how to use the @mastra/hono server adapter to run Mastra with Hono.
MastraServerinit() with access to Mastra contextpnpm install
.env.example to .env and add your OpenAI API key:cp .env.example .env
pnpm start
List agents:
curl http://localhost:4111/api/agents
Health check (custom route):
curl http://localhost:4111/health
Generate a response:
curl -X POST http://localhost:4111/api/agents/assistantAgent/generate \
-H "Content-Type: application/json" \
-d '{"messages": "What is 2+2?"}'