{"id":23925498,"url":"https://github.com/7etsuo/tetsuo-dox-agent","last_synced_at":"2026-03-06T18:38:16.474Z","repository":{"id":270076095,"uuid":"909246089","full_name":"7etsuo/tetsuo-dox-agent","owner":"7etsuo","description":"A powerful research assistant that leverages Large Language Models to provide technically-focused, well-researched answers with robust citations. Built on a graph-based architecture, the agent drafts answers, performs critical self-reflection, conducts research, and iteratively improves responses based on discovered information.","archived":false,"fork":false,"pushed_at":"2024-12-28T13:19:14.000Z","size":88,"stargazers_count":28,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T03:43:30.824Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/7etsuo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-28T06:01:30.000Z","updated_at":"2025-03-29T06:15:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"3e2c3b5b-2ed1-42d5-80d8-89cd8a85698f","html_url":"https://github.com/7etsuo/tetsuo-dox-agent","commit_stats":null,"previous_names":["7etsuo/tetsuo-dox-agent"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/7etsuo/tetsuo-dox-agent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/7etsuo%2Ftetsuo-dox-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/7etsuo%2Ftetsuo-dox-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/7etsuo%2Ftetsuo-dox-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/7etsuo%2Ftetsuo-dox-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/7etsuo","download_url":"https://codeload.github.com/7etsuo/tetsuo-dox-agent/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/7etsuo%2Ftetsuo-dox-agent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279017158,"owners_count":26085983,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"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":[],"created_at":"2025-01-05T20:14:12.669Z","updated_at":"2025-10-13T22:15:06.760Z","avatar_url":"https://github.com/7etsuo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tetsuo Dox Agent\n\n\u003cdiv align=\"center\"\u003e\n\n![Tetsuo AI Logo](https://github.com/user-attachments/assets/8db7cb9d-0514-4f12-80ab-2027dc58d522)\n\n[![Discord](https://img.shields.io/badge/Discord-Join%20Us-7289da?logo=discord\u0026logoColor=white)](https://discord.gg/tetsuo-ai)\n[![Website](https://img.shields.io/badge/Website-tetsuo.ai-blue?logo=internet-explorer\u0026logoColor=white)](https://www.tetsuo.ai)\n\n**$TETSUO Token on Solana**  \n`Contract Address: 8i51XNNpGaKaj4G4nDdmQh95v4FKAxw8mhtaRoKd9tE8`\n\n\u003c/div\u003e\n\n## Overview\n\nTetsuo Dox Agent is a research agent, designed for technically-focused responses with citations. Built on a graph-based architecture.\n\n![image](https://github.com/user-attachments/assets/1ab31816-e66e-4df3-bd9e-d2f80e7b60ad)\n\nThe agent:\n\n- Drafts detailed, technically accurate answers\n- Performs systematic self-reflection and validation\n- Conducts thorough research across multiple sources\n- Iteratively refines responses based on discovered information\n- Maintains strict citation standards for factual claims\n\n\n## Key Features\n\n- **Technical Focus**: Delivers purely factual, technical information without ethical commentary\n- **Iterative Refinement**: Automatically improves answers through multiple rounds of:\n  - Self-reflection and critique\n  - Web-based research\n  - Content revision\n  - Citation verification\n- **Research Integration**: Leverages Tavily Search API for real-time fact-checking and research\n- **Structured Output**:\n  - Primary response (250-word default limit)\n  - Numbered citations [1], [2], etc.\n  - Complete reference list with URLs and publication dates\n  - Research queries and self-reflections (in verbose mode)\n- **Quality Controls**:\n  - Automatic fact verification\n  - Citation management\n  - Self-critique for information gaps\n  - Technical accuracy verification\n\n## Prerequisites\n\n- Python 3.13\n- Poetry for dependency management\n- OpenAI API key (GPT-4 access required)\n- Tavily API key\n\n## Installation\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/7etsuo/tetsuo-dox-agent.git\ncd dox-agent\n```\n\n2. Install dependencies with Poetry:\n```bash\n# Initialize Poetry environment with Python 3.13\npoetry env use python3.13\n\n# Install dependencies\npoetry install\n```\n\n3. Set up environment variables by creating a `.env` file:\n```env\n# Required Configuration\nOPENAI_API_KEY=your_openai_key_here      # Required: OpenAI API key with GPT-4 access\nTAVILY_API_KEY=your_tavily_key_here      # Required: Tavily API key for research\n\n# Optional Configuration\nMAX_ITERATIONS=3                         # Optional: Number of research-revise cycles (default: 3)\nMODEL_NAME=gpt-4-turbo-preview           # Optional: OpenAI model choice\nMAX_RESULTS=5                            # Optional: Maximum search results per query\n\n# Optional LangSmith Integration\nLANGCHAIN_API_KEY=your_langsmith_key     # Optional: For LangSmith tracing\nLANGCHAIN_TRACING_V2=true                # Optional: Enable LangSmith tracing\nLANGCHAIN_PROJECT=your_project_name      # Optional: LangSmith project name\n```\n\n### Docker installation\n1. Build the Docker image:\n\n```bash\ndocker-compose build\n``` \n\n2. Set up environment variables in `.env` file (same as standard installation)\n\n3. Run the agent using Docker:\n```bash\ndocker-compose run --rm dox-agent \"Your question here\"\n```\n\n\n## Usage\n\n![image](https://github.com/user-attachments/assets/06081610-d142-4a24-85e8-2679767618a9)\n\n### Basic Command\n\nBasic usage with default settings:\n```bash\npoetry run dox-agent \"Your technical question here\"\n```\n\n### Advanced Options\n\nCustomize the agent's behavior:\n```bash\n# Enable verbose output (includes reflections and research queries)\npoetry run dox-agent --verbose \"Your question\"\n\n# Customize iterations and model\npoetry run dox-agent --max-iterations 4 --model gpt-4 \"Your question\"\n\n# Save full response to JSON file\npoetry run dox-agent --save-output results.json \"Your question\"\n```\n\n### Command Line Options\n\n- `-m, --max-iterations`: Maximum research-revise cycles\n- `-l, --model`: OpenAI model selection (default: gpt-4-turbo-preview)\n- `-r, --max-results`: Maximum search results per query\n- `-w, --word-limit`: Word limit for answers (default: 250)\n- `-v, --verbose`: Enable detailed output including reflections\n- `-s, --save-output`: Save complete response to JSON file\n- `--help`: Display help message\n\n### Output Format\n\nStandard output includes:\n- Technical response (within word limit)\n- Numbered citations [1]\n- Reference list with:\n  - Author (when available)\n  - Title\n  - Publication/Website\n  - URL\n  - Publication Date\n\nVerbose output (-v) adds:\n- Self-reflection on response quality\n- Identified knowledge gaps\n- Research queries\n- Search results summary\n\n## Project Structure\n\n```\ndox_agent/\n├── __init__.py\n├── __main__.py\n├── chains.py          # Chain definitions\n├── cli.py             # Command line interface\n├── config/            # Configuration and settings\n│   ├── __init__.py\n│   ├── constants.py\n│   └── settings.py\n├── exceptions.py      # Custom exceptions\n├── graph/             # Graph-based architecture\n│   ├── __init__.py\n│   ├── builder.py\n│   └── nodes.py\n├── models/            # Pydantic models\n│   ├── __init__.py\n│   ├── answer.py\n│   └── reflection.py\n├── prompts.py         # Prompt templates\n├── tools/             # Search tools\n│   ├── __init__.py\n│   └── search.py\n└── types.py           # Type definitions\n```\n\n## Architecture Overview\n\nThe system operates through a graph-based architecture with three primary stages:\n\n1. **Initial Draft**\n   - Analyzes the question\n   - Generates initial technical response\n   - Performs self-critique\n\n2. **Research Phase**\n   - Generates targeted search queries\n   - Executes web searches\n   - Collects and processes results\n\n3. **Revision Phase**\n   - Incorporates new information\n   - Updates citations\n   - Refines technical accuracy\n   - Maintains word limit\n\nThis process iterates according to the max_iterations setting or until optimal quality is achieved.\n\n## Development\n\n### Setting Up Development Environment\n\n1. Clone and install as described above\n2. Install development dependencies:\n```bash\npoetry install --with dev\n```\n\n### Adding New Features\n\n1. **New Models**\n   - Add Pydantic models in `models/`\n   - Update type hints accordingly\n\n2. **New Tools**\n   - Implement tool classes in `tools/`\n   - Register in tools registry if applicable\n\n3. **New Graph Nodes**\n   - Add nodes in `graph/nodes.py`\n   - Update graph builder in `graph/builder.py`\n\n### Code Style\n\n- Follow PEP 8 guidelines\n- Use type hints\n- Include docstrings for public interfaces\n- Keep functions focused and modular\n\n### Testing\n\n```bash\n# Run test suite (TODO: Add comprehensive tests)\npoetry run pytest\n\n# Run with coverage\npoetry run pytest --cov=dox_agent\n```\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch:\n```bash\ngit checkout -b feature/your-feature-name\n```\n3. Commit your changes:\n```bash\ngit commit -m 'Add some feature'\n```\n4. Push to the branch:\n```bash\ngit push origin feature/your-feature-name\n```\n5. Open a Pull Request\n\n### Pull Request Guidelines\n\n- Include test cases for new features\n- Update documentation as needed\n- Follow existing code style\n- One feature/fix per PR\n\n## Acknowledgments\n\n- Built with [LangChain](https://github.com/langchain-ai/langchain)\n- Uses [LangGraph](https://github.com/langchain-ai/langgraph) for workflow management\n- Search powered by [Tavily](https://tavily.com/)\n- Developed with [OpenAI](https://openai.com/) GPT-4 technology\n\n## Support\n\n- Open an issue for bugs or feature requests\n- Check existing issues before creating new ones\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F7etsuo%2Ftetsuo-dox-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F7etsuo%2Ftetsuo-dox-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F7etsuo%2Ftetsuo-dox-agent/lists"}