An AI agent that searches ArXiv for research papers and suggests hackathon project ideas. Built with Agentuity.
- You enter a research topic (e.g., "AI agents", "diffusion models")
- The agent fetches papers from ArXiv
- GPT-5 analyzes the papers and suggests hackathon project ideas
- Results stream to your browser in real-time
Reference the docs here:
# Install dependencies
bun install
# Start development server
bun run dev
# Deploy
bun run deploy # or agentuity deployOpen http://localhost:3500 in your browser.
src/
agent/hackathon-scout/ # The AI agent
index.ts # Fetches ArXiv, streams GPT-5 analysis
api/
index.ts # Streaming endpoint with stream() middleware
web/
App.tsx # React frontend with activity log
Uses createAgent() to define an agent with typed input/output schemas:
const agent = createAgent('hackathon-scout', {
description: 'Searches ArXiv for papers and suggests hackathon project ideas',
schema: { input: AgentInput, output: AgentOutput },
handler: async (ctx, { query }) => { ... }
});Uses stream() middleware to stream agent output:
api.post('/search', agent.validator(), stream(async (c) => {
const body = await c.req.json();
return agent.run(body);
}));The agent uses AI SDK tool-calling with streamText to generate responses. The API streams these via stream() middleware, and the React frontend consumes them with useAPI streaming—no SSE required.
Uses useAPI from @agentuity/react to receive streamed chunks:
const { invoke } = useAPI({ route: 'POST /api/search' });
await invoke({ query, maxResults: 5 });| Command | Description |
|---|---|
bun run dev |
Start development server |
bun run build |
Build for production |
bun run typecheck |
Run TypeScript type checking |
bun run deploy |
Deploy to Agentuity cloud |
- Agentuity Docs - Full documentation
- Creating Agents - Agent development guide
- Streaming Routes - Real-time streaming
- React Hooks - Frontend integration