Skip to main content

agenthood

Robinhood trading agent: talk to your portfolio in plain English.

https://github.com/user-attachments/assets/ad8595ab-e735-4967-a095-e49b18a33f63

pip install agenthood
agenthood setup

setup walks you through Robinhood OAuth and LLM selection. Config saves to ~/.agenthood/config.json. After that, just run agenthood.

Quick start

import asyncio
from agenthood import AgentHood

async def main():
    async with AgentHood() as agent:
        print(await agent.chat("What are my open positions?"))
        print(await agent.chat("Get me a quote for NVDA and AAPL"))
        print(await agent.chat("Review a limit buy of 5 AAPL at $210"))

asyncio.run(main())

chat() sends a prompt and returns the response. The agent picks the right Robinhood tools, fetches data, and explains what it found.

CLI

agenthood                          # interactive REPL
agenthood "What is TSLA at?"       # one-shot
agenthood --live                   # real orders
agenthood --stream                 # token-by-token

Inside the REPL, dot commands skip the LLM entirely:

.portfolio          show portfolio (alias: .p)
.positions          show open positions (alias: .pos)
.quote NVDA         quick price quote (alias: .q NVDA)
.analyze PYPL       multi-source analysis
.help               all commands

Direct tool calls

import asyncio, json
from agenthood import AgentHood

async def main():
    async with AgentHood() as agent:
        result = json.loads(await agent.call_tool("robinhood_get_equity_quotes", {
            "symbols": ["NVDA", "AAPL"]
        }))
        print(result["data"]["results"])

asyncio.run(main())

call_tool(name, params) bypasses the LLM and calls a Robinhood MCP tool directly. 53 tools available.

Safety

from agenthood import AgentHood, AgentHoodConfig

cfg = AgentHoodConfig(
    dry_run=False,           # default True -- blocks place_* tools
    max_order_value=1000,    # hard cap per order in USD
    allowed_symbols=["AAPL", "NVDA", "TSLA"],
)

Safety hooks run at the tool-call level. The LLM cannot talk its way around them.

Config

All config lives in ~/.agenthood/:

~/.agenthood/
  config.json       # model, api keys, safety settings
  history           # readline history
  sessions/         # saved chat sessions
  watches.json      # price alerts
  triggered.db      # alert history
  logs/             # daemon logs
  daemon.pid        # background process
{
  "model": "meta-llama/llama-3.3-70b-instruct:free",
  "api_base": "https://openrouter.ai/api/v1",
  "api_key": "sk-or-...",
  "analyze_model": "llama-3.3-70b-versatile",
  "analyze_api_base": "https://api.groq.com/openai/v1",
  "analyze_api_key": "gsk_...",
  "dry_run": false,
  "max_order_value": 1000,
  "max_turns": 20
}

Robinhood token is auto-discovered from ~/.mcp-auth/. No manual setup needed after the first npx mcp-remote auth flow.

Multi-provider routing

{
  "model": "google/gemma-4-26b-a4b-it:free",
  "model_fallbacks": ["nvidia/nemotron-3-super-120b-a12b:free"],
  "analyze_model": "llama-3.3-70b-versatile",
  "analyze_api_base": "https://api.groq.com/openai/v1"
}

model handles chat. analyze_model handles .analyze -- Groq runs analysis in ~1s vs ~14s on free tier. Dot commands use no model at all.

Autonomous scanning

cfg = AgentHoodConfig(scan_interval=300)  # every 5 minutes

The agent wakes up on a schedule, checks for positions down >5%, scans for RSI breakouts, and records findings.

License

MIT Hemanth.HM

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agenthood-0.3.2.tar.gz (70.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agenthood-0.3.2-py3-none-any.whl (85.9 kB view details)

Uploaded Python 3

File details

Details for the file agenthood-0.3.2.tar.gz.

File metadata

  • Download URL: agenthood-0.3.2.tar.gz
  • Upload date:
  • Size: 70.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.15

File hashes

Hashes for agenthood-0.3.2.tar.gz
Algorithm Hash digest
SHA256 a933a4e549af8daac6117f43330a414987fb2606a972aff5b36faa9d15d82c47
MD5 2dee372e5cfd16edfda912143e2fcd2b
BLAKE2b-256 daf2958734e2a7ef3fda67c3775f40fb9b4ac8c131e6f19a7837e082c3f1a7de

See more details on using hashes here.

File details

Details for the file agenthood-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: agenthood-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 85.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.15

File hashes

Hashes for agenthood-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 719d9d2902327a6e830292cef5d18e62a783e169cde9deb7f3c7aa3cb4f05bc5
MD5 709e034bc1ebe1e09052e764852feeeb
BLAKE2b-256 aa4010b21aa57330044bc3d9cf169c5f17181b86adea87e68212d33f536bf744

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page