{"id":30208489,"url":"https://github.com/stefanoamorelli/sec-edgar-agentkit","last_synced_at":"2026-04-16T05:01:23.302Z","repository":{"id":309249912,"uuid":"1035449798","full_name":"stefanoamorelli/sec-edgar-agentkit","owner":"stefanoamorelli","description":"AI agent toolkit for accessing and analyzing SEC EDGAR filing data. Build intelligent agents with LangChain, MCP-use, Gradio, Dify, and smolagents to analyze financial statements, insider trading, and company filings.","archived":false,"fork":false,"pushed_at":"2025-08-17T17:28:30.000Z","size":412,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-23T15:05:18.895Z","etag":null,"topics":["10k","8k","agent-toolkit","ai-agents","dify","edgar","financial-analysis","financial-data","gradio","insider-trading","investment-research","langchain","mcp","model-context-protocol","monorepo","python","sec","sec-filings","typescript","xbrl"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stefanoamorelli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-10T12:31:35.000Z","updated_at":"2025-11-08T10:04:42.000Z","dependencies_parsed_at":"2025-08-10T21:14:16.014Z","dependency_job_id":"b0dd5c1c-4073-4283-83f5-d7efd24862fd","html_url":"https://github.com/stefanoamorelli/sec-edgar-agentkit","commit_stats":null,"previous_names":["stefanoamorelli/sec-edgar-agentkit"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/stefanoamorelli/sec-edgar-agentkit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanoamorelli%2Fsec-edgar-agentkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanoamorelli%2Fsec-edgar-agentkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanoamorelli%2Fsec-edgar-agentkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanoamorelli%2Fsec-edgar-agentkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stefanoamorelli","download_url":"https://codeload.github.com/stefanoamorelli/sec-edgar-agentkit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanoamorelli%2Fsec-edgar-agentkit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31872036,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"online","status_checked_at":"2026-04-16T02:00:06.042Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["10k","8k","agent-toolkit","ai-agents","dify","edgar","financial-analysis","financial-data","gradio","insider-trading","investment-research","langchain","mcp","model-context-protocol","monorepo","python","sec","sec-filings","typescript","xbrl"],"created_at":"2025-08-13T18:00:59.911Z","updated_at":"2026-04-16T05:01:23.282Z","avatar_url":"https://github.com/stefanoamorelli.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SEC EDGAR Agent Kit\n\n\u003cp align=\"left\"\u003e\n  \u003cimg src=\"https://img.shields.io/npm/v/@sec-edgar-agentkit/langchain\" alt=\"npm version\" /\u003e\n  \u003cimg src=\"https://img.shields.io/github/license/stefanoamorelli/sec-edgar-agentkit\" alt=\"License\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/TypeScript-007ACC?logo=typescript\u0026logoColor=white\" alt=\"TypeScript\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Python-3776AB?logo=python\u0026logoColor=white\" alt=\"Python\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Nx-143055?logo=nx\u0026logoColor=white\" alt=\"Nx Monorepo\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/AI-Agents-FF6B6B?logo=openai\u0026logoColor=white\" alt=\"AI Agents\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/LangChain-1C3C3C?logo=chainlink\u0026logoColor=white\" alt=\"LangChain\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/MCP-Protocol-4A90E2?logo=protocol\u0026logoColor=white\" alt=\"MCP Protocol\" /\u003e\n\u003c/p\u003e\n\n\n\nA multi-framework monorepo toolkit for building AI agents and applications that can access and analyze [SEC EDGAR](https://www.sec.gov/edgar) filing data. Built on top of the [sec-edgar-mcp](https://github.com/stefanoamorelli/sec-edgar-mcp) Model Context Protocol server.\n\nThis monorepo contains multiple packages and integrations, each optimized for different AI agent frameworks and use cases.\n\n## Supported Frameworks\n\n- \u003cimg src=\"https://python.langchain.com/img/favicon.ico\" alt=\"LangChain\" width=\"16\" height=\"16\"/\u003e **[LangChain](https://github.com/langchain-ai/langchain)** - Build sophisticated agents with LangChain's agent framework ([integrations/langchain](./integrations/langchain))\n- \u003cimg src=\"https://avatars.githubusercontent.com/u/207005519?s=48\u0026v=4\" alt=\"MCP-use\" width=\"16\" height=\"16\"/\u003e **[MCP-use](https://github.com/mcp-use/mcp-use)** - Create MCP agents with any LLM for accessing SEC EDGAR data ([integrations/mcp-use](./integrations/mcp-use))\n- \u003cimg src=\"https://avatars.githubusercontent.com/u/51063788?s=48\u0026v=4\" alt=\"Gradio\" width=\"16\" height=\"16\"/\u003e **[Gradio](https://github.com/gradio-app/gradio)** - Interactive web interface for exploring SEC filings ([integrations/gradio](./integrations/gradio))\n- \u003cimg src=\"https://cloud.dify.ai/favicon.ico\" alt=\"Dify\" width=\"16\" height=\"16\"/\u003e **[Dify](https://github.com/langgenius/dify)** - Plugin for Dify workflow automation platform ([integrations/dify](./integrations/dify))\n- \u003cimg src=\"https://huggingface.co/favicon.ico\" alt=\"smolagents\" width=\"16\" height=\"16\"/\u003e **[smolagents](https://github.com/huggingface/smolagents)** - Lightweight agent framework by Hugging Face for quick prototypes ([integrations/smolagents](./integrations/smolagents))\n\n## Features\n\n- **Company information**: Look up CIKs, retrieve company details, and access company facts\n- **Filing search \u0026 analysis**: Search for filings, extract content, and analyze 8-K reports\n- **Financial data**: Extract financial statements and parse XBRL data with precision\n- **Insider trading**: Analyze Forms 3, 4, and 5 for insider transaction data\n- **LangChain integration**: Seamless integration with LangChain agents and chains\n\n## Installation\n\nThis monorepo is organized using modern tooling and contains multiple packages. You can install individual packages from npm:\n\n### Install individual packages\n\n```bash\n# LangChain toolkit\nnpm install @sec-edgar-agentkit/langchain\n\n# MCP-use natural language interface\nnpm install @sec-edgar-agentkit/mcp-use\n\n# smolagents Python package\npip install sec-edgar-agentkit-smolagents\n```\n\n### Gradio and Dify\n\nFor Gradio and Dify setup instructions, see their respective documentation:\n- Gradio: [integrations/gradio/README.md](./integrations/gradio/README.md)\n- Dify: [integrations/dify/README.md](./integrations/dify/README.md)\n\n### Development setup\n\n```bash\n# Clone the repository\ngit clone https://github.com/stefanoamorelli/sec-edgar-agentkit\ncd sec-edgar-agentkit\n\n# Install all dependencies (monorepo)\nbun install\n\n# Build all packages\nbun run build\n```\n\nPrerequisites:\n- [Bun](https://bun.sh/) (for TypeScript/JavaScript development)\n- [Python](https://www.python.org/) 3.8+ (for Gradio interface)\n- `sec-edgar-mcp` server: `pip install sec-edgar-mcp`\n\n## Quick start\n\n### LangChain\n\n```typescript\nimport { SECEdgarAgentToolkit } from './integrations/langchain';\n\nconst toolkit = new SECEdgarAgentToolkit({\n  mcpServerUrl: 'sec-edgar-mcp',\n  configuration: {\n    actions: {\n      companies: { lookupCIK: true, getInfo: true },\n      filings: { search: true, getContent: true },\n    }\n  }\n});\n\nconst tools = toolkit.getTools();\n// Use with any LangChain agent\n```\n\n### MCP-use\n\n```javascript\nimport { agent, analyzeFinancials } from './integrations/mcp-use';\n\n// Simple function calls\nconst appleInfo = await agent.use(\"Look up Apple's latest 10-K filing\");\nconst analysis = await analyzeFinancials('AAPL', 3);\n```\n\n### Gradio interface\n\n```bash\n# Run the Gradio interface\ncd integrations/gradio\n./run.sh\n# Access at http://localhost:7860\n\n# Or manually:\npip install -r requirements.txt\npython app.py\n```\n\n## Configuration\n\n### Available actions\n\n```typescript\n{\n  actions: {\n    companies: {\n      lookupCIK: boolean,      // CIK lookup by name/ticker\n      getInfo: boolean,        // Company information\n      getFacts: boolean,       // XBRL company facts\n    },\n    filings: {\n      search: boolean,         // Search filings\n      getContent: boolean,     // Extract filing content\n      analyze8K: boolean,      // Analyze 8-K reports\n      extractSection: boolean, // Extract specific sections\n    },\n    financial: {\n      getStatements: boolean,  // Financial statements\n      parseXBRL: boolean,      // XBRL data parsing\n    },\n    insiderTrading: {\n      analyzeTransactions: boolean, // Forms 3/4/5 analysis\n    }\n  }\n}\n```\n\n## Available tools\n\n### Company tools\n- `sec_edgar_cik_lookup`: Look up a company's CIK by name or ticker\n- `sec_edgar_company_info`: Get detailed company information\n- `sec_edgar_company_facts`: Retrieve XBRL company facts\n\n### Filing tools\n- `sec_edgar_filing_search`: Search for filings with filters\n- `sec_edgar_filing_content`: Extract filing content\n- `sec_edgar_analyze_8k`: Analyze 8-K reports\n\n### Financial tools\n- `sec_edgar_financial_statements`: Extract financial statements\n- `sec_edgar_xbrl_parse`: Parse XBRL data for precise values\n\n### Insider trading tools\n- `sec_edgar_insider_trading`: Analyze insider transactions\n\n## Examples\n\n### Basic company analysis\n```typescript\nconst result = await executor.invoke({\n  input: \"Find Microsoft's CIK and get their latest 10-K filing summary\"\n});\n```\n\n### Financial analysis\n```typescript\nconst result = await executor.invoke({\n  input: \"Compare Apple's revenue growth over the last 3 years using their 10-K filings\"\n});\n```\n\n### Insider trading analysis\n```typescript\nconst result = await executor.invoke({\n  input: \"Show me insider selling activity for Tesla in the last quarter\"\n});\n```\n\n## Framework-specific examples\n\n### LangChain - Complex agent\n```typescript\nimport { SECEdgarAgentToolkit } from './integrations/langchain';\nimport { ChatOpenAI } from '@langchain/openai';\nimport { AgentExecutor, createStructuredChatAgent } from 'langchain/agents';\n\nconst toolkit = new SECEdgarAgentToolkit({\n  mcpServerUrl: 'sec-edgar-mcp',\n  configuration: {\n    actions: {\n      companies: { lookupCIK: true, getInfo: true },\n      filings: { search: true, analyze8K: true },\n      financial: { getStatements: true, parseXBRL: true },\n    }\n  }\n});\n\nconst agent = await createStructuredChatAgent({\n  llm: new ChatOpenAI({ modelName: 'gpt-4' }),\n  tools: toolkit.getTools(),\n  prompt: ChatPromptTemplate.fromMessages([\n    ['system', 'You are a financial analyst with access to SEC EDGAR data.'],\n    ['human', '{input}'],\n    ['assistant', '{agent_scratchpad}']\n  ])\n});\n\nconst executor = new AgentExecutor({ agent, tools: toolkit.getTools() });\nconst result = await executor.invoke({\n  input: \"Compare Apple and Microsoft's revenue growth over the last 3 years\"\n});\n```\n\n### MCP-use - Simple queries\n```javascript\nimport { agent } from './mcp-use';\n\n// Natural language queries\nconst result = await agent.use(`\n  Find Tesla's latest 8-K filing and summarize any material events.\n  Also show me their insider trading activity for the past month.\n`);\n\nconsole.log(result);\n```\n\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\n© 2025 [Stefano Amorelli](https://amorelli.tech)\n\nThis open-source project is licensed under the [GNU Affero General Public License v3.0 (AGPL-3.0)](https://www.gnu.org/licenses/agpl-3.0.html). This means:\n\n- You can use, modify, and distribute this software\n- If you modify and distribute it, you must release your changes under AGPL-3.0\n- If you run a modified version on a server, you must provide the source code to users\n- See the [LICENSE](LICENSE) file for full details\n\nFor commercial licensing options or other licensing inquiries, please contact stefano@amorelli.tech.\n\nAuthor: [Stefano Amorelli](https://amorelli.tech)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanoamorelli%2Fsec-edgar-agentkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefanoamorelli%2Fsec-edgar-agentkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanoamorelli%2Fsec-edgar-agentkit/lists"}