The problem
A search can miss a useful document when your question uses different words from the document itself. Your agent needs a tool that finds information by meaning, not just matching words. That helps it locate relevant material before trying to answer.
How NativePort helps
NativePort connects to Jina to prepare documents for searches based on meaning. Once the documents are saved in a searchable collection, your agent can find relevant passages even when your question uses different words. This helps it locate useful material before giving an answer.
Let your agent build it
You don’t need to write this code yourself. Copy the prompt and paste it into your agent. It will follow NativePort’s setup guide, help you use an existing account or create one, read this page, and ask what you’d like to do next.
View prompt
Help me use NativePort for this use case. 1. Read https://nativeport.ai/SKILL.md and follow its instructions to learn how to use NativePort. Save or update the skill if your environment supports it. 2. Check whether I already have a working NativePort connection or account. Reuse it if available. Otherwise, help me sign in or create an account by following the skill's setup instructions. Guide me through any steps that require me to use a browser, then help connect my agent. Keep credentials private. 3. Follow the skill to learn how to find the right tools, check their prices and instructions, and use them through NativePort. 4. Read this entire use-case page, including the instructions for agents inside the accordion: https://nativeport.ai/use-cases/text-embeddings/ Once setup is complete and you have read the page, briefly explain what you can help me do and ask me what I would like to do next. Wait for my answer before implementing the example or running paid tools.
Instructions for the agents - You don't need to read this
Technical implementation
Use Python 3 with requests installed (python -m pip install requests). Set NATIVEPORT_API_KEY in your environment to your NativePort key. Run the snippets on your server, where your key stays private.
This example creates vectors for two passages, then embeds the question with the matching query task.
import os
import requests
BASE = "https://api.nativeport.ai"
HEADERS = {"Authorization": f"Bearer {os.environ['NATIVEPORT_API_KEY']}"}
def embed(texts, task):
response = requests.post(BASE + "/jina/embeddings", headers=HEADERS,
json={"model": "jina-embeddings-v3", "task": task,
"input": texts, "normalized": True}, timeout=90)
response.raise_for_status()
return [item["embedding"] for item in
sorted(response.json()["data"], key=lambda item: item["index"])]
passages = ["Returns are accepted within 30 days.", "Support opens at nine."]
vectors = embed(passages, "retrieval.passage")
query = embed(["When can I return a purchase?"], "retrieval.query")[0]
scores = [sum(a * b for a, b in zip(query, vector)) for vector in vectors]
best = max(range(len(scores)), key=scores.__getitem__)
print(passages[best])For larger collections, store vectors in your own vector index such as pgvector or OpenSearch. Keep the same model and dimensions for stored passages and queries; a model change generally requires re-embedding. The chat endpoint does not generate embeddings. See Jina’s routes.
Tool costs
| Tool used in the example | Price per call |
|---|---|
| Jina — text embeddings | $0.0000211 / 1,000 tokens (usage-based) |
Prices in USD. Usage-based tools have no fixed per-call price. View pricing.