Appearance
Discovery and Listing Tools โ
gnosari_search โ
Unified search across all Gnosari entity types with optional text query and structured filters.
Annotations: readOnlyHint: true ยท destructiveHint: false ยท idempotentHint: true ยท openWorldHint: false
Parameters โ
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
query | string | No | - | Text search query. null returns all results using structured filters only |
entity | string | No | "agents" | agents, traits, templates, knowledge, or all |
access_level | string | No | - | Filter agents by: PUBLIC, PRIVATE, PASSWORD_PROTECTED. Ignored for non-agent entities |
domain | string | No | - | Filter agents by domain name (e.g. "joina.chat"). Ignored for non-agent entities |
sort_by | string | No | "updated_at" | updated_at, created_at, or name |
sort_order | string | No | "desc" | asc or desc |
limit | integer | No | 20 | Maximum results per entity type |
skip | integer | No | 0 | Pagination offset |
Returns โ
Single entity (
entity != "all") โSearchResult:results: list[dict]โ matching entitiestotal: intโ total countsearch_mode: strโ search backend used:"opensearch_hybrid"or"sql_fallback"
All entities (
entity="all") โSearchAllResult:agents: list[dict]traits: list[dict]templates: list[dict]knowledge: list[dict]total: intโ count across all typessearch_mode: strโ search backend used:"opensearch_hybrid"or"sql_fallback"
The search_mode field indicates which backend produced the results. When OpenSearch is available and healthy, semantic hybrid search is used ("opensearch_hybrid"). When OpenSearch is unavailable or the query fails, the system transparently falls back to SQL ILIKE-based search ("sql_fallback").
Agent result dicts include a collection key with the lite shape {"record_count": int, "new_count": int}, or null if the agent has no collected records. last_capture is omitted at search time to keep response sizes small โ use gnosari_get when the full collection summary (including last_capture) is needed.
::warning Eventual consistency: Results may take 1-2 seconds to reflect recent mutations (creates, updates, deletes). The search index is updated asynchronously via the outbox worker. On first deploy, run reindex_entities.py to populate the OpenSearch index with existing data. ::
Examples โ
Find agents by concept (semantic search):
python
results = gnosari_search(query="customer help desk", entity="agents")
print(f"Search mode: {results.search_mode}")
for agent in results.results:
print(f"{agent['name']} (ID: {agent['id']}, {agent['access_level']})")
# Search mode: opensearch_hybrid
# Support Bot (ID: 123, PUBLIC)
# Enterprise Support (ID: 456, PRIVATE)List all public agents:
python
results = gnosari_search(entity="agents", access_level="PUBLIC")
print(f"Public agents: {results.total}")Search across everything:
python
results = gnosari_search(query="leads", entity="all")
print(f"Agents: {len(results.agents)}, Templates: {len(results.templates)}")
print(f"Search mode: {results.search_mode}")Check search backend status:
python
results = gnosari_search(query="test", entity="agents")
if results.search_mode == "sql_fallback":
print("OpenSearch unavailable -- using SQL fallback (exact match only)")gnosari_check_uri โ
Check whether a URI is available for publishing an agent.
Annotations: readOnlyHint: true ยท destructiveHint: false ยท idempotentHint: true ยท openWorldHint: false
Parameters โ
| Name | Type | Required | Description |
|---|---|---|---|
uri | string | Yes | URI slug to check (e.g. "my-agent") |
domain | string | No | Domain name to check on. Defaults to account's default domain |
Returns โ
UriCheckResult:
| Field | Type | Description |
|---|---|---|
available | bool | Whether the URI is free to use |
current_gnosari_id | int | ID of the agent using this URI (if taken) |
current_gnosari_name | str | Name of the agent using this URI (if taken) |
hints | list[str] | Suggestions for alternatives if taken |
Example โ
python
check = gnosari_check_uri(uri="support-bot")
if check.available:
gnosari_manage_access(gnosari_id=123, access_level="PUBLIC", uri="support-bot")
else:
print(f"Taken by agent {check.current_gnosari_id}: {check.current_gnosari_name}")
print(check.hints)
# ["URI 'support-bot' is taken. Try variations like 'support-bot-2' or 'support-bot-bot'."]Manage Tools โ List Action โ
Each manage tool supports action="list" for read-only discovery:
gnosari_manage_traits(action="list") โ
python
result = gnosari_manage_traits(action="list")
# Returns PaginatedTraitsResponse
for trait in result.data:
print(f"{trait.name} (ID: {trait.id}, weight: {trait.weight}, is_default: {trait.is_default})")
# Empathetic (ID: 42, weight: 2.0, is_default: True)
# Professional (ID: 17, weight: 1.0, is_default: False)
# Filter by search
result = gnosari_manage_traits(action="list", search="professional")
# Check which traits are auto-assigned to new agents
defaults = [t for t in result.data if t.is_default]Each TraitRead item in result.data includes is_default: bool โ True when the trait is automatically assigned to every interactively created new agent in the account.
gnosari_manage_knowledge(action="list") โ
python
result = gnosari_manage_knowledge(action="list")
# Returns PaginatedKnowledgeSourcesResponse
for source in result.data:
print(f"{source.name}: {source.status} ({source.document_count} docs)")
# Filter by loading status
result = gnosari_manage_knowledge(action="list", status="failed")gnosari_manage_data_collection(action="list") โ
python
result = gnosari_manage_data_collection(action="list")
# Returns PaginatedEntityTypesResponse
for template in result.data:
print(f"{template.name} (system={template.is_template})")
# Exclude system templates
result = gnosari_manage_data_collection(action="list", include_system=False)Tool Comparison โ
| Tool | Purpose | readOnly | Auth |
|---|---|---|---|
gnosari_search | Text search + filter across entities | Yes | Yes |
gnosari_check_uri | URI availability check | Yes | Yes |
gnosari_manage_traits(action="list") | List traits โ each item includes is_default: bool | Yes | Yes |
gnosari_manage_knowledge(action="list") | List knowledge sources | Yes | Yes |
gnosari_manage_data_collection(action="list") | List data templates | Yes | Yes |
gnosari_collected_data(action="list") | View collected records | Yes | Yes |
gnosari_collected_data(action="stats") | Collection statistics | Yes | Yes |
gnosari_health | Server status | Yes | No |
Next Steps โ
- Agent Management Tools - CRUD and configuration tools
- API Overview - Tool relationships and patterns