SDK¶
The SDK module provides the high-level Python interface for OpenJarvis. The
Jarvis class wraps engine discovery, agent dispatch, memory operations, and
telemetry into a single convenient entry point. MemoryHandle acts as a lazy
proxy for memory backend operations.
Jarvis¶
Jarvis
¶
Jarvis(*, config: Optional[JarvisConfig] = None, config_path: Optional[str] = None, engine_key: Optional[str] = None, model: Optional[str] = None)
High-level OpenJarvis SDK.
Usage::
from openjarvis import Jarvis
j = Jarvis()
response = j.ask("Hello, what can you do?")
print(response)
j.close()
Source code in src/openjarvis/sdk.py
Attributes¶
Functions¶
ask
¶
ask(query: str, *, model: Optional[str] = None, agent: Optional[str] = None, tools: Optional[List[str]] = None, temperature: Optional[float] = None, max_tokens: Optional[int] = None, context: bool = True) -> str
Send a query and return the response text.
Source code in src/openjarvis/sdk.py
ask_full
¶
ask_full(query: str, *, model: Optional[str] = None, agent: Optional[str] = None, tools: Optional[List[str]] = None, temperature: Optional[float] = None, max_tokens: Optional[int] = None, context: bool = True) -> Dict[str, Any]
Send a query and return the full result dict.
Returns a dict with keys: content, usage, tool_results (if agent mode).
Source code in src/openjarvis/sdk.py
list_models
¶
list_engines
¶
close
¶
Release all resources.
Source code in src/openjarvis/sdk.py
MemoryHandle¶
MemoryHandle
¶
MemoryHandle(config: JarvisConfig)
Proxy for memory operations. Lazily initializes backend.
Source code in src/openjarvis/sdk.py
Functions¶
index
¶
Index a file or directory into memory.
Source code in src/openjarvis/sdk.py
search
¶
Search memory for relevant chunks.
Source code in src/openjarvis/sdk.py
stats
¶
Return memory backend statistics.