Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 45 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,59 @@
# Changelog
All notable changes to this project's latest version.

## [0.1.23] - 2025-09-25
## [0.1.24] - 2025-11-06

### Bug Fixes

- Missing files form last version mess added
- Fixed examples on run cmd
- Init command fixing wip

### Documentation

- Sdk folder removed
- Added explanation folder
- Removed example folder
- Removed frameworks folder
- Removed get started folder
- Added how to folder
- Added resources folder
- Added new snippet
- Added tutorials
- Added reference
- Added new api reference
- Added cli overview
- Added new docs.json

### Features

- Runagent cloud support - partial implementation
- Release scripts updated
- Removed deploy-local command
- Deploy-local fully removed
- Updated same upload_agent function names
- Fingerprint feature added back to db
- Added git validation & efficient connectivity check
- Agent run cli working for remote+local
- Run-stream working locally, proper json format.
- Improved langgarph default template
- URL prefix working > rest+socket
- Debug option fixed
- Auth test fixed with updated endpoint
- Runagent deploy working
- Moved user_data json ro sqlite db approach
- Init coomand interactive
- Fixed & improved template downloading
- Split cli cmds into seperate files
- Express login [device-browser code flow] added
- Persistent agent id working
- Cleaned emojis form output
- Added whoami command
- Standardized local agent execution logging
- Auto rewload suported in local server
- Removed replacing agent id
- Muted db replace agent option
- Improved debug log

### Miscellaneous Tasks

- Bump version to v0.1.23
- Bump version to v0.1.24

<!-- generated by git-cliff -->
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "hatchling.build"

[project]
name = "runagent"
version = "0.1.24"
version = "0.1.25"
description = "A command-line tool and SDK for deploying, managing, and interacting with AI agents"
readme = "README.md"
requires-python = ">=3.9"
Expand Down Expand Up @@ -103,7 +103,7 @@ line_length = 88
skip = ["docs"]

[tool.mypy]
python_version = "0.1.24"
python_version = "0.1.25"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
Expand Down Expand Up @@ -159,7 +159,7 @@ fail_under = 80

[tool.ruff]
line-length = 88
target-version = "0.1.24"
target-version = "0.1.25"
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
Expand Down
2 changes: 1 addition & 1 deletion runagent-go/runagent/version.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package runagent

// Version represents the current version of the RunAgent Go SDK
const Version = "0.1.24"
const Version = "0.1.25"
2 changes: 1 addition & 1 deletion runagent-rust/runagent/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "runagent"
version = "0.1.24"
version = "0.1.25"
edition = "2021"
description = "RunAgent SDK for Rust - Client SDK for interacting with deployed AI agents"
license = "MIT"
Expand Down
4 changes: 2 additions & 2 deletions runagent-ts/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion runagent-ts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "runagent",
"version": "0.1.24",
"version": "0.1.25",
"type": "module",
"files": [
"dist"
Expand Down
2 changes: 1 addition & 1 deletion runagent/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
built with frameworks like LangGraph, LangChain, and LlamaIndex.
"""

__version__ = "0.1.24"
__version__ = "0.1.25"

from .client import RunAgentClient

Expand Down
2 changes: 1 addition & 1 deletion runagent/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.24"
__version__ = "0.1.25"
2 changes: 1 addition & 1 deletion runagent/cli/commands/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def run(ctx, agent_id, host, port, input_file, local, tag, timeout):
for key, value in extra_params.items():
# Try to parse value as JSON for complex types
# TODO: Will add type inference later
console.print(f" --{key} = [green]{value}[/green]")
console.print(f" {key} = [green]{value}[/green]")
input_params = extra_params

else:
Expand Down
2 changes: 1 addition & 1 deletion runagent/cli/commands/run_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def run_stream(ctx, agent_id, host, port, input_file, local, tag, timeout):
elif extra_params:
console.print(" Extra parameters:")
for key, value in extra_params.items():
console.print(f" --{key} = {value}")
console.print(f" {key} = [green]{value}[/green]")
input_params = extra_params

else:
Expand Down
2 changes: 1 addition & 1 deletion runagent/cli/commands/teardown.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def format_error_message(error_info):


@click.command()
@click.option("--yes", is_flag=True, help="Skip confirmation")
@click.option("--yes", "-y", is_flag=True, help="Skip confirmation")
def teardown(yes):
"""Complete teardown - Remove RunAgent configuration AND database"""
try:
Expand Down
17 changes: 15 additions & 2 deletions runagent/client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,9 @@ def run_stream(self, *input_args, **input_kwargs):
self.agent_id, self.entrypoint_tag, input_args=input_args, input_kwargs=input_kwargs
)
except Exception as e:
# Handle streaming errors with proper formatting
raise Exception(f"Streaming failed: {str(e)}")
# Error message is already cleaned by socket_client._clean_error_message
# Just re-raise with the cleaned message
raise Exception(str(e))

def _run_stream(self, *input_args, **input_kwargs):
"""Legacy method - use run_stream instead"""
Expand All @@ -118,6 +119,18 @@ def _run_stream(self, *input_args, **input_kwargs):
def _build_suggestion(self, code: str, message: str) -> str | None:
message_lower = (message or "").lower()

# Check for permission/access errors first (403, permission denied, etc.)
if (code == "PERMISSION_ERROR" or code == "AUTHENTICATION_ERROR" or
"403" in message or "permission" in message_lower or
"access denied" in message_lower or "do not have permission" in message_lower):
dashboard_hint = f"https://app.run-agent.ai/dashboard/agents/{self.agent_id}"
return (
"This agent doesn't belong to your account or your API key doesn't have permission to access it. "
f"Verify the agent ID is correct and that you have access to it. "
f"You can check your agents in the dashboard: {dashboard_hint}. "
f"If this is someone else's agent, you'll need to use their API key or have them share access."
)

if "not found" in message_lower:
tag_match = re.search(r"['\"](?P<tag>[A-Za-z0-9_\-]+)['\"]", message or "") if "entrypoint" in message_lower else None
dashboard_hint = f"https://app.run-agent.ai/dashboard/agents/{self.agent_id}"
Expand Down
75 changes: 73 additions & 2 deletions runagent/sdk/rest_client.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import base64
import json
import os
import re
import tempfile
import time
import zipfile
Expand Down Expand Up @@ -1446,6 +1447,29 @@ def _get_local_deployment_info(self, agent_id: str) -> Optional[Dict]:
return None


def _clean_error_message(self, error_message: str) -> str:
"""Clean up error messages by removing redundant prefixes"""
if not error_message:
return "Unknown error"

# Remove common redundant prefixes
prefixes_to_remove = [
"Server error: ",
"Database error: ",
"HTTP Error: ",
"Agent execution failed: ",
]

cleaned = error_message
for prefix in prefixes_to_remove:
if cleaned.startswith(prefix):
cleaned = cleaned[len(prefix):].strip()

# Remove status codes that appear at the start (e.g., "403: ")
cleaned = re.sub(r'^\d{3}:\s*', '', cleaned)

return cleaned.strip() if cleaned.strip() else error_message

def run_agent(
self,
agent_id: str,
Expand Down Expand Up @@ -1491,14 +1515,61 @@ def run_agent(
pass
return result

except (ClientError, ServerError, ConnectionError) as e:
except AuthenticationError as e:
# Handle authentication/permission errors (401, 403)
error_message = self._clean_error_message(e.message)
error_code = "AUTHENTICATION_ERROR"
if "403" in error_message or "permission" in error_message.lower() or "access denied" in error_message.lower():
error_code = "PERMISSION_ERROR"
# Create a clean, single error message for permission errors
error_message = "You do not have permission to access this agent"
return {
"success": False,
"data": None,
"message": None,
"error": {
"code": error_code,
"message": error_message,
"details": None,
"field": None
},
"timestamp": None,
"request_id": None
}
except ServerError as e:
# Check if server error message contains permission/403 info (even if status is 500)
error_message = e.message
error_code = "SERVER_ERROR"
if ("403" in error_message or "permission" in error_message.lower() or
"access denied" in error_message.lower() or "do not have permission" in error_message.lower()):
error_code = "PERMISSION_ERROR"
# Create a clean, single error message for permission errors
error_message = "You do not have permission to access this agent"
else:
# Clean up server error messages to remove redundant prefixes
error_message = self._clean_error_message(error_message)
return {
"success": False,
"data": None,
"message": None,
"error": {
"code": error_code,
"message": error_message,
"details": None,
"field": None
},
"timestamp": None,
"request_id": None
}
except (ClientError, ConnectionError) as e:
error_message = self._clean_error_message(e.message)
return {
"success": False,
"data": None,
"message": None,
"error": {
"code": "CONNECTION_ERROR",
"message": f"Agent execution failed: {e.message}",
"message": error_message,
"details": None,
"field": None
},
Expand Down
Loading
Loading