Back to blog

Show HN

Show HN: Hive Agent – Embed Claude Code-like AI agents in your app

Hey HN,

I've been building with Claude Code daily and kept thinking: what if I could give my users the same experience — an AI agent that explores context, plans, executes tools, and builds things — but embedded natively in my own application?

So I built *Hive Agent*, an open-source TypeScript framework that reproduces the core Claude Code architecture as a library you can integrate into any app.

*What it does:*

- *Workspace system* — Give the agent any context via a virtual filesystem. Feed it your user's data, project files, API responses — whatever your app needs. The agent reads, writes, and searches through it using bash-like commands. - *Built-in Explore & Plan agents* — Just like Claude Code, Hive auto-spawns sub-agents to investigate workspace data before acting and to design step-by-step plans for complex tasks. - *Sub-agent orchestration* — Spawn specialized agents with different models (Claude, OpenAI), different tools, and structured I/O. A research agent can use GPT-4, while the main agent uses Claude. - *Custom tools* — Define any tool your app needs. API calls, database queries, browser automation, document generation — the agent calls them as needed. - *Stateless & serverless-ready* — No persistent state. Works in Firebase Functions, Vercel, AWS Lambda. Pass history in, get history out. - *Execution tracing & cost tracking* — Full hierarchical traces with per-model token usage and cost breakdown. - *Interactive mode* — Agent can pause and ask clarifying questions, just like Claude Code does.

*What you can build with it:*

- AI coding assistants scoped to your platform - Document generators that understand your users' context - Project scaffolding tools - Support agents with access to your internal APIs - Any workflow where an AI needs to explore data, plan, and act

*Quick example:*

```typescript import { Hive, ClaudeProvider } from '@alexnetrebskii/hive-agent'

const agent = new Hive({ systemPrompt: 'You are a project generator...', tools: [myApiTool, myDbTool], llm: new ClaudeProvider({ apiKey: process.env.ANTHROPIC_API_KEY }), workspace: new Workspace({ paths: { 'user/requirements.json': { value: userReqs } } }) })

const result = await agent.run('Create a new project based on my requirements') ```

The agent will explore the workspace, plan the approach, create files, call your tools — all autonomously.

*Links:*

- GitHub: https://github.com/anetrebskii/hive-agent - Install: `pnpm add @alexnetrebskii/hive-agent` - MIT licensed

I'd love feedback from anyone building agent-powered features. What tools or patterns would you want built-in? Try it out and let me know what breaks.

Choose your language

Elige tu idioma

You can change this anytime from the language menu.

Puedes cambiarlo cuando quieras desde el menú de idioma.