activeagent 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +10 -4
- data/lib/active_agent/base.rb +3 -2
- data/lib/active_agent/concerns/provider.rb +6 -2
- data/lib/active_agent/concerns/rescue.rb +39 -0
- data/lib/active_agent/concerns/streaming.rb +2 -1
- data/lib/active_agent/dashboard/app/controllers/active_agent/dashboard/api/traces_controller.rb +117 -0
- data/lib/active_agent/dashboard/app/controllers/active_agent/dashboard/application_controller.rb +54 -0
- data/lib/active_agent/dashboard/app/controllers/active_agent/dashboard/dashboard_controller.rb +126 -0
- data/lib/active_agent/dashboard/app/controllers/active_agent/dashboard/traces_controller.rb +103 -0
- data/lib/active_agent/dashboard/app/jobs/active_agent/dashboard/agent_execution_job.rb +56 -0
- data/lib/active_agent/dashboard/app/jobs/active_agent/dashboard/application_job.rb +14 -0
- data/lib/active_agent/dashboard/app/jobs/active_agent/dashboard/sandbox_cleanup_job.rb +49 -0
- data/lib/active_agent/dashboard/app/jobs/active_agent/dashboard/sandbox_provision_job.rb +65 -0
- data/lib/active_agent/dashboard/app/jobs/active_agent/process_telemetry_traces_job.rb +77 -0
- data/lib/active_agent/dashboard/app/models/active_agent/dashboard/agent.rb +256 -0
- data/lib/active_agent/dashboard/app/models/active_agent/dashboard/agent_run.rb +113 -0
- data/lib/active_agent/dashboard/app/models/active_agent/dashboard/agent_template.rb +208 -0
- data/lib/active_agent/dashboard/app/models/active_agent/dashboard/agent_version.rb +60 -0
- data/lib/active_agent/dashboard/app/models/active_agent/dashboard/application_record.rb +46 -0
- data/lib/active_agent/dashboard/app/models/active_agent/dashboard/recording_action.rb +125 -0
- data/lib/active_agent/dashboard/app/models/active_agent/dashboard/recording_snapshot.rb +83 -0
- data/lib/active_agent/dashboard/app/models/active_agent/dashboard/sandbox_run.rb +52 -0
- data/lib/active_agent/dashboard/app/models/active_agent/dashboard/sandbox_session.rb +169 -0
- data/lib/active_agent/dashboard/app/models/active_agent/dashboard/session_recording.rb +193 -0
- data/lib/active_agent/dashboard/app/models/active_agent/telemetry_trace.rb +198 -0
- data/lib/active_agent/dashboard/app/views/active_agent/dashboard/traces/_trace_detail.html.erb +105 -0
- data/lib/active_agent/dashboard/app/views/active_agent/dashboard/traces/index.html.erb +135 -0
- data/lib/active_agent/dashboard/app/views/active_agent/dashboard/traces/metrics.html.erb +143 -0
- data/lib/active_agent/dashboard/app/views/active_agent/dashboard/traces/show.html.erb +36 -0
- data/lib/active_agent/dashboard/app/views/layouts/active_agent/dashboard/application.html.erb +94 -0
- data/lib/active_agent/dashboard/config/routes.rb +78 -0
- data/lib/active_agent/dashboard/engine.rb +39 -0
- data/lib/active_agent/dashboard.rb +151 -0
- data/lib/active_agent/providers/_base_provider.rb +2 -1
- data/lib/active_agent/providers/anthropic_provider.rb +14 -4
- data/lib/active_agent/providers/azure/_types.rb +5 -0
- data/lib/active_agent/providers/azure/options.rb +111 -0
- data/lib/active_agent/providers/azure_open_ai_provider.rb +2 -0
- data/lib/active_agent/providers/azure_openai_provider.rb +2 -0
- data/lib/active_agent/providers/azure_provider.rb +133 -0
- data/lib/active_agent/providers/azureopenai_provider.rb +2 -0
- data/lib/active_agent/providers/bedrock/_types.rb +8 -0
- data/lib/active_agent/providers/bedrock/bearer_client.rb +109 -0
- data/lib/active_agent/providers/bedrock/options.rb +77 -0
- data/lib/active_agent/providers/bedrock_provider.rb +84 -0
- data/lib/active_agent/providers/common/messages/_types.rb +6 -2
- data/lib/active_agent/providers/concerns/exception_handler.rb +1 -0
- data/lib/active_agent/providers/gemini/_types.rb +19 -0
- data/lib/active_agent/providers/gemini/options.rb +41 -0
- data/lib/active_agent/providers/gemini_provider.rb +94 -0
- data/lib/active_agent/providers/open_ai/chat/transforms.rb +37 -1
- data/lib/active_agent/providers/open_ai/chat_provider.rb +2 -0
- data/lib/active_agent/providers/ruby_llm/_types.rb +77 -0
- data/lib/active_agent/providers/ruby_llm/embedding_request.rb +16 -0
- data/lib/active_agent/providers/ruby_llm/messages/_types.rb +109 -0
- data/lib/active_agent/providers/ruby_llm/messages/assistant.rb +27 -0
- data/lib/active_agent/providers/ruby_llm/messages/base.rb +48 -0
- data/lib/active_agent/providers/ruby_llm/messages/system.rb +18 -0
- data/lib/active_agent/providers/ruby_llm/messages/tool.rb +24 -0
- data/lib/active_agent/providers/ruby_llm/messages/user.rb +18 -0
- data/lib/active_agent/providers/ruby_llm/options.rb +28 -0
- data/lib/active_agent/providers/ruby_llm/request.rb +30 -0
- data/lib/active_agent/providers/ruby_llm/tool_proxy.rb +45 -0
- data/lib/active_agent/providers/ruby_llm_provider.rb +407 -0
- data/lib/active_agent/railtie.rb +32 -1
- data/lib/active_agent/telemetry/configuration.rb +213 -0
- data/lib/active_agent/telemetry/instrumentation.rb +155 -0
- data/lib/active_agent/telemetry/reporter.rb +176 -0
- data/lib/active_agent/telemetry/span.rb +267 -0
- data/lib/active_agent/telemetry/tracer.rb +184 -0
- data/lib/active_agent/telemetry.rb +162 -0
- data/lib/active_agent/version.rb +1 -1
- data/lib/active_agent.rb +2 -0
- data/lib/generators/active_agent/dashboard/install/install_generator.rb +96 -0
- data/lib/generators/active_agent/dashboard/install/templates/initializer.rb +89 -0
- data/lib/generators/active_agent/dashboard/install/templates/migrations/create_active_agent_agent_runs.rb +42 -0
- data/lib/generators/active_agent/dashboard/install/templates/migrations/create_active_agent_agent_templates.rb +38 -0
- data/lib/generators/active_agent/dashboard/install/templates/migrations/create_active_agent_agent_versions.rb +22 -0
- data/lib/generators/active_agent/dashboard/install/templates/migrations/create_active_agent_agents.rb +53 -0
- data/lib/generators/active_agent/dashboard/install/templates/migrations/create_active_agent_sandbox_runs.rb +28 -0
- data/lib/generators/active_agent/dashboard/install/templates/migrations/create_active_agent_sandbox_sessions.rb +43 -0
- data/lib/generators/active_agent/dashboard/install/templates/migrations/create_active_agent_session_recordings.rb +44 -0
- data/lib/generators/active_agent/dashboard/install/templates/migrations/create_active_agent_telemetry_traces.rb +56 -0
- data/lib/generators/active_agent/dashboard/install_generator.rb +64 -0
- data/lib/generators/active_agent/dashboard/templates/active_agent_dashboard.rb.erb +30 -0
- data/lib/generators/active_agent/dashboard/templates/create_active_agent_telemetry_traces.rb.erb +30 -0
- metadata +99 -13
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
class CreateActiveAgentAgents < ActiveRecord::Migration<%= migration_version %>
|
|
4
|
+
def change
|
|
5
|
+
create_table :active_agent_agents do |t|
|
|
6
|
+
t.string :name, null: false
|
|
7
|
+
t.text :description
|
|
8
|
+
t.string :slug, null: false
|
|
9
|
+
|
|
10
|
+
# Agent class configuration
|
|
11
|
+
t.string :agent_class_name
|
|
12
|
+
t.string :provider, default: "openai"
|
|
13
|
+
t.string :model, default: "gpt-4o-mini"
|
|
14
|
+
|
|
15
|
+
# Instructions and system prompt
|
|
16
|
+
t.text :instructions
|
|
17
|
+
|
|
18
|
+
# Avatar/appearance configuration
|
|
19
|
+
t.string :preset_type
|
|
20
|
+
t.jsonb :appearance, default: {}
|
|
21
|
+
|
|
22
|
+
# Capabilities
|
|
23
|
+
t.jsonb :instruction_sets, default: []
|
|
24
|
+
t.jsonb :tools, default: []
|
|
25
|
+
t.jsonb :mcp_servers, default: []
|
|
26
|
+
|
|
27
|
+
# Model configuration
|
|
28
|
+
t.jsonb :model_config, default: {}
|
|
29
|
+
|
|
30
|
+
# Response format
|
|
31
|
+
t.jsonb :response_format, default: {}
|
|
32
|
+
|
|
33
|
+
# Status
|
|
34
|
+
t.integer :status, default: 0, null: false
|
|
35
|
+
|
|
36
|
+
# Owner associations (optional)
|
|
37
|
+
t.references :user, foreign_key: true, null: true
|
|
38
|
+
<% if multi_tenant? -%>
|
|
39
|
+
t.references :account, foreign_key: true, null: true
|
|
40
|
+
<% end -%>
|
|
41
|
+
|
|
42
|
+
t.timestamps
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
<% if multi_tenant? -%>
|
|
46
|
+
add_index :active_agent_agents, [:account_id, :slug], unique: true
|
|
47
|
+
<% else -%>
|
|
48
|
+
add_index :active_agent_agents, [:user_id, :slug], unique: true
|
|
49
|
+
<% end -%>
|
|
50
|
+
add_index :active_agent_agents, :status
|
|
51
|
+
add_index :active_agent_agents, :provider
|
|
52
|
+
end
|
|
53
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
class CreateActiveAgentSandboxRuns < ActiveRecord::Migration<%= migration_version %>
|
|
4
|
+
def change
|
|
5
|
+
create_table :active_agent_sandbox_runs do |t|
|
|
6
|
+
t.references :sandbox_session, foreign_key: { to_table: :active_agent_sandbox_sessions }, null: true
|
|
7
|
+
|
|
8
|
+
t.text :task, null: false
|
|
9
|
+
t.integer :status, default: 0, null: false
|
|
10
|
+
|
|
11
|
+
# Execution details
|
|
12
|
+
t.text :result
|
|
13
|
+
t.text :error
|
|
14
|
+
t.integer :duration_ms
|
|
15
|
+
t.integer :tokens_used
|
|
16
|
+
t.datetime :started_at
|
|
17
|
+
t.datetime :completed_at
|
|
18
|
+
|
|
19
|
+
# Screenshots
|
|
20
|
+
t.jsonb :screenshots, default: []
|
|
21
|
+
|
|
22
|
+
t.timestamps
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
add_index :active_agent_sandbox_runs, :status
|
|
26
|
+
add_index :active_agent_sandbox_runs, :created_at
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
class CreateActiveAgentSandboxSessions < ActiveRecord::Migration<%= migration_version %>
|
|
4
|
+
def change
|
|
5
|
+
create_table :active_agent_sandbox_sessions do |t|
|
|
6
|
+
t.string :session_id, null: false
|
|
7
|
+
t.references :user, foreign_key: true, null: true
|
|
8
|
+
<% if multi_tenant? -%>
|
|
9
|
+
t.references :account, foreign_key: true, null: true
|
|
10
|
+
<% end -%>
|
|
11
|
+
t.references :agent_template, foreign_key: { to_table: :active_agent_agent_templates }, null: true
|
|
12
|
+
|
|
13
|
+
# Session metadata
|
|
14
|
+
t.string :sandbox_type, default: "playwright_mcp"
|
|
15
|
+
t.integer :status, default: 0
|
|
16
|
+
t.string :cloud_run_job_id
|
|
17
|
+
t.string :cloud_run_url
|
|
18
|
+
|
|
19
|
+
# Execution tracking
|
|
20
|
+
t.integer :runs_count, default: 0
|
|
21
|
+
t.integer :max_runs, default: 10
|
|
22
|
+
t.integer :timeout_seconds, default: 300
|
|
23
|
+
t.datetime :expires_at
|
|
24
|
+
t.datetime :last_activity_at
|
|
25
|
+
|
|
26
|
+
# Resource usage
|
|
27
|
+
t.integer :total_tokens, default: 0
|
|
28
|
+
t.integer :total_duration_ms, default: 0
|
|
29
|
+
|
|
30
|
+
# Results
|
|
31
|
+
t.jsonb :runs, default: []
|
|
32
|
+
t.text :error_message
|
|
33
|
+
|
|
34
|
+
t.timestamps
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
add_index :active_agent_sandbox_sessions, :session_id, unique: true
|
|
38
|
+
add_index :active_agent_sandbox_sessions, :status
|
|
39
|
+
add_index :active_agent_sandbox_sessions, :sandbox_type
|
|
40
|
+
add_index :active_agent_sandbox_sessions, :expires_at
|
|
41
|
+
add_index :active_agent_sandbox_sessions, :cloud_run_job_id
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
class CreateActiveAgentSessionRecordings < ActiveRecord::Migration<%= migration_version %>
|
|
4
|
+
def change
|
|
5
|
+
create_table :active_agent_session_recordings do |t|
|
|
6
|
+
t.references :agent_run, null: true, foreign_key: { to_table: :active_agent_agent_runs }
|
|
7
|
+
t.references :sandbox_session, null: true, foreign_key: { to_table: :active_agent_sandbox_sessions }
|
|
8
|
+
t.string :name
|
|
9
|
+
t.integer :status, default: 0, null: false
|
|
10
|
+
t.integer :duration_ms
|
|
11
|
+
t.integer :action_count, default: 0
|
|
12
|
+
t.jsonb :metadata, default: {}
|
|
13
|
+
t.timestamps
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
create_table :active_agent_recording_actions do |t|
|
|
17
|
+
t.references :session_recording, null: false, foreign_key: { to_table: :active_agent_session_recordings }
|
|
18
|
+
t.string :action_type, null: false
|
|
19
|
+
t.integer :sequence, null: false
|
|
20
|
+
t.integer :timestamp_ms, null: false
|
|
21
|
+
t.string :selector
|
|
22
|
+
t.text :value
|
|
23
|
+
t.string :screenshot_key
|
|
24
|
+
t.string :dom_snapshot_key
|
|
25
|
+
t.jsonb :metadata, default: {}
|
|
26
|
+
t.timestamps
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
add_index :active_agent_recording_actions, [:session_recording_id, :sequence], unique: true, name: "idx_recording_actions_on_recording_and_sequence"
|
|
30
|
+
|
|
31
|
+
create_table :active_agent_recording_snapshots do |t|
|
|
32
|
+
t.references :session_recording, null: false, foreign_key: { to_table: :active_agent_session_recordings }
|
|
33
|
+
t.references :recording_action, null: true, foreign_key: { to_table: :active_agent_recording_actions }
|
|
34
|
+
t.string :storage_key, null: false
|
|
35
|
+
t.string :snapshot_type, null: false
|
|
36
|
+
t.integer :width
|
|
37
|
+
t.integer :height
|
|
38
|
+
t.integer :file_size_bytes
|
|
39
|
+
t.timestamps
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
add_index :active_agent_recording_snapshots, :storage_key, unique: true
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
class CreateActiveAgentTelemetryTraces < ActiveRecord::Migration<%= migration_version %>
|
|
4
|
+
def change
|
|
5
|
+
create_table :active_agent_telemetry_traces do |t|
|
|
6
|
+
<% if multi_tenant? -%>
|
|
7
|
+
t.references :account, foreign_key: true, null: true
|
|
8
|
+
<% end -%>
|
|
9
|
+
|
|
10
|
+
# Trace identification
|
|
11
|
+
t.string :trace_id, null: false
|
|
12
|
+
t.string :service_name
|
|
13
|
+
t.string :environment
|
|
14
|
+
|
|
15
|
+
# Timing
|
|
16
|
+
t.datetime :timestamp, null: false
|
|
17
|
+
|
|
18
|
+
# Span data (JSON array of spans)
|
|
19
|
+
t.jsonb :spans, default: []
|
|
20
|
+
|
|
21
|
+
# Resource attributes
|
|
22
|
+
t.jsonb :resource_attributes, default: {}
|
|
23
|
+
|
|
24
|
+
# SDK info
|
|
25
|
+
t.jsonb :sdk_info, default: {}
|
|
26
|
+
|
|
27
|
+
# Aggregated metrics (for quick queries)
|
|
28
|
+
t.integer :total_duration_ms
|
|
29
|
+
t.integer :total_input_tokens, default: 0
|
|
30
|
+
t.integer :total_output_tokens, default: 0
|
|
31
|
+
t.integer :total_thinking_tokens, default: 0
|
|
32
|
+
|
|
33
|
+
# Status
|
|
34
|
+
t.string :status, default: "UNSET"
|
|
35
|
+
|
|
36
|
+
# Agent info (denormalized for queries)
|
|
37
|
+
t.string :agent_class
|
|
38
|
+
t.string :agent_action
|
|
39
|
+
|
|
40
|
+
# Error info
|
|
41
|
+
t.text :error_message
|
|
42
|
+
|
|
43
|
+
t.timestamps
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
add_index :active_agent_telemetry_traces, :trace_id, unique: true
|
|
47
|
+
add_index :active_agent_telemetry_traces, :timestamp
|
|
48
|
+
add_index :active_agent_telemetry_traces, :service_name
|
|
49
|
+
add_index :active_agent_telemetry_traces, :environment
|
|
50
|
+
add_index :active_agent_telemetry_traces, :agent_class
|
|
51
|
+
add_index :active_agent_telemetry_traces, :status
|
|
52
|
+
<% if multi_tenant? -%>
|
|
53
|
+
add_index :active_agent_telemetry_traces, [:account_id, :timestamp]
|
|
54
|
+
<% end -%>
|
|
55
|
+
end
|
|
56
|
+
end
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "rails/generators"
|
|
4
|
+
require "rails/generators/active_record"
|
|
5
|
+
|
|
6
|
+
module ActiveAgent
|
|
7
|
+
module Dashboard
|
|
8
|
+
# Generator for installing the ActiveAgent Dashboard.
|
|
9
|
+
#
|
|
10
|
+
# @example Run the generator
|
|
11
|
+
# rails generate active_agent:dashboard:install
|
|
12
|
+
#
|
|
13
|
+
# This will:
|
|
14
|
+
# - Create the telemetry_traces table migration
|
|
15
|
+
# - Add mount directive to routes
|
|
16
|
+
# - Create initializer for dashboard configuration
|
|
17
|
+
#
|
|
18
|
+
class InstallGenerator < Rails::Generators::Base
|
|
19
|
+
include ActiveRecord::Generators::Migration
|
|
20
|
+
|
|
21
|
+
source_root File.expand_path("templates", __dir__)
|
|
22
|
+
|
|
23
|
+
desc "Installs the ActiveAgent Dashboard with telemetry storage"
|
|
24
|
+
|
|
25
|
+
def copy_migrations
|
|
26
|
+
migration_template(
|
|
27
|
+
"create_active_agent_telemetry_traces.rb.erb",
|
|
28
|
+
"db/migrate/create_active_agent_telemetry_traces.rb"
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def add_route
|
|
33
|
+
route 'mount ActiveAgent::Dashboard::Engine => "/active_agent"'
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def create_initializer
|
|
37
|
+
template(
|
|
38
|
+
"active_agent_dashboard.rb.erb",
|
|
39
|
+
"config/initializers/active_agent_dashboard.rb"
|
|
40
|
+
)
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def show_readme
|
|
44
|
+
say "\n"
|
|
45
|
+
say "ActiveAgent Dashboard installed successfully!", :green
|
|
46
|
+
say "\n"
|
|
47
|
+
say "Next steps:"
|
|
48
|
+
say " 1. Run migrations: rails db:migrate"
|
|
49
|
+
say " 2. Configure telemetry in config/active_agent.yml:"
|
|
50
|
+
say " telemetry:"
|
|
51
|
+
say " enabled: true"
|
|
52
|
+
say " local_storage: true"
|
|
53
|
+
say " 3. Visit /active_agent to view the dashboard"
|
|
54
|
+
say "\n"
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
private
|
|
58
|
+
|
|
59
|
+
def migration_version
|
|
60
|
+
"[#{ActiveRecord::Migration.current_version}]"
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# ActiveAgent Dashboard Configuration
|
|
4
|
+
#
|
|
5
|
+
# This file configures the ActiveAgent telemetry dashboard.
|
|
6
|
+
# The dashboard is mounted at /active_agent by default.
|
|
7
|
+
|
|
8
|
+
ActiveAgent::Dashboard.configure do |config|
|
|
9
|
+
# Authentication method - provide a lambda that receives the controller
|
|
10
|
+
# and performs authentication. Return false or raise to deny access.
|
|
11
|
+
#
|
|
12
|
+
# Examples:
|
|
13
|
+
#
|
|
14
|
+
# Basic auth:
|
|
15
|
+
# config.authentication_method = ->(controller) {
|
|
16
|
+
# controller.authenticate_or_request_with_http_basic do |username, password|
|
|
17
|
+
# username == "admin" && password == Rails.application.credentials.dashboard_password
|
|
18
|
+
# end
|
|
19
|
+
# }
|
|
20
|
+
#
|
|
21
|
+
# Devise:
|
|
22
|
+
# config.authentication_method = ->(controller) {
|
|
23
|
+
# controller.authenticate_admin!
|
|
24
|
+
# }
|
|
25
|
+
#
|
|
26
|
+
# No authentication (development only!):
|
|
27
|
+
# config.authentication_method = nil
|
|
28
|
+
#
|
|
29
|
+
config.authentication_method = nil
|
|
30
|
+
end
|
data/lib/generators/active_agent/dashboard/templates/create_active_agent_telemetry_traces.rb.erb
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
class CreateActiveAgentTelemetryTraces < ActiveRecord::Migration<%= migration_version %>
|
|
4
|
+
def change
|
|
5
|
+
create_table :active_agent_telemetry_traces do |t|
|
|
6
|
+
t.string :trace_id, null: false, index: true
|
|
7
|
+
t.string :service_name
|
|
8
|
+
t.string :environment
|
|
9
|
+
t.datetime :timestamp, index: true
|
|
10
|
+
t.jsonb :spans, default: []
|
|
11
|
+
t.jsonb :resource_attributes, default: {}
|
|
12
|
+
t.jsonb :sdk_info, default: {}
|
|
13
|
+
t.decimal :total_duration_ms, precision: 12, scale: 3
|
|
14
|
+
t.integer :total_input_tokens, default: 0
|
|
15
|
+
t.integer :total_output_tokens, default: 0
|
|
16
|
+
t.integer :total_thinking_tokens, default: 0
|
|
17
|
+
t.string :status
|
|
18
|
+
t.string :agent_class, index: true
|
|
19
|
+
t.string :agent_action
|
|
20
|
+
t.text :error_message
|
|
21
|
+
|
|
22
|
+
t.timestamps
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
add_index :active_agent_telemetry_traces, :status
|
|
26
|
+
add_index :active_agent_telemetry_traces, [:agent_class, :agent_action]
|
|
27
|
+
add_index :active_agent_telemetry_traces, [:service_name, :environment]
|
|
28
|
+
add_index :active_agent_telemetry_traces, :created_at
|
|
29
|
+
end
|
|
30
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: activeagent
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Justin Bowen
|
|
@@ -124,33 +124,33 @@ dependencies:
|
|
|
124
124
|
- !ruby/object:Gem::Version
|
|
125
125
|
version: '2.14'
|
|
126
126
|
- !ruby/object:Gem::Dependency
|
|
127
|
-
name:
|
|
127
|
+
name: anthropic
|
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
|
129
129
|
requirements:
|
|
130
130
|
- - "~>"
|
|
131
131
|
- !ruby/object:Gem::Version
|
|
132
|
-
version:
|
|
132
|
+
version: '1.12'
|
|
133
133
|
type: :development
|
|
134
134
|
prerelease: false
|
|
135
135
|
version_requirements: !ruby/object:Gem::Requirement
|
|
136
136
|
requirements:
|
|
137
137
|
- - "~>"
|
|
138
138
|
- !ruby/object:Gem::Version
|
|
139
|
-
version:
|
|
139
|
+
version: '1.12'
|
|
140
140
|
- !ruby/object:Gem::Dependency
|
|
141
|
-
name:
|
|
141
|
+
name: aws-sdk-bedrockruntime
|
|
142
142
|
requirement: !ruby/object:Gem::Requirement
|
|
143
143
|
requirements:
|
|
144
|
-
- - "
|
|
144
|
+
- - ">="
|
|
145
145
|
- !ruby/object:Gem::Version
|
|
146
|
-
version: '
|
|
146
|
+
version: '0'
|
|
147
147
|
type: :development
|
|
148
148
|
prerelease: false
|
|
149
149
|
version_requirements: !ruby/object:Gem::Requirement
|
|
150
150
|
requirements:
|
|
151
|
-
- - "
|
|
151
|
+
- - ">="
|
|
152
152
|
- !ruby/object:Gem::Version
|
|
153
|
-
version: '
|
|
153
|
+
version: '0'
|
|
154
154
|
- !ruby/object:Gem::Dependency
|
|
155
155
|
name: openai
|
|
156
156
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -166,19 +166,19 @@ dependencies:
|
|
|
166
166
|
- !ruby/object:Gem::Version
|
|
167
167
|
version: '0.34'
|
|
168
168
|
- !ruby/object:Gem::Dependency
|
|
169
|
-
name:
|
|
169
|
+
name: ruby_llm
|
|
170
170
|
requirement: !ruby/object:Gem::Requirement
|
|
171
171
|
requirements:
|
|
172
172
|
- - ">="
|
|
173
173
|
- !ruby/object:Gem::Version
|
|
174
|
-
version: '0'
|
|
174
|
+
version: '1.0'
|
|
175
175
|
type: :development
|
|
176
176
|
prerelease: false
|
|
177
177
|
version_requirements: !ruby/object:Gem::Requirement
|
|
178
178
|
requirements:
|
|
179
179
|
- - ">="
|
|
180
180
|
- !ruby/object:Gem::Version
|
|
181
|
-
version: '0'
|
|
181
|
+
version: '1.0'
|
|
182
182
|
- !ruby/object:Gem::Dependency
|
|
183
183
|
name: capybara
|
|
184
184
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -249,6 +249,20 @@ dependencies:
|
|
|
249
249
|
- - ">="
|
|
250
250
|
- !ruby/object:Gem::Version
|
|
251
251
|
version: '0'
|
|
252
|
+
- !ruby/object:Gem::Dependency
|
|
253
|
+
name: minitest
|
|
254
|
+
requirement: !ruby/object:Gem::Requirement
|
|
255
|
+
requirements:
|
|
256
|
+
- - "~>"
|
|
257
|
+
- !ruby/object:Gem::Version
|
|
258
|
+
version: '5.0'
|
|
259
|
+
type: :development
|
|
260
|
+
prerelease: false
|
|
261
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
262
|
+
requirements:
|
|
263
|
+
- - "~>"
|
|
264
|
+
- !ruby/object:Gem::Version
|
|
265
|
+
version: '5.0'
|
|
252
266
|
- !ruby/object:Gem::Dependency
|
|
253
267
|
name: vcr
|
|
254
268
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -358,6 +372,34 @@ files:
|
|
|
358
372
|
- lib/active_agent/concerns/tooling.rb
|
|
359
373
|
- lib/active_agent/concerns/view.rb
|
|
360
374
|
- lib/active_agent/configuration.rb
|
|
375
|
+
- lib/active_agent/dashboard.rb
|
|
376
|
+
- lib/active_agent/dashboard/app/controllers/active_agent/dashboard/api/traces_controller.rb
|
|
377
|
+
- lib/active_agent/dashboard/app/controllers/active_agent/dashboard/application_controller.rb
|
|
378
|
+
- lib/active_agent/dashboard/app/controllers/active_agent/dashboard/dashboard_controller.rb
|
|
379
|
+
- lib/active_agent/dashboard/app/controllers/active_agent/dashboard/traces_controller.rb
|
|
380
|
+
- lib/active_agent/dashboard/app/jobs/active_agent/dashboard/agent_execution_job.rb
|
|
381
|
+
- lib/active_agent/dashboard/app/jobs/active_agent/dashboard/application_job.rb
|
|
382
|
+
- lib/active_agent/dashboard/app/jobs/active_agent/dashboard/sandbox_cleanup_job.rb
|
|
383
|
+
- lib/active_agent/dashboard/app/jobs/active_agent/dashboard/sandbox_provision_job.rb
|
|
384
|
+
- lib/active_agent/dashboard/app/jobs/active_agent/process_telemetry_traces_job.rb
|
|
385
|
+
- lib/active_agent/dashboard/app/models/active_agent/dashboard/agent.rb
|
|
386
|
+
- lib/active_agent/dashboard/app/models/active_agent/dashboard/agent_run.rb
|
|
387
|
+
- lib/active_agent/dashboard/app/models/active_agent/dashboard/agent_template.rb
|
|
388
|
+
- lib/active_agent/dashboard/app/models/active_agent/dashboard/agent_version.rb
|
|
389
|
+
- lib/active_agent/dashboard/app/models/active_agent/dashboard/application_record.rb
|
|
390
|
+
- lib/active_agent/dashboard/app/models/active_agent/dashboard/recording_action.rb
|
|
391
|
+
- lib/active_agent/dashboard/app/models/active_agent/dashboard/recording_snapshot.rb
|
|
392
|
+
- lib/active_agent/dashboard/app/models/active_agent/dashboard/sandbox_run.rb
|
|
393
|
+
- lib/active_agent/dashboard/app/models/active_agent/dashboard/sandbox_session.rb
|
|
394
|
+
- lib/active_agent/dashboard/app/models/active_agent/dashboard/session_recording.rb
|
|
395
|
+
- lib/active_agent/dashboard/app/models/active_agent/telemetry_trace.rb
|
|
396
|
+
- lib/active_agent/dashboard/app/views/active_agent/dashboard/traces/_trace_detail.html.erb
|
|
397
|
+
- lib/active_agent/dashboard/app/views/active_agent/dashboard/traces/index.html.erb
|
|
398
|
+
- lib/active_agent/dashboard/app/views/active_agent/dashboard/traces/metrics.html.erb
|
|
399
|
+
- lib/active_agent/dashboard/app/views/active_agent/dashboard/traces/show.html.erb
|
|
400
|
+
- lib/active_agent/dashboard/app/views/layouts/active_agent/dashboard/application.html.erb
|
|
401
|
+
- lib/active_agent/dashboard/config/routes.rb
|
|
402
|
+
- lib/active_agent/dashboard/engine.rb
|
|
361
403
|
- lib/active_agent/deprecator.rb
|
|
362
404
|
- lib/active_agent/generation.rb
|
|
363
405
|
- lib/active_agent/generation_job.rb
|
|
@@ -368,6 +410,16 @@ files:
|
|
|
368
410
|
- lib/active_agent/providers/anthropic/request.rb
|
|
369
411
|
- lib/active_agent/providers/anthropic/transforms.rb
|
|
370
412
|
- lib/active_agent/providers/anthropic_provider.rb
|
|
413
|
+
- lib/active_agent/providers/azure/_types.rb
|
|
414
|
+
- lib/active_agent/providers/azure/options.rb
|
|
415
|
+
- lib/active_agent/providers/azure_open_ai_provider.rb
|
|
416
|
+
- lib/active_agent/providers/azure_openai_provider.rb
|
|
417
|
+
- lib/active_agent/providers/azure_provider.rb
|
|
418
|
+
- lib/active_agent/providers/azureopenai_provider.rb
|
|
419
|
+
- lib/active_agent/providers/bedrock/_types.rb
|
|
420
|
+
- lib/active_agent/providers/bedrock/bearer_client.rb
|
|
421
|
+
- lib/active_agent/providers/bedrock/options.rb
|
|
422
|
+
- lib/active_agent/providers/bedrock_provider.rb
|
|
371
423
|
- lib/active_agent/providers/common/messages/_types.rb
|
|
372
424
|
- lib/active_agent/providers/common/messages/assistant.rb
|
|
373
425
|
- lib/active_agent/providers/common/messages/base.rb
|
|
@@ -387,6 +439,9 @@ files:
|
|
|
387
439
|
- lib/active_agent/providers/concerns/instrumentation.rb
|
|
388
440
|
- lib/active_agent/providers/concerns/previewable.rb
|
|
389
441
|
- lib/active_agent/providers/concerns/tool_choice_clearing.rb
|
|
442
|
+
- lib/active_agent/providers/gemini/_types.rb
|
|
443
|
+
- lib/active_agent/providers/gemini/options.rb
|
|
444
|
+
- lib/active_agent/providers/gemini_provider.rb
|
|
390
445
|
- lib/active_agent/providers/log_subscriber.rb
|
|
391
446
|
- lib/active_agent/providers/mock/_types.rb
|
|
392
447
|
- lib/active_agent/providers/mock/embedding_request.rb
|
|
@@ -442,14 +497,45 @@ files:
|
|
|
442
497
|
- lib/active_agent/providers/open_router_provider.rb
|
|
443
498
|
- lib/active_agent/providers/openai_provider.rb
|
|
444
499
|
- lib/active_agent/providers/openrouter_provider.rb
|
|
500
|
+
- lib/active_agent/providers/ruby_llm/_types.rb
|
|
501
|
+
- lib/active_agent/providers/ruby_llm/embedding_request.rb
|
|
502
|
+
- lib/active_agent/providers/ruby_llm/messages/_types.rb
|
|
503
|
+
- lib/active_agent/providers/ruby_llm/messages/assistant.rb
|
|
504
|
+
- lib/active_agent/providers/ruby_llm/messages/base.rb
|
|
505
|
+
- lib/active_agent/providers/ruby_llm/messages/system.rb
|
|
506
|
+
- lib/active_agent/providers/ruby_llm/messages/tool.rb
|
|
507
|
+
- lib/active_agent/providers/ruby_llm/messages/user.rb
|
|
508
|
+
- lib/active_agent/providers/ruby_llm/options.rb
|
|
509
|
+
- lib/active_agent/providers/ruby_llm/request.rb
|
|
510
|
+
- lib/active_agent/providers/ruby_llm/tool_proxy.rb
|
|
511
|
+
- lib/active_agent/providers/ruby_llm_provider.rb
|
|
445
512
|
- lib/active_agent/railtie.rb
|
|
446
513
|
- lib/active_agent/railtie/schema_generator_extension.rb
|
|
447
514
|
- lib/active_agent/schema_generator.rb
|
|
448
515
|
- lib/active_agent/service.rb
|
|
516
|
+
- lib/active_agent/telemetry.rb
|
|
517
|
+
- lib/active_agent/telemetry/configuration.rb
|
|
518
|
+
- lib/active_agent/telemetry/instrumentation.rb
|
|
519
|
+
- lib/active_agent/telemetry/reporter.rb
|
|
520
|
+
- lib/active_agent/telemetry/span.rb
|
|
521
|
+
- lib/active_agent/telemetry/tracer.rb
|
|
449
522
|
- lib/active_agent/version.rb
|
|
450
523
|
- lib/activeagent.rb
|
|
451
524
|
- lib/generators/active_agent/agent/USAGE
|
|
452
525
|
- lib/generators/active_agent/agent/agent_generator.rb
|
|
526
|
+
- lib/generators/active_agent/dashboard/install/install_generator.rb
|
|
527
|
+
- lib/generators/active_agent/dashboard/install/templates/initializer.rb
|
|
528
|
+
- lib/generators/active_agent/dashboard/install/templates/migrations/create_active_agent_agent_runs.rb
|
|
529
|
+
- lib/generators/active_agent/dashboard/install/templates/migrations/create_active_agent_agent_templates.rb
|
|
530
|
+
- lib/generators/active_agent/dashboard/install/templates/migrations/create_active_agent_agent_versions.rb
|
|
531
|
+
- lib/generators/active_agent/dashboard/install/templates/migrations/create_active_agent_agents.rb
|
|
532
|
+
- lib/generators/active_agent/dashboard/install/templates/migrations/create_active_agent_sandbox_runs.rb
|
|
533
|
+
- lib/generators/active_agent/dashboard/install/templates/migrations/create_active_agent_sandbox_sessions.rb
|
|
534
|
+
- lib/generators/active_agent/dashboard/install/templates/migrations/create_active_agent_session_recordings.rb
|
|
535
|
+
- lib/generators/active_agent/dashboard/install/templates/migrations/create_active_agent_telemetry_traces.rb
|
|
536
|
+
- lib/generators/active_agent/dashboard/install_generator.rb
|
|
537
|
+
- lib/generators/active_agent/dashboard/templates/active_agent_dashboard.rb.erb
|
|
538
|
+
- lib/generators/active_agent/dashboard/templates/create_active_agent_telemetry_traces.rb.erb
|
|
453
539
|
- lib/generators/active_agent/install/USAGE
|
|
454
540
|
- lib/generators/active_agent/install/install_generator.rb
|
|
455
541
|
- lib/generators/active_agent/templates/active_agent.yml
|
|
@@ -490,7 +576,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
490
576
|
- !ruby/object:Gem::Version
|
|
491
577
|
version: '0'
|
|
492
578
|
requirements: []
|
|
493
|
-
rubygems_version:
|
|
579
|
+
rubygems_version: 3.6.9
|
|
494
580
|
specification_version: 4
|
|
495
581
|
summary: Rails AI Agents Framework
|
|
496
582
|
test_files: []
|