{"id":29188697,"url":"https://github.com/solagent99/bitcoin-ai-agent-crew-backend","last_synced_at":"2025-10-05T19:56:05.815Z","repository":{"id":299897948,"uuid":"925282051","full_name":"solagent99/Bitcoin-Ai-Agent-Crew-BackEnd","owner":"solagent99","description":"About CrewAI powered agents with Bitcoin and Stacks tooling.","archived":false,"fork":false,"pushed_at":"2025-02-01T12:38:48.000Z","size":537,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-01T22:45:45.862Z","etag":null,"topics":["agent","ai","bitcoin","python"],"latest_commit_sha":null,"homepage":"","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/solagent99.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,"zenodo":null}},"created_at":"2025-01-31T15:27:47.000Z","updated_at":"2025-03-20T09:55:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"a34ed28f-0b4e-4d25-a22e-e7439891460e","html_url":"https://github.com/solagent99/Bitcoin-Ai-Agent-Crew-BackEnd","commit_stats":null,"previous_names":["solagent99/bitcoin-ai-agent-crew-backend"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/solagent99/Bitcoin-Ai-Agent-Crew-BackEnd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solagent99%2FBitcoin-Ai-Agent-Crew-BackEnd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solagent99%2FBitcoin-Ai-Agent-Crew-BackEnd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solagent99%2FBitcoin-Ai-Agent-Crew-BackEnd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solagent99%2FBitcoin-Ai-Agent-Crew-BackEnd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solagent99","download_url":"https://codeload.github.com/solagent99/Bitcoin-Ai-Agent-Crew-BackEnd/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solagent99%2FBitcoin-Ai-Agent-Crew-BackEnd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278510918,"owners_count":25998997,"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-05T02:00:06.059Z","response_time":54,"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":["agent","ai","bitcoin","python"],"created_at":"2025-07-01T22:36:46.991Z","updated_at":"2025-10-05T19:56:05.803Z","avatar_url":"https://github.com/solagent99.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bitcoin-ai-agent-crew-backend\n\n## Disclaimer\n\nbitcoin-ai-agent is not liable for any lost, locked, or mistakenly sent funds. This is alpha software—use at your own risk. Any STX sent to you is owned by you, the trader, and may be redeemed, including profits or losses, at the end of the bitcoin-ai-agent Champions Sprint (~5 days). By participating, you accept that aibtc.dev is not responsible for any product use, costs, taxes incurred from trading STX or any other digital asset, or any other liability.\n\n## Getting Started\n\nThere are two ways to run the backend locally: using Conda (recommended for development) or Docker.\n\n### Prerequisites\n\n- Python 3.12\n- [Bun](https://bun.sh/) (for running TypeScript scripts)\n- Git\n- Conda (if using the Conda approach)\n- Docker (if using the Docker approach)\n\n### Environment Setup\n\n1. Clone the repository and initialize submodules:\n\n```bash\ngit clone [repository-url]\ncd bitcoin-ai-agent-crew-backend\ngit submodule init\ngit submodule update --remote\n```\n\n2. Configure environment variables:\n\n- Copy the `.env.example` file to `.env`\n- Update the variables as needed\n\n### Option 1: Using Conda (Recommended for Development)\n\n1. Install Miniconda:\n\n```bash\n# On macOS\nbrew install miniconda\n\n# Initialize conda (required after installation)\nconda init \"$(basename \"${SHELL}\")\"\n# Restart your terminal or source your shell configuration\nsource ~/.zshrc  # for zsh\nsource ~/.bashrc # for bash\n```\n\n2. Create and activate a new conda environment:\n\n```bash\nconda create --name bitcoin-ai-agent-crew-backend python=3.12\nconda activate bitcoin-ai-agent-crew-backend\n```\n\n3. Install Python dependencies:\n\n```bash\npip install -r requirements.txt\n```\n\n4. Set up the TypeScript tools:\n\n```bash\ncd agent-tools-ts/\nbun install\ncd ..\n```\n\n5. Run the development server:\n\n```bash\nuvicorn main:app --host 0.0.0.0 --port 8000 --reload\n```\n\n### Option 2: Using Docker\n\n1. Build the Docker image:\n\n```bash\ndocker build -t bitcoin-ai-agent-crew-backend .\n```\n\n2. Run the container:\n\n```bash\ndocker run -p 8000:8000 --env-file .env bitcoin-ai-agent-crew-backend\n```\n\n### Verifying the Installation\n\nThe API should be accessible at `http://localhost:8000`. You can verify it's working by:\n\n1. Checking the health endpoint:\n\n```bash\ncurl http://localhost:8000/\n```\n\n2. Viewing the API documentation:\n\n```bash\n# Open in your browser\nhttp://localhost:8000/docs\n```\n\n## Usage\n\nThe backend provides several API endpoints:\n\n- `/` - Health check\n- `/bot` - Telegram bot functionality\n- `/chat` - Chat functionality\n\nFor detailed API documentation, visit the `/docs` endpoint when running the server.\n\n## Development Notes\n\n- The main development branch is `feat/digitalocean`\n- Frontend corresponding branch is `feat/cloudflare`\n- The system uses OpenAI's API with rate limits depending on your tier\n- Bun is used for TypeScript scripts, particularly for wallet operations\n\n## Contributing\n\n1. Branch protection is enabled on `main`\n2. Auto-deployment is configured for updates\n3. Pull requests require one approval\n4. Please ensure all tests pass before submitting a PR\n\n## Troubleshooting\n\nIf you encounter rate limit issues with OpenAI:\n\n- Check your current tier limits at https://platform.openai.com/settings/organization/limits\n- TPM (Tokens Per Minute) limits vary by tier:\n  - Tier 1: 200,000 TPM\n  - Tier 2: 2,000,000 TPM\n\n## Supabase\n\n```sql\nCREATE TRIGGER on_auth_user_created AFTER INSERT ON auth.users FOR EACH ROW EXECUTE FUNCTION handle_new_user()\n```\n\n### NAME\n\n```sql\nhandle_new_user\n```\n\n```sql\nBEGIN\n  INSERT INTO public.profiles (id, username, email)\n  VALUES (NEW.id, NEW.raw_user_meta_data-\u003e\u003e'user_name', NEW.email);\n  RETURN NEW;\nEND;\n```\n\nSecurity needs to be definer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolagent99%2Fbitcoin-ai-agent-crew-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolagent99%2Fbitcoin-ai-agent-crew-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolagent99%2Fbitcoin-ai-agent-crew-backend/lists"}