mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-06-10 00:13:42 +00:00
4da85913a2
After the first agent run completes, generate a short title from the user's message using a 10s/50-token LLM call. Title is stored in the session label column and pushed to clients via session.updated event.
19 lines
435 B
Go
19 lines
435 B
Go
package agent
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/nextlevelbuilder/goclaw/internal/providers"
|
|
)
|
|
|
|
// Agent is the core abstraction for an AI agent execution loop.
|
|
// Implemented by *Loop; extracted as an interface for testability and composability.
|
|
type Agent interface {
|
|
ID() string
|
|
Run(ctx context.Context, req RunRequest) (*RunResult, error)
|
|
IsRunning() bool
|
|
Model() string
|
|
ProviderName() string
|
|
Provider() providers.Provider
|
|
}
|