Skip to content
hedgehog-financePublic

About

A general-purpose AI agent engine optimized for financial research.

Resources

Stars

80 stars

Watchers

8 watching

Forks

Repository files navigation

HogAgent

English · 简体中文 · 日本語

HogAgent is a general-purpose AI agent engine optimized for financial research. It combines model reasoning, tools and Skills to complete research, analysis and file-based tasks, with a browser interface and a JSONL RPC interface for application integration.

Capabilities

  • Task execution: Quick, Standard and Long Task modes; Long Task supports planning, checkpoints, audit and resumption. Audit availability and results are reported separately from task completion.
  • Tools and Skills: File operations, shell execution, calculations, web search and page retrieval. Eight built-in Skills cover skill creation, financial calculations, charts, presentations, document conversion, spreadsheets, technical indicators and valuation.
  • Extensions: Optional content compression, sub-agents, artifact tracking, file delivery, persistent memory and external MCP services. Content compression is off by default.
  • Models: Multiple model providers and custom OpenAI-compatible endpoints, with separate main-model and audit-model settings.
  • Web UI: Streaming conversations, session history, user/workspace selection, model settings, Skills, tools, themes and file previews.
  • Integration: stdin/stdout JSONL commands and events, session persistence, automatic context compaction and process/session/run context. Gateway supplies authenticated project bindings and owns its project metadata.

The Pi Agent Harness is included in src/vendor/. HogAgent runs independently or as a subprocess of HedgehogGateway, an IDE plugin or another application.

Install and run

Requires Node.js >= 22.19.0 on macOS, Linux or Windows. Shell-based Python workflows require a usable Python interpreter with venv.

git clone https://github.com/hedgehog-finance/HogAgent.git
cd HogAgent
npm install
npm run build

# Browser interface: http://localhost:9108
node dist/bin/hogagent-web.js --port 9108 --workspace /absolute/path/to/workspace

# Terminal conversation
node dist/bin/hogagent.js --mode interactive --user default --workspace /absolute/path/to/workspace

# Application integration
node dist/bin/hogagent.js --mode rpc --user default --session example --workspace /absolute/path/to/workspace

Run the launch commands separately from the repository root. Replace /absolute/path/to/workspace with your own absolute directory (quote paths containing spaces). Configure a valid API key before sending prompts; Web UI startup does not require one. Stop the Web UI with Ctrl+C and leave terminal chat with /exit. For an existing monorepo checkout, start in hogagent/ and skip cloning.

Configure an LLM provider in the Web UI or ~/.hogagent/llm-settings.json:

{
  "provider": "hedgehog",
  "apiKey": "your-api-key",
  "baseUrl": "https://api.ciweiai.com/api/llm/v1",
  "modelId": "qwen3.8-flash"
}

Use the model available from your provider. Search settings live in ~/.hogagent/search_settings.json; financial data credentials live in the corresponding Skill's api-key entry in ~/.hogagent/skills_config.json. Standalone and Gateway-managed HogAgent share this configuration directory.

Workspace and runtime

--workspace selects the user's workspace; user mappings are stored in ~/.hogagent/user_settings.json. Session history is stored in ~/.hogagent/sessions/<user-directory>/. Workspace instructions come from AGENTS.md followed by .hogagent/hogagent.md; workspace Skills live in .hogagent/skills/.

Standalone CLI and Web UI provision a fresh default user in ~/.hogagent/workspace/ (or <HOGAGENT_USER_DIR>/workspace/) when no workspace is supplied; existing mappings are reused. HogAgent creates AGENTS.md from its own versioned template, with no Gateway build or runtime dependency. Startup or workspace selection after an upgrade replaces older template sections. Add personal rules under the trailing User Rules heading: those rules, and any pre-existing unmarked file, are preserved. See workspace instructions and upgrades.

Shell isolation is controlled by sandboxMode in ~/.hogagent/hogagent.json. On macOS/Linux, enabled requires the OS sandbox, fallback permits an unsandboxed fallback, and the default disabled runs without OS isolation. Windows shell execution is unsandboxed. See tool permissions before choosing a deployment configuration.

Development and evaluation

npm run check
npm test -- --run
npm run build
npm run test:readme

npm run test:readme exercises the built launch modes and RPC examples without an API key. See the release validation record for tested environments, live-provider coverage and limitations.

RPC examples demonstrate application integration. FinanceGym contains test conditions, the final report, and 20 questions with answer reports for qwen3.8-flash in standard mode.

Documentation

Guide Contents
Architecture Runtime, task orchestration and component boundaries
Deployment Installation and deployment
Configuration Models, search, shared settings and workspaces
RPC protocol Commands, events and runtime context
Tools / Skills Tool parameters and Skill development
Extensions / External MCP Extension API and external services
Artifacts File classification and delivery
Web UI Conversations, settings and file previews
Development / Troubleshooting Build, tests and diagnostics

Windows checkouts preserve LF line endings for reproducible builds. Python setup accepts validated framework interpreter symlinks; downloads remain bounded to their announced size if a file grows during transfer.

About

A general-purpose AI agent engine optimized for financial research.

Resources

Stars

80 stars

Watchers

8 watching

Forks

Releases

Packages

Contributors

Languages