diff --git a/docs/GettingStarted/Installation.md b/docs/GettingStarted/Installation.md
index 5ae344dc..873ce32d 100644
--- a/docs/GettingStarted/Installation.md
+++ b/docs/GettingStarted/Installation.md
@@ -33,7 +33,7 @@ git clone https://github.com/NapthaAI/naptha-sdk.git && cd naptha-sdk
#### Install Dependencies
```bash
-poetry install # This may take a few minutes
+poetry install # This may take a few seconds
```
#### Activate Environment
@@ -75,9 +75,11 @@ For a local node, set ```NODE_URL=http://localhost:7001``` in the .env file.
To use a hosted node, set ```NODE_URL=http://node.naptha.ai:7001``` or ```NODE_URL=http://node1.naptha.ai:7001``` in the .env file.
### All Systems Go!
-You can check your installation by running:
+You can check your installation by running a sample CLI command:
-### Troubleshooting
+```bash
+naptha agents # should return a list of agent modules
+```
Common issues and solutions
diff --git a/docs/NapthaModules/1-agents.md b/docs/NapthaModules/1-agents.md
index ae62d255..8218fd48 100644
--- a/docs/NapthaModules/1-agents.md
+++ b/docs/NapthaModules/1-agents.md
@@ -65,9 +65,58 @@ For each agent, you will see a url where you can check out the code.
#### Create a New Agent
```bash
-naptha agents agent_name -p "description='Agent description' parameters='{tool_name: str, tool_input_data: str}' module_url='ipfs://QmNer9SRKmJPv4Ae3vdVYo6eFjPcyJ8uZ2rRSYd3koT6jg'"
+naptha publish -r https://github.com/NapthaAI/hello_world_agent # using a Github repo
+naptha publish -r # using IPFS. Automatically builds the module, publishes it to IPFS and register
```
+If your agent module makes use of other modules (e.g. a tool module or memory module), you may also want to publish those sub-modules using:
+
+```bash
+naptha publish -r -s
+```
+
+Make sure to add a list of dicts with a ```name``` field to one or more of the ```tool_deployments```, ```environment_deployments```, ```kb_deployments```, or ```memory_deployments``` fields in your deployment.json file:
+
+ ```
+ [
+ {
+ ...
+ "tool_deployments": [{"name": "tool_deployment_1"}],
+ "environment_deployments": [{"name": "environment_deployment_1"}],
+ "kb_deployments": [{"name": "kb_deployment_1"}],
+ "memory_deployments": [{"name": "memory_deployment_1"}],
+ ...
+ }
+ ]
+ ```
+
+And also add corresponding ```tool_deployments.json```, ```environment_deployments.json```, ```kb_deployments.json```, or ```memory_deployments.json``` files to the ```configs``` folder for each subdeployment. In each file, there should be a module field with a ```name```, ```description```, ```parameters```, ```module_type```, ```module_version```, ```module_entrypoint```, and ```execution_type``` fields:
+
+ ```
+ [
+ {
+ ...
+ "module": {
+ "name": "subdeployment_module",
+ "description": "Subdeployment Module",
+ "parameters": "{tool_name: str, tool_input_data: str}",
+ "module_type": "tool",
+ "module_version": "v0.1",
+ "module_entrypoint": "run.py",
+ "execution_type": "package"
+ },
+ ...
+ }
+ ]
+ ```
+
+You can confirm that the modules were registered on the Hub by running:
+
+```bash
+naptha agents
+```
+
+
#### Delete an Agent
```bash
diff --git a/docs/Overview.md b/docs/Overview.md
index 777c64dd..0778b4dd 100644
--- a/docs/Overview.md
+++ b/docs/Overview.md
@@ -53,10 +53,16 @@ export const featureCards = [
link: 'NapthaStorage/overview'
},
{
- title: 'Documentation',
- description: 'Explore our comprehensive guides and references',
+ title: 'Examples',
+ description: 'Explore our examples',
icon: '📚',
- link: '/GettingStarted/Installation'
+ link: '/Examples/'
+ },
+ {
+ title: 'Tutorials',
+ description: 'Learn how to use Naptha',
+ icon: '📚',
+ link: '/Tutorials/'
}
];
diff --git a/docs/Tutorials/module-guide.md b/docs/Tutorials/module-guide.md
index b18f9f2d..ca95b70b 100644
--- a/docs/Tutorials/module-guide.md
+++ b/docs/Tutorials/module-guide.md
@@ -161,54 +161,34 @@ poetry run python my-first-agent/run.py
If you're interested in testing your agent module on a local node, please follow the instructions [here](https://github.com/NapthaAI/node?tab=readme-ov-file)
-## Packaging Your Agent
-Once your agent is ready, it's time to package it with Poetry by running:
-
-```bash
-poetry build
-```
-
-This creates distribution files in your `dist` directory.
-
## Publishing to Naptha Hub
-Publishing involves two key steps:
+You can register your agent module on the Naptha Hub in two ways:
+- Using a Github repo
+- Using IPFS
:::tip
- Add versioning before pushing to either Github or IPFS or Both.
+Add version tags to your repository:
```bash
# Add version tag
git tag v0.1.0
git push --tags
```
-:::
-
-### 1. Upload to IPFS
-```bash
-naptha write_storage -i dist/my-first-agent-0.1.0.tar.gz --ipfs
-```
-You'll receive an IPFS `Folder ID` upon success like:
-
-```
-Writing storage
-{'message': 'Files written to storage', 'folder_id': '********************************'}
-```
-:::info
-
-Save the returned IPFS `Folder ID` - you'll need it for registration.
+if you are using a Github repo, remember to:
+- git add and commit your files
+- create a new repository on Github and push your code.
:::
-:::note
+You can register the module from a GitHub url by adding your specific repo url with the ```-r``` flag:
-If you would like to use `Github` instead, replace the `module_url` value in the *register agent* command with your repository url. Remember to:
-- git add and commit your files
-- create a new repository on Github and push your code.
+```bash
+naptha publish -r https://github.com/NapthaAI/module_template
+```
-:::
+Alternatively, you can store the module on IPFS and register on the Naptha Hub by running:
-### 2. Register Your Agent
```bash
-naptha agents my-first-agent -p "description='My first Naptha agent' parameters='{tool_name: str, tool_input_data: str}' module_url='ipfs://YOUR_FOLDER_ID'"
+naptha publish -r
```
## Verifying Your Publication
diff --git a/static/api_reference/cli.html b/static/api_reference/cli.html
index 1932731e..a436350b 100644
--- a/static/api_reference/cli.html
+++ b/static/api_reference/cli.html
@@ -2,7 +2,7 @@
-
+
Module
naptha_sdk.cli
Functions
-
-async def add_data_to_memory(naptha, memory_name, data, user_id=None, memory_node_url='http://localhost:7001')
-
-Expand source code
-
-
-async def add_data_to_memory(naptha, memory_name, data, user_id=None, memory_node_url="http://localhost:7001"):
- try:
- # Parse the data string into a dictionary
- data_dict = {}
- # Split by spaces, but keep quoted strings together
- parts = shlex.split(data)
-
- for part in parts:
- if '=' in part:
- key, value = part.split('=', 1)
- # Remove quotes if they exist
- value = value.strip("'\"")
- data_dict[key] = value
-
- data_dict = [data_dict]
-
- memory_run_input = {
- "consumer_id": user_id,
- "inputs": {
- "mode": "add_data",
- "data": json.dumps(data_dict)
- },
- "memory_deployment": {
- "name": memory_name,
- "module": {
- "name": memory_name
- },
- "memory_node_url": memory_node_url
- }
- }
-
- memory_run = await naptha.node.run_memory_and_poll(memory_run_input)
- console = Console()
- console.print(f"\n[green]Successfully added data to memory:[/green] {memory_name}")
- console.print(memory_run)
-
- except Exception as e:
- console = Console()
- console.print(f"\n[red]Error adding data to memory:[/red] {str(e)}")
def cli()
Functions
-async def create(naptha,
module_name,
agent_modules=None,
agent_nodes=None,
environment_modules=None,
environment_nodes=None)
+async def create(naptha,
module_name,
agent_modules: list = None,
agent_nodes: list = None,
tool_modules: list = None,
tool_nodes: list = None,
kb_modules: list = None,
kb_nodes: list = None,
memory_modules: list = None,
memory_nodes: list = None,
environment_modules: list = None,
environment_nodes: list = None)
Functions
async def create(
naptha,
module_name,
- agent_modules = None,
- agent_nodes = None,
- environment_modules = None,
- environment_nodes = None
+ agent_modules: list = None,
+ agent_nodes: list = None,
+ tool_modules: list = None,
+ tool_nodes: list = None,
+ kb_modules: list = None,
+ kb_nodes: list = None,
+ memory_modules: list = None,
+ memory_nodes: list = None,
+ environment_modules: list = None,
+ environment_nodes: list = None
):
module_type = module_name.split(":")[0] if ":" in module_name else "agent"
module_name = module_name.split(":")[-1] # Remove prefix if exists
@@ -151,16 +107,37 @@
Functions
AgentDeployment(
name=agent_module,
module={"name": agent_module},
- node=url_to_node(agent_node)
+ node=NodeConfigUser(ip=agent_node.strip())
) for agent_module, agent_node in zip(agent_modules or [], agent_nodes or [])
],
+ "tool_deployments": [
+ ToolDeployment(
+ name=tool_module,
+ module={"name": tool_module},
+ node=NodeConfigUser(ip=tool_node.strip())
+ ) for tool_module, tool_node in zip(tool_modules or [], tool_nodes or [])
+ ],
+ "kb_deployments": [
+ KBDeployment(
+ name=kb_module,
+ module={"name": kb_module},
+ node=NodeConfigUser(ip=kb_node.strip())
+ ) for kb_module, kb_node in zip(kb_modules or [], kb_nodes or [])
+ ],
+ "memory_deployments": [
+ MemoryDeployment(
+ name=memory_module,
+ module={"name": memory_module},
+ node=NodeConfigUser(ip=memory_node.strip())
+ ) for memory_module, memory_node in zip(memory_modules or [], memory_nodes or [])
+ ],
"environment_deployments": [
EnvironmentDeployment(
name=env_module,
module={"name": env_module},
- node=url_to_node(env_node)
+ node=NodeConfigUser(ip=env_node.strip())
) for env_module, env_node in zip(environment_modules or [], environment_nodes or [])
- ]
+ ],
}
# Define deployment configurations for each module type
@@ -202,356 +179,97 @@ Functions
if module_type not in deployment_configs:
raise ValueError(f"Unsupported module type: {module_type}")
- print(f"Creating {module_type.title()}...")
deployment = deployment_configs[module_type]()
result = await naptha.node.create(module_type, deployment)
print(f"{module_type.title()} creation result: {result}")
-async def create_agent(naptha, agent_config)
-
-Expand source code
-
-
-async def create_agent(naptha, agent_config):
- print(f"Agent Config: {agent_config}")
- agent = await naptha.hub.create_agent(agent_config)
- if isinstance(agent, dict):
- print(f"Agent created: {agent}")
- elif isinstance(agent, list):
- print(f"Agent created: {agent[0]}")
-async def create_environment(naptha, environment_config)
-
-Expand source code
-
-
-async def create_environment(naptha, environment_config):
- print(f"Environment Config: {environment_config}")
- environment = await naptha.hub.create_environment(environment_config)
- if isinstance(environment, dict):
- print(f"Environment created: {environment}")
- elif isinstance(environment, list):
- print(f"Environment created: {environment[0]}")
-async def create_orchestrator(naptha, orchestrator_config)
-
-Expand source code
-
-
-async def create_orchestrator(naptha, orchestrator_config):
- print(f"Orchestrator Config: {orchestrator_config}")
- orchestrator = await naptha.hub.create_orchestrator(orchestrator_config)
- if isinstance(orchestrator, dict):
- print(f"Orchestrator created: {orchestrator}")
- elif isinstance(orchestrator, list):
- print(f"Orchestrator created: {orchestrator[0]}")
-async def create_persona(naptha, persona_config)
-
-Expand source code
-
-
-async def create_persona(naptha, persona_config):
- print(f"Persona Config: {persona_config}")
- persona = await naptha.hub.create_persona(persona_config)
- if isinstance(persona, dict):
- print(f"Persona created: {persona}")
- elif isinstance(persona, list):
- print(f"Persona created: {persona[0]}")
-async def list_agents(naptha)
-
-Expand source code
-
-
-async def list_agents(naptha):
- agents = await naptha.hub.list_agents()
-
- if not agents:
- console = Console()
- console.print("[red]No agents found.[/red]")
- return
-
- console = Console()
- table = Table(
- box=box.ROUNDED,
- show_lines=True,
- title="Available Agents",
- title_style="bold cyan",
- header_style="bold blue",
- row_styles=["", "dim"] # Alternating row styles
- )
-
- # Define columns with specific formatting
- table.add_column("Name", justify="left", style="green")
- table.add_column("ID", justify="left")
- table.add_column("Author", justify="left")
- table.add_column("Description", justify="left", max_width=50)
- table.add_column("Parameters", justify="left", max_width=30)
- table.add_column("Module URL", justify="left", max_width=30)
- table.add_column("Module Version", justify="center")
-
- # Add rows
- for agent in agents:
- table.add_row(
- agent['name'],
- agent['id'],
- agent['author'],
- agent['description'],
- str(agent['parameters']),
- agent['module_url'],
- agent['module_version'],
- )
-
- # Print table and summary
- console.print()
- console.print(table)
- console.print(f"\n[green]Total agents:[/green] {len(agents)}")
-async def list_environments(naptha)
+
+async def list_modules(naptha, module_type=None, module_name=None)
Expand source code
-async def list_environments(naptha):
- environments = await naptha.hub.list_environments()
+
-async def list_modules(naptha, module_type=None, module_name=None):
+ """List modules of a specific type or all modules if no type specified.
- if not environments:
- console = Console()
- console.print("[red]No environments found.[/red]")
- return
-
- console = Console()
- table = Table(
- box=box.ROUNDED,
- show_lines=True,
- title="Available Environments",
- title_style="bold cyan",
- header_style="bold blue",
- row_styles=["", "dim"] # Alternating row styles
- )
-
- # Define columns with specific formatting
- table.add_column("Name", justify="left", style="green")
- table.add_column("ID", justify="left")
- table.add_column("Author", justify="left")
- table.add_column("Description", justify="left", max_width=50)
- table.add_column("Parameters", justify="left", max_width=30)
- table.add_column("Module URL", justify="left", max_width=30)
- table.add_column("Module Version", justify="center")
-
- # Add rows
- for environment in environments:
- table.add_row(
- environment['name'],
- environment['id'],
- environment['author'],
- environment['description'],
- str(environment['parameters']),
- environment['module_url'],
- environment['module_version'],
- )
-
- # Print table and summary
- console.print()
- console.print(table)
- console.print(f"\n[green]Total environments:[/green] {len(environments)}")
-async def list_kbs(naptha, kb_name=None)
-
-Expand source code
-
-
-async def list_kbs(naptha, kb_name=None):
- kbs = await naptha.hub.list_kbs(kb_name=kb_name)
+ Args:
+ naptha: Naptha client instance
+ module_type (str, optional): Type of module to list (agent, tool, etc.)
+ module_name (str, optional): Specific module name to filter by
+ """
+ # Get modules of specified type or all modules
+ modules = await naptha.hub.list_modules(module_type=module_type)
- if not kbs:
+ if not modules:
console = Console()
- console.print("[red]No knowledge bases found.[/red]")
+ console.print(f"[red]No {module_type or 'modules'} found.[/red]")
return
+ # Configure table
+ title = f"Available {module_type.title() if module_type else 'Modules'}"
console = Console()
table = Table(
box=box.ROUNDED,
show_lines=True,
- title="Available Knowledge Bases",
- title_style="bold cyan",
- header_style="bold blue",
- row_styles=["", "dim"] # Alternating row styles
- )
-
- # Define columns with specific formatting
- table.add_column("Name", justify="left", style="green")
- table.add_column("ID", justify="left")
- table.add_column("Author", justify="left")
- table.add_column("Description", justify="left", max_width=50)
- table.add_column("Parameters", justify="left", max_width=40)
- table.add_column("Module URL", justify="left", max_width=40)
- table.add_column("Module Type", justify="left")
- table.add_column("Module Version", justify="center")
-
- # Add rows
- for kb in kbs:
- table.add_row(
- kb['name'],
- kb['id'],
- kb['author'],
- kb['description'],
- kb['parameters'],
- kb['module_url'],
- kb['module_type'],
- kb['module_version']
- )
-
- # Print table and summary
- console.print()
- console.print(table)
- console.print(f"\n[green]Total knowledge bases:[/green] {len(kbs)}")
-async def list_memories(naptha, memory_name=None)
-
-Expand source code
-
-
-async def list_memories(naptha, memory_name=None):
- memories = await naptha.hub.list_memories(memory_name=memory_name)
-
- if not memories:
- console = Console()
- console.print("[red]No memories found.[/red]")
- return
-
- console = Console()
- table = Table(
- box=box.ROUNDED,
- show_lines=True,
- title="Available memories",
+ title=title,
title_style="bold cyan",
header_style="bold blue",
row_styles=["", "dim"]
)
- table.add_column("Name", justify="left", style="green")
- table.add_column("ID", justify="left")
- table.add_column("Author", justify="left")
- table.add_column("Description", justify="left", max_width=50)
- table.add_column("Parameters", justify="left", max_width=40)
- table.add_column("Module URL", justify="left", max_width=40)
- table.add_column("Module Version", justify="center")
+ # Define columns with consistent formatting
+ columns = {
+ "Name": {"justify": "left", "style": "green"},
+ "ID": {"justify": "left"},
+ "Author": {"justify": "left"},
+ "Description": {"justify": "left", "max_width": 50},
+ "Parameters": {"justify": "left", "max_width": 40},
+ "Module URL": {"justify": "left", "no_wrap": True}, # Removed max_width to show full URL
+ "Module Version": {"justify": "left"},
+ "Module Type": {"justify": "left"},
+ "Module Entrypoint": {"justify": "left"}
+ }
+
+ # Add columns to table
+ for col_name, col_props in columns.items():
+ table.add_column(col_name, **col_props)
# Add rows
- for memory in memories:
+ for module in modules:
+ # Make URL clickable with link styling
+ url = f"[link={module['module_url']}]{module['module_url']}[/link]"
+
table.add_row(
- memory['name'],
- memory['id'],
- memory['author'],
- memory['description'],
- memory['parameters'],
- memory['module_url'],
- memory['module_version']
+ module['name'],
+ module['id'],
+ module['author'],
+ module['description'],
+ str(module['parameters']),
+ url, # Using formatted URL with link
+ module['module_version'],
+ module.get('module_type', ''),
+ module.get('module_entrypoint', '')
)
# Print table and summary
console.print()
console.print(table)
- console.print(f"\n[green]Total memories:[/green] {len(memories)}")
-async def list_memory_content(naptha, memory_name)
-
-Expand source code
-
-
+ console.print(f"\n[green]Total {module_type} modules:[/green] {len(modules)}")async def list_memory_content(naptha, memory_name):
- rows = await naptha.node.query_table(
- table_name=memory_name,
- columns="*",
- condition=None,
- order_by=None,
- limit=None
- )
-
- if not rows.get('rows'):
- console = Console()
- console.print("[red]No content found in memory.[/red]")
- return
-
- console = Console()
- table = Table(
- box=box.ROUNDED,
- show_lines=True,
- title=f"Memory Content: {memory_name}",
- title_style="bold cyan",
- header_style="bold blue",
- row_styles=["", "dim"]
- )
-
- # Add headers
- headers = list(rows['rows'][0].keys())
- for header in headers:
- if header.lower() in ['id', 'module_url']:
- table.add_column(header, justify="left", max_width=40)
- elif header.lower() in ['title', 'name']:
- table.add_column(header, justify="left", style="green", max_width=40)
- elif header.lower() in ['text', 'description', 'content']:
- table.add_column(header, justify="left", max_width=60)
- else:
- table.add_column(header, justify="left", max_width=30)
-
- # Add rows
- for row in rows['rows']:
- table.add_row(*[str(row.get(key, '')) for key in headers])
-
- # Print table and summary
- console.print()
- console.print(table)
- console.print(f"\n[green]Total rows:[/green] {len(rows['rows'])}")
List modules of a specific type or all modules if no type specified.
+naptha
module_type
: str
, optionalmodule_name
: str
, optional
async def list_nodes(naptha)
@@ -588,9 +306,10 @@ Functions
table.add_column("Owner", justify="left")
table.add_column("OS", justify="left")
table.add_column("Arch", justify="left")
- table.add_column("Num Servers", justify="left")
- table.add_column("Server Type", justify="left")
- table.add_column("HTTP Port", justify="left")
+ table.add_column("User Comm Protocol", justify="left")
+ table.add_column("User Comm Port", justify="left")
+ table.add_column("Num Node Comm Servers", justify="left")
+ table.add_column("Node Comm Protocol", justify="left")
table.add_column("Models", justify="left")
table.add_column("Num GPUs", justify="left")
table.add_column("Provider Types", justify="left")
@@ -603,9 +322,10 @@ Functions
node['owner'],
node['os'],
node['arch'],
- str(node['num_servers']),
- node['server_type'],
- str(node['http_port']),
+ node['user_communication_protocol'],
+ str(node['user_communication_port']),
+ str(node['num_node_communication_servers']),
+ node['node_communication_protocol'],
str(node['models']),
str(node['num_gpus']),
str(node['provider_types'])
@@ -617,116 +337,6 @@ Functions
-
-async def list_orchestrators(naptha)
-
-
-
-
-Expand source code
-
-async def list_orchestrators(naptha):
- orchestrators = await naptha.hub.list_orchestrators()
-
- if not orchestrators:
- console = Console()
- console.print("[red]No orchestrators found.[/red]")
- return
-
- console = Console()
- table = Table(
- box=box.ROUNDED,
- show_lines=True,
- title="Available Orchestrators",
- title_style="bold cyan",
- header_style="bold blue",
- row_styles=["", "dim"] # Alternating row styles
- )
-
- # Define columns with specific formatting
- table.add_column("Name", justify="left", style="green")
- table.add_column("ID", justify="left")
- table.add_column("Author", justify="left")
- table.add_column("Description", justify="left", max_width=50)
- table.add_column("Parameters", justify="left", max_width=30)
- table.add_column("Module URL", justify="left", max_width=30)
- table.add_column("Module Version", justify="center")
-
- # Add rows
- for orchestrator in orchestrators:
- table.add_row(
- orchestrator['name'],
- orchestrator['id'],
- orchestrator['author'],
- orchestrator['description'],
- str(orchestrator['parameters']),
- orchestrator['module_url'],
- orchestrator['module_version'],
- )
-
- # Print table and summary
- console.print()
- console.print(table)
- console.print(f"\n[green]Total orchestrators:[/green] {len(orchestrators)}")
-
-
-
-
-async def list_personas(naptha)
-
-
-
-
-Expand source code
-
-async def list_personas(naptha):
- personas = await naptha.hub.list_personas()
-
- if not personas:
- console = Console()
- console.print("[red]No personas found.[/red]")
- return
-
- console = Console()
- table = Table(
- box=box.ROUNDED,
- show_lines=True,
- title="Available Personas",
- title_style="bold cyan",
- header_style="bold blue",
- row_styles=["", "dim"] # Alternating row styles
- )
-
- # Define columns with specific formatting
- table.add_column("Name", justify="left", style="green")
- table.add_column("ID", justify="left")
- table.add_column("Author", justify="left")
- table.add_column("Description", justify="left", max_width=50)
- table.add_column("Parameters", justify="left", max_width=30)
- table.add_column("Module URL", justify="left", max_width=40)
- table.add_column("Module Version", justify="center")
- table.add_column("Module Entrypoint", justify="center")
-
- # Add rows
- for persona in personas:
- table.add_row(
- persona['name'],
- persona['id'],
- persona['author'],
- persona['description'],
- persona['parameters'],
- persona['module_url'],
- persona['module_version'],
- persona['module_entrypoint']
- )
-
- # Print table and summary
- console.print()
- console.print(table)
- console.print(f"\n[green]Total personas:[/green] {len(personas)}")
-
-
-
async def list_servers(naptha)
@@ -737,7 +347,7 @@ Functions
async def list_servers(naptha):
servers = await naptha.hub.list_servers()
-
+ print(servers)
if not servers:
console = Console()
console.print("[red]No servers found.[/red]")
@@ -754,18 +364,18 @@ Functions
)
# Add columns
- table.add_column("Name", justify="left", style="green")
table.add_column("ID", justify="left")
- table.add_column("Connection", justify="left")
table.add_column("Node ID", justify="left", max_width=30)
+ table.add_column("Communication Protocol", justify="left")
+ table.add_column("Port", justify="left")
# Add rows
for server in servers:
table.add_row(
- server['name'],
server['id'],
- server['connection_string'],
- server['node_id'][:30] + "..." # Truncate long node ID
+ server['node_id'],
+ server['communication_protocol'],
+ str(server['port'])
)
# Print table and summary
@@ -775,76 +385,6 @@ Functions
-
-async def list_tools(naptha)
-
-
-
-
-Expand source code
-
-async def list_tools(naptha):
- tools = await naptha.hub.list_tools()
-
- if not tools:
- console = Console()
- console.print("[red]No tools found.[/red]")
- return
-
- console = Console()
- table = Table(
- box=box.ROUNDED,
- show_lines=True,
- title="Available Tools",
- title_style="bold cyan",
- header_style="bold blue",
- row_styles=["", "dim"] # Alternating row styles
- )
-
- # Define columns with specific formatting
- table.add_column("Name", justify="left", style="green")
- table.add_column("ID", justify="left")
- table.add_column("Author", justify="left")
- table.add_column("Description", justify="left", max_width=50)
- table.add_column("Parameters", justify="left", max_width=30)
- table.add_column("Module URL", justify="left", max_width=30)
- table.add_column("Module Version", justify="center")
-
- # Add rows
- for tool in tools:
- table.add_row(
- tool['name'],
- tool['id'],
- tool['author'],
- tool['description'],
- str(tool['parameters']),
- tool['module_url'],
- tool['module_version'],
- )
-
- # Print table and summary
- console.print()
- console.print(table)
- console.print(f"\n[green]Total tools:[/green] {len(tools)}")
-
-
-
-
-def load_yaml_to_dict(file_path)
-
-
-
-
-Expand source code
-
-def load_yaml_to_dict(file_path):
- with open(file_path, 'r') as file:
- # Load the YAML content into a Python dictionary
- yaml_content = yaml.safe_load(file)
- return yaml_content
-
-
-
async def main()
@@ -870,55 +410,68 @@ Functions
# Agent parser
agents_parser = subparsers.add_parser("agents", help="List available agents.")
- agents_parser.add_argument('agent_name', nargs='?', help='Optional agent name')
- agents_parser.add_argument("-p", '--metadata', type=str, help='Metadata in "key=value" format')
+ agents_parser.add_argument('module_name', nargs='?', help='Optional agent name')
+ agents_parser.add_argument("-c", '--create', type=str, help='Metadata in "key=value" format')
+ agents_parser.add_argument("-u", '--update', type=str, help='Metadata in "key=value" format')
agents_parser.add_argument('-d', '--delete', action='store_true', help='Delete a agent')
# Orchestrator parser
orchestrators_parser = subparsers.add_parser("orchestrators", help="List available orchestrators.")
- orchestrators_parser.add_argument('orchestrator_name', nargs='?', help='Optional orchestrator name')
- orchestrators_parser.add_argument("-p", '--metadata', type=str, help='Metadata in "key=value" format')
+ orchestrators_parser.add_argument('module_name', nargs='?', help='Optional orchestrator name')
+ orchestrators_parser.add_argument("-c", '--create', type=str, help='Metadata in "key=value" format')
+ orchestrators_parser.add_argument("-u", '--update', type=str, help='Metadata in "key=value" format')
orchestrators_parser.add_argument('-d', '--delete', action='store_true', help='Delete an orchestrator')
# Environment parser
environments_parser = subparsers.add_parser("environments", help="List available environments.")
- environments_parser.add_argument('environment_name', nargs='?', help='Optional environment name')
- environments_parser.add_argument("-p", '--metadata', type=str, help='Metadata in "key=value" format')
+ environments_parser.add_argument('module_name', nargs='?', help='Optional environment name')
+ environments_parser.add_argument("-c", '--create', type=str, help='Metadata in "key=value" format')
+ environments_parser.add_argument("-u", '--update', type=str, help='Metadata in "key=value" format')
environments_parser.add_argument('-d', '--delete', action='store_true', help='Delete an environment')
# Persona parser
personas_parser = subparsers.add_parser("personas", help="List available personas.")
- personas_parser.add_argument('persona_name', nargs='?', help='Optional persona name')
- personas_parser.add_argument("-p", '--metadata', type=str, help='Metadata in "key=value" format')
+ personas_parser.add_argument('module_name', nargs='?', help='Optional persona name')
+ personas_parser.add_argument("-c", '--create', type=str, help='Metadata in "key=value" format')
+ personas_parser.add_argument("-u", '--update', type=str, help='Metadata in "key=value" format')
personas_parser.add_argument('-d', '--delete', action='store_true', help='Delete a persona')
# Tool parser
tools_parser = subparsers.add_parser("tools", help="List available tools.")
- tools_parser.add_argument('tool_name', nargs='?', help='Optional tool name')
- tools_parser.add_argument("-p", '--metadata', type=str, help='Metadata in "key=value" format')
+ tools_parser.add_argument('module_name', nargs='?', help='Optional tool name')
+ tools_parser.add_argument("-c", '--create', type=str, help='Metadata in "key=value" format')
+ tools_parser.add_argument("-u", '--update', type=str, help='Metadata in "key=value" format')
tools_parser.add_argument('-d', '--delete', action='store_true', help='Delete a tool')
# Memory parser
memories_parser = subparsers.add_parser("memories", help="List available memories.")
- memories_parser.add_argument('memory_name', nargs='?', help='Optional memory name')
- memories_parser.add_argument('-p', '--metadata', type=str, help='Metadata for memory registration in "key=value" format')
+ memories_parser.add_argument('module_name', nargs='?', help='Optional memory name')
+ memories_parser.add_argument("-c", '--create', type=str, help='Metadata in "key=value" format')
+ memories_parser.add_argument("-u", '--update', type=str, help='Metadata in "key=value" format')
memories_parser.add_argument('-d', '--delete', action='store_true', help='Delete a memory')
memories_parser.add_argument('-m', '--memory_nodes', type=str, help='Memory nodes', default=["http://localhost:7001"])
# Knowledge base parser
kbs_parser = subparsers.add_parser("kbs", help="List available knowledge bases.")
- kbs_parser.add_argument('kb_name', nargs='?', help='Optional knowledge base name')
- kbs_parser.add_argument('-p', '--metadata', type=str, help='Metadata for knowledge base registration in "key=value" format')
+ kbs_parser.add_argument('module_name', nargs='?', help='Optional knowledge base name')
+ kbs_parser.add_argument("-c", '--create', type=str, help='Metadata in "key=value" format')
+ kbs_parser.add_argument("-u", '--update', type=str, help='Metadata in "key=value" format')
kbs_parser.add_argument('-d', '--delete', action='store_true', help='Delete a knowledge base')
kbs_parser.add_argument('-k', '--kb_nodes', type=str, help='Knowledge base nodes')
# Create parser
create_parser = subparsers.add_parser("create", help="Execute create command.")
create_parser.add_argument("module", help="Select the module to create")
- create_parser.add_argument("-a", "--agent_modules", help="Agent modules to create")
- create_parser.add_argument("-n", "--agent_nodes", help="Agent nodes to take part in orchestrator runs.")
- create_parser.add_argument("-e", "--environment_modules", help="Environment module to create")
- create_parser.add_argument("-m", "--environment_nodes", help="Environment nodes to store data during agent runs.")
+ create_parser.add_argument("-am", "--agent_modules", help="Agent modules to create")
+ create_parser.add_argument("-an", "--agent_nodes", help="Agent nodes to take part in orchestrator runs.")
+ create_parser.add_argument("-tm", "--tool_modules", help="Tool modules to create")
+ create_parser.add_argument("-tn", "--tool_nodes", help="Tool nodes to take part in module runs.")
+ create_parser.add_argument("-km", "--kb_modules", help="Knowledge base modules to create")
+ create_parser.add_argument("-kn", "--kb_nodes", help="Knowledge base nodes to take part in module runs.")
+ create_parser.add_argument("-mm", "--memory_modules", help="Memory modules to create")
+ create_parser.add_argument("-mn", "--memory_nodes", help="Memory nodes to take part in module runs.")
+ create_parser.add_argument("-em", "--environment_modules", help="Environment module to create")
+ create_parser.add_argument("-en", "--environment_nodes", help="Environment nodes to store data during agent runs.")
# Run parser
run_parser = subparsers.add_parser("run", help="Execute run command.")
@@ -930,7 +483,6 @@ Functions
run_parser.add_argument('-k', '--kb_nodes', type=str, help='Knowledge base nodes to take part in module runs.')
run_parser.add_argument('-m', '--memory_nodes', type=str, help='Memory nodes')
run_parser.add_argument("-pm", "--persona_modules", help="Personas URLs to install before running the agent")
- run_parser.add_argument("-f", "--file", help="YAML file with module run parameters")
# Inference parser
inference_parser = subparsers.add_parser("inference", help="Run model inference.")
@@ -965,7 +517,7 @@ Functions
async with naptha as naptha:
args = parser.parse_args()
args = _parse_str_args(args)
- print(args)
+ args.public_key = naptha.hub.public_key
if args.command == "signup":
_, _ = await user_setup_flow(hub_url, public_key)
elif args.command in [
@@ -989,254 +541,114 @@ Functions
else:
await list_servers(naptha)
elif args.command == "agents":
- if not args.agent_name:
- await list_agents(naptha)
- elif args.delete and len(args.agent_name.split()) == 1:
- await naptha.hub.delete_agent(args.agent_name)
- elif len(args.agent_name.split()) == 1:
- if hasattr(args, 'metadata') and args.metadata is not None:
- params = shlex.split(args.metadata)
- parsed_params = {}
- for param in params:
- key, value = param.split('=')
- parsed_params[key] = value
-
- required_metadata = ['description', 'parameters', 'module_url']
- missing_metadata = [param for param in required_metadata if param not in parsed_params]
- if missing_metadata:
- print(f"Missing required metadata: {', '.join(missing_metadata)}")
- return
- agent_config = {
- "id": f"agent:{args.agent_name}",
- "name": args.agent_name,
- "description": parsed_params['description'],
- "parameters": parsed_params['parameters'],
- "author": f"user:{naptha.hub.public_key}",
- "module_url": parsed_params['module_url'],
- "module_type": parsed_params.get('module_type', 'agent'),
- "module_version": parsed_params.get('module_version', '0.1'),
- "module_entrypoint": parsed_params.get('module_entrypoint', 'run.py'),
- "execution_type": parsed_params.get('execution_type', 'package')
- }
- await create_agent(naptha, agent_config)
+ if not args.module_name:
+ await list_modules(naptha, module_type='agent')
+ elif args.update and len(args.module_name.split()) == 1:
+ module_config = _parse_metadata_args(args, "agent")
+ if module_config:
+ await naptha.hub.update_module("agent", module_config)
+ elif args.delete and len(args.module_name.split()) == 1:
+ await naptha.hub.delete_module("agent", args.module_name)
+ elif len(args.module_name.split()) == 1:
+ module_config = _parse_metadata_args(args, "agent")
+ if module_config:
+ await naptha.hub.create_module("agent", module_config)
else:
print("Invalid command.")
elif args.command == "orchestrators":
- if not args.orchestrator_name:
- await list_orchestrators(naptha)
- elif args.delete and len(args.orchestrator_name.split()) == 1:
- await naptha.hub.delete_orchestrator(args.orchestrator_name)
- elif len(args.orchestrator_name.split()) == 1:
- if hasattr(args, 'metadata') and args.metadata is not None:
- params = shlex.split(args.metadata)
- parsed_params = {}
- for param in params:
- key, value = param.split('=')
- parsed_params[key] = value
-
- required_metadata = ['description', 'parameters', 'module_url']
- if not all(param in parsed_params for param in required_metadata):
- print(f"Missing one or more of the following required metadata: {required_metadata}")
- return
-
- orchestrator_config = {
- "id": f"orchestrator:{args.orchestrator_name}",
- "name": args.orchestrator_name,
- "description": parsed_params['description'],
- "parameters": parsed_params['parameters'],
- "author": f"user:{naptha.hub.public_key}",
- "module_url": parsed_params['module_url'],
- "module_type": parsed_params.get('module_type', 'orchestrator'),
- "module_version": parsed_params.get('module_version', '0.1'),
- "module_entrypoint": parsed_params.get('module_entrypoint', 'run.py'),
- "execution_type": parsed_params.get('execution_type', 'package')
- }
- await create_orchestrator(naptha, orchestrator_config)
+ if not args.module_name:
+ await list_modules(naptha, module_type='orchestrator')
+ elif args.update and len(args.module_name.split()) == 1:
+ module_config = _parse_metadata_args(args, "orchestrator")
+ if module_config:
+ await naptha.hub.update_module("orchestrator", module_config)
+ elif args.delete and len(args.module_name.split()) == 1:
+ await naptha.hub.delete_module("orchestrator", args.module_name)
+ elif len(args.module_name.split()) == 1:
+ module_config = _parse_metadata_args(args, "orchestrator")
+ if module_config:
+ await naptha.hub.create_module("orchestrator", module_config)
else:
print("Invalid command.")
elif args.command == "environments":
- if not args.environment_name:
- await list_environments(naptha)
- elif args.delete and len(args.environment_name.split()) == 1:
- await naptha.hub.delete_environment(args.environment_name)
- elif len(args.environment_name.split()) == 1:
- if hasattr(args, 'metadata') and args.metadata is not None:
- params = shlex.split(args.metadata)
- parsed_params = {}
- for param in params:
- key, value = param.split('=')
- parsed_params[key] = value
-
- required_metadata = ['description', 'parameters', 'module_url']
- if not all(param in parsed_params for param in required_metadata):
- print(f"Missing one or more of the following required metadata: {required_metadata}")
- return
-
- environment_config = {
- "id": f"environment:{args.environment_name}",
- "name": args.environment_name,
- "description": parsed_params['description'],
- "parameters": parsed_params['parameters'],
- "author": f"user:{naptha.hub.public_key}",
- "module_url": parsed_params['module_url'],
- "module_type": parsed_params.get('module_type', 'environment'),
- "module_version": parsed_params.get('module_version', '0.1'),
- "module_entrypoint": parsed_params.get('module_entrypoint', 'run.py'),
- "execution_type": parsed_params.get('execution_type', 'package')
- }
- await create_environment(naptha, environment_config)
+ if not args.module_name:
+ await list_modules(naptha, module_type='environment')
+ elif args.update and len(args.module_name.split()) == 1:
+ module_config = _parse_metadata_args(args, "environment")
+ if module_config:
+ await naptha.hub.update_module("environment", module_config)
+ elif args.delete and len(args.module_name.split()) == 1:
+ await naptha.hub.delete_module("environment", args.module_name)
+ elif len(args.module_name.split()) == 1:
+ module_config = _parse_metadata_args(args, "environment")
+ if module_config:
+ await naptha.hub.create_module("environment", module_config)
else:
print("Invalid command.")
elif args.command == "tools":
- if not args.tool_name:
- await list_tools(naptha)
- elif args.delete and len(args.tool_name.split()) == 1:
- await naptha.hub.delete_tool(args.tool_name)
- elif len(args.tool_name.split()) == 1:
- if hasattr(args, 'metadata') and args.metadata is not None:
- params = shlex.split(args.metadata)
- parsed_params = {}
- for param in params:
- key, value = param.split('=')
- parsed_params[key] = value
-
- required_metadata = ['description', 'parameters', 'module_url']
- if not all(param in parsed_params for param in required_metadata):
- print(f"Missing one or more of the following required metadata: {required_metadata}")
- return
-
- tool_config = {
- "id": f"tool:{args.tool_name}",
- "name": args.tool_name,
- "description": parsed_params['description'],
- "parameters": parsed_params['parameters'],
- "author": f"user:{naptha.hub.public_key}",
- "module_url": parsed_params['module_url'],
- "module_type": parsed_params.get('module_type', 'tool'),
- "module_version": parsed_params.get('module_version', '0.1'),
- "module_entrypoint": parsed_params.get('module_entrypoint', 'run.py'),
- "execution_type": parsed_params.get('execution_type', 'package')
- }
- await naptha.hub.create_tool(tool_config)
+ if not args.module_name:
+ await list_modules(naptha, module_type='tool')
+ elif args.update and len(args.module_name.split()) == 1:
+ module_config = _parse_metadata_args(args, "tool")
+ if module_config:
+ await naptha.hub.update_module("tool", module_config)
+ elif args.delete and len(args.module_name.split()) == 1:
+ await naptha.hub.delete_module("tool", args.module_name)
+ elif len(args.module_name.split()) == 1:
+ module_config = _parse_metadata_args(args, "tool")
+ if module_config:
+ await naptha.hub.create_module("tool", module_config)
else:
print("Invalid command.")
elif args.command == "personas":
- if not args.persona_name:
- await list_personas(naptha)
- elif args.delete and len(args.persona_name.split()) == 1:
- await naptha.hub.delete_persona(args.persona_name)
- elif len(args.persona_name.split()) == 1:
- if hasattr(args, 'metadata') and args.metadata is not None:
- params = shlex.split(args.metadata)
- parsed_params = {}
- for param in params:
- key, value = param.split('=')
- parsed_params[key] = value
-
- required_metadata = ['description', 'parameters', 'module_url']
- if not all(param in parsed_params for param in required_metadata):
- print(f"Missing one or more of the following required metadata: {required_metadata}")
- return
-
- persona_config = {
- "id": f"persona:{args.persona_name}",
- "name": args.persona_name,
- "description": parsed_params['description'],
- "parameters": parsed_params['parameters'],
- "author": f"user:{naptha.hub.public_key}",
- "module_url": parsed_params['module_url'],
- "module_type": parsed_params.get('module_type', 'persona'),
- "module_version": parsed_params.get('module_version', '0.1'),
- "module_entrypoint": parsed_params.get('module_entrypoint', 'run.py'),
- "execution_type": parsed_params.get('execution_type', 'package')
- }
- await create_persona(naptha, persona_config)
+ if not args.module_name:
+ await list_modules(naptha, module_type='persona')
+ elif args.update and len(args.module_name.split()) == 1:
+ module_config = _parse_metadata_args(args, "persona")
+ if module_config:
+ await naptha.hub.update_module("persona", module_config)
+ elif args.delete and len(args.module_name.split()) == 1:
+ await naptha.hub.delete_module("persona", args.module_name)
+ elif len(args.module_name.split()) == 1:
+ module_config = _parse_metadata_args(args, "persona")
+ if module_config:
+ await naptha.hub.create_module("persona", module_config)
else:
print("Invalid command.")
elif args.command == "memories":
- if not args.memory_name:
- # List all memories
- await list_memories(naptha)
- elif args.list:
- # List content of specific memory
- await list_memory_content(naptha, args.memory_name)
- elif args.add:
- # Add data to memory
- if not args.content:
- console = Console()
- console.print("[red]Data is required for add command.[/red]")
- return
- await add_data_to_memory(naptha, args.memory_name, args.content, user_id=f"user:{naptha.hub.public_key}", memory_node_url=args.memory_node_urls[0])
- elif args.delete and len(args.memory_name.split()) == 1:
- await naptha.hub.delete_memory(args.memory_name)
- elif len(args.memory_name.split()) == 1:
- if hasattr(args, 'metadata') and args.metadata is not None:
- params = shlex.split(args.metadata)
- parsed_params = {}
- for param in params:
- key, value = param.split('=')
- parsed_params[key] = value
-
- required_metadata = ['description', 'parameters', 'module_url']
- if not all(param in parsed_params for param in required_metadata):
- print(f"Missing one or more of the following required metadata: {required_metadata}")
- return
-
- memory_config = {
- "id": f"memory:{args.memory_name}",
- "name": args.memory_name,
- "description": parsed_params['description'],
- "parameters": parsed_params['parameters'],
- "author": f"user:{naptha.hub.public_key}",
- "module_url": parsed_params['module_url'],
- "module_type": parsed_params.get('module_type', 'memory'),
- "module_version": parsed_params.get('module_version', '0.1'),
- "module_entrypoint": parsed_params.get('module_entrypoint', 'run.py'),
- "execution_type": parsed_params.get('execution_type', 'package')
- }
- await naptha.hub.create_memory(memory_config)
+ if not args.module_name:
+ await list_modules(naptha, module_type='memory')
+ elif args.update and len(args.module_name.split()) == 1:
+ module_config = _parse_metadata_args(args, "memory")
+ if module_config:
+ await naptha.hub.update_module("memory", module_config)
+ elif args.delete and len(args.module_name.split()) == 1:
+ await naptha.hub.delete_module("memory", args.module_name)
+ elif len(args.module_name.split()) == 1:
+ module_config = _parse_metadata_args(args, "memory")
+ if module_config:
+ await naptha.hub.create_module("memory", module_config)
else:
- # Show specific memory info
- await list_memories(naptha, args.memory_name)
+ await list_modules(naptha, module_type='memory')
elif args.command == "kbs":
- if not args.kb_name:
- # List all knowledge bases
- await list_kbs(naptha)
- elif args.delete and len(args.kb_name.split()) == 1:
- await naptha.hub.delete_kb(args.kb_name)
- elif len(args.kb_name.split()) == 1:
- if hasattr(args, 'metadata') and args.metadata is not None:
- params = shlex.split(args.metadata)
- parsed_params = {}
- for param in params:
- key, value = param.split('=')
- parsed_params[key] = value
-
- required_metadata = ['description', 'parameters', 'module_url']
- if not all(param in parsed_params for param in required_metadata):
- print(f"Missing one or more of the following required metadata: {required_metadata}")
- return
-
- kb_config = {
- "id": f"kb:{args.kb_name}",
- "name": args.kb_name,
- "description": parsed_params['description'],
- "parameters": parsed_params['parameters'],
- "author": f"user:{naptha.hub.public_key}",
- "module_url": parsed_params['module_url'],
- "module_type": parsed_params.get('module_type', 'kb'),
- "module_version": parsed_params.get('module_version', '0.1'),
- "module_entrypoint": parsed_params.get('module_entrypoint', 'run.py'),
- "execution_type": parsed_params.get('execution_type', 'package')
- }
- await naptha.hub.create_kb(kb_config)
+ if not args.module_name:
+ await list_modules(naptha, module_type='kb')
+ elif args.update and len(args.module_name.split()) == 1:
+ module_config = _parse_metadata_args(args, "kb")
+ if module_config:
+ await naptha.hub.update_module("kb", module_config)
+ elif args.delete and len(args.module_name.split()) == 1:
+ await naptha.hub.delete_module("kb", args.module_name)
+ elif len(args.module_name.split()) == 1:
+ module_config = _parse_metadata_args(args, "kb")
+ if module_config:
+ await naptha.hub.create_module("kb", module_config)
else:
- # Show specific knowledge base info
- await list_kbs(naptha, args.kb_name)
+ await list_modules(naptha, module_type='kb')
elif args.command == "create":
- await create(naptha, args.module, args.agent_modules, args.agent_nodes, args.environment_modules, args.environment_nodes)
+ await create(naptha, args.module, args.agent_modules, args.agent_nodes, args.tool_modules, args.tool_nodes, args.kb_modules, args.kb_nodes, args.memory_modules, args.memory_nodes, args.environment_modules, args.environment_nodes)
elif args.command == "run":
- await run(naptha, args.agent, args.parameters, args.agent_nodes, args.tool_nodes, args.environment_nodes, args.kb_nodes, args.memory_nodes, args.file, args.persona_modules)
+ await run(naptha, args.agent, args.parameters, args.agent_nodes, args.tool_nodes, args.environment_nodes, args.kb_nodes, args.memory_nodes, args.persona_modules)
elif args.command == "inference":
request = ChatCompletionRequest(
messages=[{"role": "user", "content": args.prompt}],
@@ -1262,7 +674,7 @@ Functions
-async def run(naptha,
module_name,
parameters=None,
agent_nodes=None,
tool_nodes=None,
environment_nodes=None,
kb_nodes=None,
memory_nodes=None,
yaml_file=None,
persona_modules=None)
+async def run(naptha,
module_name,
parameters=None,
agent_nodes=None,
tool_nodes=None,
environment_nodes=None,
kb_nodes=None,
memory_nodes=None,
persona_modules=None)
@@ -1278,14 +690,8 @@ Functions
environment_nodes=None,
kb_nodes=None,
memory_nodes=None,
- yaml_file=None,
persona_modules=None
):
- if yaml_file and parameters:
- raise ValueError("Cannot pass both yaml_file and parameters")
-
- if yaml_file:
- parameters = load_yaml_to_dict(yaml_file)
module_type = module_name.split(":")[0] if ":" in module_name else "agent" # Default to agent for backwards compatibility
@@ -1457,6 +863,7 @@ Functions
options=json.loads(options) if options else {}
)
result = await storage_provider.execute(request)
+ print(f"Create {storage_type} result: {result}")
return result
elif operation == "read":
@@ -1466,7 +873,7 @@ Functions
options=json.loads(options) if options else {}
)
result = await storage_provider.execute(request)
-
+ print(f"Read {storage_type} result: {result}")
# Handle downloaded file
if isinstance(result.data, bytes):
output_dir = "./downloads"
@@ -1537,7 +944,7 @@ Functions
)
result = await storage_provider.execute(request)
- print(result)
+ print(f"{operation} {storage_type} result: {result}")
return result
except Exception as e:
@@ -1563,24 +970,11 @@ Functions
Functions
-add_data_to_memory
cli
create
-create_agent
-create_environment
-create_orchestrator
-create_persona
-list_agents
-list_environments
-list_kbs
-list_memories
-list_memory_content
+list_modules
list_nodes
-list_orchestrators
-list_personas
list_servers
-list_tools
-load_yaml_to_dict
main
run
storage_interaction
@@ -1589,5 +983,8 @@ Functions
+