{"id":28631017,"url":"https://github.com/perinim/langsmith-bedrock-agents","last_synced_at":"2025-06-12T13:09:43.425Z","repository":{"id":298369664,"uuid":"999545612","full_name":"PeriniM/langsmith-bedrock-agents","owner":"PeriniM","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-10T18:35:29.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-10T19:52:10.284Z","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/PeriniM.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-06-10T12:16:48.000Z","updated_at":"2025-06-10T18:35:32.000Z","dependencies_parsed_at":"2025-06-10T20:03:41.334Z","dependency_job_id":null,"html_url":"https://github.com/PeriniM/langsmith-bedrock-agents","commit_stats":null,"previous_names":["perinim/langsmith-bedrock-agents"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PeriniM/langsmith-bedrock-agents","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeriniM%2Flangsmith-bedrock-agents","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeriniM%2Flangsmith-bedrock-agents/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeriniM%2Flangsmith-bedrock-agents/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeriniM%2Flangsmith-bedrock-agents/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PeriniM","download_url":"https://codeload.github.com/PeriniM/langsmith-bedrock-agents/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeriniM%2Flangsmith-bedrock-agents/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259470950,"owners_count":22862999,"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","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-06-12T13:09:42.690Z","updated_at":"2025-06-12T13:09:43.408Z","avatar_url":"https://github.com/PeriniM.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LangSmith Bedrock Agents Observer\n\nThis project implements observability for AWS Bedrock Agents using OpenTelemetry and LangSmith. It captures detailed telemetry about agent interactions, model calls, and agent responses.\n\n## Prerequisites\n\n- Python 3.8+\n- AWS account with Bedrock access\n- LangSmith account and API key\n\n## Installation\n\n1. Clone this repository\n2. Create and activate a virtual environment (recommended):\n   ```bash\n   python -m venv venv\n   source venv/bin/activate  # On Windows: venv\\Scripts\\activate\n   ```\n3. Install the required packages:\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n## Configuration\n\nThe application requires the following environment variables:\n\n### Required Environment Variables\n\n- `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` or the corresponding secrets for AWS authentication\n- `AGENT_ID` - The ID of your AWS Bedrock Agent\n- `AGENT_ALIAS_ID` - The Alias ID of your AWS Bedrock Agent\n- `LANGSMITH_API_KEY` - Your LangSmith API key for trace ingestion\n\n### Optional Environment Variables\n\n- `LANGSMITH_PROJECT` - LangSmith project name (default: \"bedrock-agents\")\n- `AWS_REGION` - AWS region for Bedrock (default: \"eu-central-1\")\n\nYou can also set these variables in a `.env` file:\n\n```\nAGENT_ID=your-agent-id\nAGENT_ALIAS_ID=your-agent-alias-id\nLANGSMITH_API_KEY=your-langsmith-api-key\nLANGSMITH_PROJECT=your-project-name\nAWS_ACCESS_KEY_ID=your-aws-access-key\nAWS_SECRET_ACCESS_KEY=your-aws-secret-key\n```\n\n## Running the Application\n\nExecute the main script to invoke your AWS Bedrock agent and send traces to LangSmith:\n\n```bash\npython main.py\n```\n\nFor a custom prompt (instead of the default \"Good evening. What can I do in new york?\"), modify the agent_prompt variable in main.py.\n\n## Viewing Traces\n\nAfter execution, you can view the traces in your [LangSmith dashboard](https://smith.langchain.com/).\n\n## Project Structure\n\n- `main.py` - Main application entry point and OpenTelemetry configuration\n- `observability/` - Directory containing modules for trace processing\n  - `__init__.py` - Core observability functions\n  - `attributes.py` - OpenTelemetry attribute constants\n\n## Troubleshooting\n\n- **No traces visible in LangSmith**: Verify your LANGSMITH_API_KEY and check network connectivity\n- **AWS API errors**: Confirm your AWS credentials and region settings\n- **Missing environment variables**: Ensure all required variables are set\n\n## License\n\n[MIT License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperinim%2Flangsmith-bedrock-agents","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperinim%2Flangsmith-bedrock-agents","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperinim%2Flangsmith-bedrock-agents/lists"}