Skip to content

Conversation

@teetangh
Copy link
Collaborator

  • Added Colab-specific logging that uses sys.stdout instead of stderr
  • Changed agentc.Catalog() to use no parameters (will use .env or defaults)
  • This prevents connection errors when AGENT_CATALOG_* vars are not set

🤖 Generated with Claude Code

Co-Authored-By: Claude [email protected]

teetangh and others added 13 commits October 23, 2025 15:14
- Added Colab-specific logging that uses sys.stdout instead of stderr
- Changed agentc.Catalog() to use no parameters (will use .env or defaults)
- This prevents connection errors when AGENT_CATALOG_* vars are not set

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Fixed critical Colab connection issues across all 3 agent notebooks:

1. Connection String Protocol:
   - Added automatic couchbases:// protocol prepending to connection strings
   - Capella API returns hostname only, missing protocol prefix
   - Prevents UnAmbiguousTimeoutException during cluster connection

2. Environment Variable Preservation:
   - Added CB_CONN_STRING, CB_USERNAME, CB_PASSWORD, CB_BUCKET to .env file
   - Prevents dotenv.load_dotenv(override=True) from wiping CB_* vars
   - Ensures database credentials persist across notebook cells

3. Standardized .agentcignore:
   - Synchronized .agentcignore across all agents to minimal set
   - Added wget commands to download .agentcignore in hotel and landmark notebooks

4. Updated Agent Catalog wheels:
   - Upgraded from v0.2.5a2 to v0.2.5a3 in hotel and landmark notebooks
   - Ensures consistent version across all agents

Changes applied to:
- flight_search_agent_langraph/flight_search_agent_tutorial.{ipynb,json}
- hotel_search_agent_langchain/hotel_search_agent_tutorial.{ipynb,json}
- hotel_search_agent_langchain/.agentcignore
- landmark_search_agent_llamaindex/landmark_search_agent_tutorial.{ipynb,json}

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
…tion failure

Fixed "No embeddings service could be initialized" error by adding CAPELLA_API_*
variables to .env file across all notebooks.

Root Cause:
- Infrastructure setup cells set CAPELLA_API_* env vars (endpoint, keys, models)
- Later cells call dotenv.load_dotenv(override=True)
- This wiped CAPELLA_API_* vars because they weren't in .env file
- AI service initialization failed without credentials

Changes:
- Added 7 CAPELLA_API_* variables to .env file write section:
  * CAPELLA_API_ENDPOINT
  * CAPELLA_API_EMBEDDING_ENDPOINT
  * CAPELLA_API_LLM_ENDPOINT
  * CAPELLA_API_EMBEDDINGS_KEY
  * CAPELLA_API_LLM_KEY
  * CAPELLA_API_EMBEDDING_MODEL
  * CAPELLA_API_LLM_MODEL

This ensures AI service credentials persist across notebook cells.

Updated notebooks:
- flight_search_agent_langraph/flight_search_agent_tutorial.{ipynb,json}
- hotel_search_agent_langchain/hotel_search_agent_tutorial.{ipynb,json}
- landmark_search_agent_llamaindex/landmark_search_agent_tutorial.{ipynb,json}

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Introduced a new section in the tutorial notebooks to allow users to configure optional API keys for OpenAI and Arize Phoenix. This includes prompts for entering API keys and appending them to the .env file for persistent access. The changes enhance the observability and fallback capabilities of the agents.

Updated notebooks:
- flight_search_agent_langraph/flight_search_agent_tutorial.{ipynb,json}
- hotel_search_agent_langchain/hotel_search_agent_tutorial.{ipynb,json}
- landmark_search_agent_llamaindex/landmark_search_agent_tutorial.{ipynb,json}

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Fixed two critical issues in all three agent notebooks:

1. Input Blocking in Colab:
   - Replaced input() with getpass.getpass() for sensitive inputs
   - Added try/except fallback for environments where getpass doesn't work
   - Users can now press Enter to skip optional configuration
   - Prevents notebook from hanging on input prompts in Colab

2. Empty CAPELLA_API_ENDPOINT Variables:
   - Changed from os.environ['KEY'] to os.environ.get('KEY', '') when writing to .env
   - Prevents KeyError if variables aren't set during infrastructure setup
   - Safely handles missing variables with empty string defaults
   - Ensures .env file is always writable even with partial configuration

Changes to Optional API Keys Cell:
- Added getpass import
- Wrapped input calls in try/except blocks
- Improved user messaging ("Press Enter to skip...")
- Better fallback messages ("will use Capella AI only", "observability disabled")

Updated notebooks:
- flight_search_agent_langraph/flight_search_agent_tutorial.{ipynb,json}
- hotel_search_agent_langchain/hotel_search_agent_tutorial.{ipynb,json}
- landmark_search_agent_llamaindex/landmark_search_agent_tutorial.{ipynb,json}

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
…onse

Fixed empty CAPELLA_API_ENDPOINT issue that was causing "Request URL is missing protocol" errors.

Root Cause:
The Capella AI API returns the connectionString nested inside a 'model' object:
```
{
  "model": {
    "connectionString": "https://...",
    ...
  }
}
```

Previous code was trying to access embedding_details.get('connectionString')
which returned None because connectionString is inside the nested 'model' object.

Solution:
- Extract the 'model' object first: embedding_details.get('model', {})
- Then get connectionString from the nested object: model_info.get('connectionString', '')
- This properly populates CAPELLA_API_ENDPOINT and CAPELLA_API_EMBEDDING_ENDPOINT

Now the embeddings service will work correctly with proper endpoint URLs.

Updated: flight_search_agent_langraph/flight_search_agent_tutorial.{ipynb,json}

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
- Converted the flight_search_agent_tutorial from JSON format to IPython Notebook format.
- Added execution counts and outputs for various code cells to enhance interactivity and user experience.
- Updated output IDs for consistency and improved logging of resource downloads.
- Removed the outdated JSON file associated with the tutorial.

This update improves the usability of the tutorial by providing a more interactive experience for users.
@teetangh teetangh self-assigned this Oct 24, 2025
@teetangh teetangh marked this pull request as ready for review October 24, 2025 20:12
@teetangh teetangh merged commit b1a0139 into main Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant