langchain-camino
An integration package connecting Camino AI Reality Grounding API and LangChain.
Installation
pip install langchain-camino
Setup
To use this package, you need to get a Camino API key from https://app.getcamino.ai/.
export CAMINO_API_KEY="your-api-key"
Usage
CaminoSearch - Place Search
Search for places by name using Nominatim:
from langchain_camino import CaminoSearch
# Initialize the tool
search = CaminoSearch()
# Search for places
result = search.invoke({"place_name": "coffee shops in San Francisco"})
print(result)
CaminoQuery - Natural Language Location Queries
Make natural language location queries with optional AI ranking:
from langchain_camino import CaminoQuery
# Initialize the tool
query = CaminoQuery(ai_ranking=True)
# Query with natural language
result = query.invoke({
"query": "Find good restaurants near me",
"lat": 37.7749,
"lon": -122.4194,
"radius": 1.0
})
print(result)
CaminoJourney - Multi-waypoint Journey Planning
Plan optimized journeys with multiple stops:
from langchain_camino import CaminoJourney
# Initialize the tool
journey = CaminoJourney(transport_mode="car", optimize=True)
# Plan a journey
waypoints = [
(37.7749, -122.4194), # San Francisco
(37.7849, -122.4094), # Next stop
(37.7949, -122.3994) # Final destination
]
result = journey.invoke({
"waypoints": waypoints,
"transport_mode": "car",
"optimize": True
})
print(result)
Using with LangChain Agents
All tools can be used with LangChain agents:
from langchain.agents import initialize_agent, AgentType
from langchain_openai import ChatOpenAI
from langchain_camino import CaminoSearch, CaminoQuery, CaminoJourney
# Initialize LLM
llm = ChatOpenAI(temperature=0)
# Initialize tools
tools = [
CaminoSearch(),
CaminoQuery(),
CaminoJourney()
]
# Create agent
agent = initialize_agent(
tools,
llm,
agent=AgentType.STRUCTURED_CHAT_ZERO_SHOT_REACT_DESCRIPTION,
verbose=True
)
# Use the agent
response = agent.run("Find a coffee shop in downtown San Francisco and plan a route there from the Golden Gate Bridge")
API Reference
CaminoSearch
Search for places by name using the Camino API.
Parameters:
place_name(str): Name of the place to search forlimit(int, optional): Maximum number of results (default: 5)
CaminoQuery
Make natural language location queries.
Parameters:
query(str): Natural language querylat(float, optional): Latitude for location contextlon(float, optional): Longitude for location contextradius(float, optional): Search radius in kilometerslimit(int, optional): Maximum number of results (default: 10)ai_ranking(bool, optional): Use AI-powered ranking (default: True)
CaminoJourney
Plan multi-waypoint journeys with route optimization.
Parameters:
waypoints(List[Tuple[float, float]]): List of (lat, lon) coordinatestransport_mode(str, optional): Transport mode - "car", "bike", "foot", "transit" (default: "car")optimize(bool, optional): Optimize route for time/distance (default: True)
Development
Setup
git clone https://github.com/your-repo/langchain-camino
cd langchain-camino
pip install -e ".[test,lint]"
Testing
# Run unit tests
pytest tests/unit_tests/
# Run integration tests (requires API key)
pytest tests/integration_tests/
# Run all tests
pytest
Linting
# Run linting
ruff check .
# Run type checking
mypy langchain_camino/
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Metadata
Release files for langchain-camino 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| langchain_camino-0.1.0.tar.gz | 113.9 kB | Without provenance | Details for langchain_camino-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| langchain_camino-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for langchain_camino-0.1.0-py3-none-any.whl |
Total release size: 129.4 kB
Release files / langchain_camino-0.1.0.tar.gz
| Download URL | langchain_camino-0.1.0.tar.gz |
|---|---|
| Size | 113.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
79f4388831f7e80e95dfbd87c34e31d921a5db2ec2adc1d8c1c2e96f0263582f
|
|
BLAKE2b-256 checksum How to use checksums |
5346ff404fff2d276debb1a8e925a05227f89b5bea96c6b0b9b62a77a91b065e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.4 CPython/3.13.3 Windows/10
|
Release files / langchain_camino-0.1.0-py3-none-any.whl
| Download URL | langchain_camino-0.1.0-py3-none-any.whl |
|---|---|
| Size | 15.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d7d5a18001e8279ff3899c502fd221d2d5933eedbdaeb01becda81061879daf8
|
|
BLAKE2b-256 checksum How to use checksums |
c239fb37de6f3d9b0f8e99f1e283150d0dae8c2831204cad97a1efc8670ca647
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.4 CPython/3.13.3 Windows/10
|
Security for langchain-camino 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.