Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Harshitk-cp/engram
/ functions
Functions
2,051 in github.com/Harshitk-cp/engram
⨍
Functions
2,051
◇
Types & classes
484
↓ 2 callers
Function
toProcedureResponse
Helper to convert domain.Procedure to API response.
internal/api/handlers/procedure.go:221
↓ 2 callers
Function
tokenMatches
tokenMatches compares a presented secret against the configured one in constant time.
internal/api/handlers/tenant.go:81
↓ 2 callers
Method
traverseGraph
(ctx context.Context, seeds []domain.MemoryWithScore, maxHops int)
internal/service/hybrid_recall.go:256
↓ 2 callers
Function
truncate
truncate shortens a string to maxLen characters, adding "..." if truncated.
internal/api/handlers/mind.go:283
↓ 2 callers
Function
truncate
(s string, n int)
examples/01_learning_agent/main.go:172
↓ 2 callers
Function
useClickOutside
(onClose: () => void)
console/src/components/Layout.tsx:25
↓ 2 callers
Function
userView
(u *domain.User)
internal/api/handlers/auth.go:171
↓ 2 callers
Function
writeQuotaError
writeQuotaError emits a 402 with the structured upgrade hint the console reads.
internal/api/middleware/quota.go:32
↓ 1 callers
Method
AddAlias
(ctx context.Context, id uuid.UUID, alias string)
internal/domain/graph.go:190
↓ 1 callers
Function
AllTiers
()
internal/domain/tier.go:110
↓ 1 callers
Method
Allow
Allow checks if a request from the given key should be allowed.
internal/api/middleware/ratelimit.go:67
↓ 1 callers
Function
AnthropicAPIKey
()
internal/config/config.go:68
↓ 1 callers
Method
ApplyCurrencyDelta
(ctx context.Context, id uuid.UUID, delta float32)
internal/service/decay.go:223
↓ 1 callers
Method
ApplyDecay
Decay
internal/domain/stores.go:279
↓ 1 callers
Method
ApplyEdgeDecay
(ctx context.Context, agentID uuid.UUID, decayRate float64)
internal/domain/graph.go:177
↓ 1 callers
Method
ArchiveExpiredSessionMemories
Binding lifecycle
internal/domain/stores.go:142
↓ 1 callers
Function
AuditSigningKey
AuditSigningKey is an optional HMAC secret used to sign audit exports so a recipient can confirm an export came from this server. Empty = unsigned exp
internal/config/config.go:273
↓ 1 callers
Method
BeliefsAsOf
(ctx context.Context, agentID, tenantID uuid.UUID, at time.Time, limit int)
internal/domain/stores.go:124
↓ 1 callers
Function
BillingEnabled
BillingEnabled reports whether managed-cloud billing + quota enforcement is on. Gated on a Razorpay key id + secret being configured; when unset the c
internal/config/config.go:292
↓ 1 callers
Method
CalibrationSamples
(ctx context.Context, tenantID uuid.UUID, agentID *uuid.UUID)
internal/domain/stores.go:385
↓ 1 callers
Function
CerebrasAPIKey
()
internal/config/config.go:76
↓ 1 callers
Method
ChainEntries
ChainEntries returns recent audit-log rows for a tenant — including the tamper-evident chain fields (seq, prev_hash, row_hash) — for visualizing the h
internal/store/learning.go:122
↓ 1 callers
Method
Classify
(ctx context.Context, content string)
internal/domain/stores.go:224
↓ 1 callers
Method
Cleanup
Cleanup evicts limiters not used within maxAge. Buckets in active use are kept, so legitimate clients never lose their limiter state to a flush.
internal/api/middleware/ratelimit.go:73
↓ 1 callers
Method
ClearActivations
(ctx context.Context, sessionID uuid.UUID)
internal/domain/stores.go:359
↓ 1 callers
Method
ClearSchemaActivations
(ctx context.Context, sessionID uuid.UUID)
internal/domain/stores.go:365
↓ 1 callers
Method
ClearSession
ClearSession clears the working memory session for an agent.
internal/service/working_memory.go:762
↓ 1 callers
Method
ConfidenceRange
()
internal/domain/memory.go:27
↓ 1 callers
Method
Count
(ctx context.Context, tenantID uuid.UUID)
internal/service/agent.go:78
↓ 1 callers
Method
CountByAgentID
(ctx context.Context, agentID uuid.UUID)
internal/domain/stores.go:249
↓ 1 callers
Method
CountByTenant
(ctx context.Context, tenantID uuid.UUID)
internal/domain/stores.go:34
↓ 1 callers
Method
CountNeedsReview
(ctx context.Context, agentID, tenantID uuid.UUID)
internal/domain/stores.go:122
↓ 1 callers
Method
Create
(ctx context.Context, p *domain.Procedure)
internal/service/procedural_test.go:22
↓ 1 callers
Method
Create
(ctx context.Context, p *domain.Procedure)
internal/service/consolidation_test.go:336
↓ 1 callers
Method
Create
(ctx context.Context, p *domain.Procedure)
internal/store/procedure.go:24
↓ 1 callers
Method
CreateActivation
Memory activations
internal/domain/stores.go:357
↓ 1 callers
Method
CreateAssociation
CreateAssociation creates a memory association for spreading activation.
internal/service/working_memory.go:778
↓ 1 callers
Method
CreateAssociation
Associations
internal/domain/stores.go:291
↓ 1 callers
Method
CreateCanon
(ctx context.Context, m *domain.Memory)
internal/service/memory.go:286
↓ 1 callers
Method
CreateMention
(ctx context.Context, m *EntityMention)
internal/domain/graph.go:193
↓ 1 callers
Method
CreateSchemaActivation
Schema activations
internal/domain/stores.go:363
↓ 1 callers
Method
CreateSession
Session management
internal/domain/stores.go:349
↓ 1 callers
Method
CurrentUser
CurrentUser returns the session's user, the session, and the user's orgs.
internal/service/auth.go:205
↓ 1 callers
Function
DBMaxConnIdleTime
DBMaxConnIdleTime closes a connection idle this long, returning it to Postgres. Override with DB_MAX_CONN_IDLE_SECS. Default 30m.
internal/config/config.go:332
↓ 1 callers
Function
DBMaxConnLifetime
DBMaxConnLifetime recycles a connection after this long (guards against server-side connection state drift / load-balancer staleness). Override with D
internal/config/config.go:328
↓ 1 callers
Function
DBMaxConns
---- Database connection pool ---- pgx's default pool maxes at 4 connections, which starves a busy server (every recall, decay pass, and background w
internal/config/config.go:319
↓ 1 callers
Function
DBMinConns
DBMinConns is the warm floor of connections kept open. Override with DB_MIN_CONNS. Default 2.
internal/config/config.go:323
↓ 1 callers
Function
DatabaseURL
()
internal/config/config.go:60
↓ 1 callers
Function
DefaultPruningRules
()
internal/domain/graph.go:157
↓ 1 callers
Function
DefaultTenantID
---- Control plane (console auth) ---- DefaultTenantID, if set, is the org that newly-signed-up users auto-join (instead of getting a fresh org). Used
internal/config/config.go:208
↓ 1 callers
Function
DefaultTenantRole
DefaultTenantRole is the role new users get when auto-joining the default org. Product default is "member"; set to "admin" in a demo so signups can ma
internal/config/config.go:213
↓ 1 callers
Method
DeleteByRetention
(ctx context.Context, agentID uuid.UUID, memType MemoryType, retentionDays int)
internal/domain/stores.go:106
↓ 1 callers
Method
DeleteEdgesByMemory
(ctx context.Context, memoryID uuid.UUID)
internal/domain/graph.go:173
↓ 1 callers
Method
DeleteExpired
(ctx context.Context)
internal/domain/stores.go:105
↓ 1 callers
Method
DeleteMentionsByMemory
(ctx context.Context, memoryID uuid.UUID)
internal/domain/graph.go:196
↓ 1 callers
Method
DeleteRaw
DeleteRaw performs a DELETE and returns the raw JSON response (if any).
mcp/client.go:233
↓ 1 callers
Method
DeleteSession
(ctx context.Context, agentID uuid.UUID, tenantID uuid.UUID)
internal/domain/stores.go:353
↓ 1 callers
Method
DetectAndApply
DetectAndApply analyzes a conversation for implicit feedback signals and applies them. Returns the detected implicit feedbacks.
internal/service/implicit_feedback.go:47
↓ 1 callers
Method
DetectImplicitFeedback
(ctx context.Context, memories []Memory, conversation []Message)
internal/domain/stores.go:233
↓ 1 callers
Method
DetectRelationships
(ctx context.Context, memory *Memory, similarMemories []MemoryWithScore)
internal/domain/stores.go:235
↓ 1 callers
Function
EmbeddingAPIKey
EmbeddingAPIKey returns the API key for the configured embedding provider. A generic EMBEDDING_API_KEY takes precedence (for self-hosted / non-OpenAI
internal/config/config.go:121
↓ 1 callers
Method
End
(ctx context.Context, id, tenantID uuid.UUID, expiresAt time.Time)
internal/domain/session.go:37
↓ 1 callers
Function
EnforceAgentQuota
EnforceAgentQuota blocks agent creation once the org hits its plan's agent cap.
internal/api/middleware/quota.go:83
↓ 1 callers
Function
EnsureEmbeddingDimension
EnsureEmbeddingDimension reconciles the vector columns with the configured embedding dimension. It is a no-op when they already match. When they diffe
internal/store/embeddingdim.go:30
↓ 1 callers
Method
ExportByTenant
ExportByTenant returns the full audit trail for a tenant ordered by chain seq, including the hash-chain fields, for signed export.
internal/store/learning.go:214
↓ 1 callers
Method
Extract
(ctx context.Context, conversation []domain.Message)
internal/llm/cerebras.go:139
↓ 1 callers
Method
Extract
(ctx context.Context, conversation []domain.Message)
internal/llm/gemini.go:121
↓ 1 callers
Method
Extract
(ctx context.Context, conversation []domain.Message)
internal/llm/anthropic.go:122
↓ 1 callers
Method
Extract
(ctx context.Context, conversation []domain.Message)
internal/llm/openai.go:115
↓ 1 callers
Method
ExtractEntities
(ctx context.Context, content string)
internal/domain/stores.go:234
↓ 1 callers
Method
FindByEmbeddingSimilarity
(ctx context.Context, agentID uuid.UUID, entityType EntityType, embedding []float32, threshold float32, limit
internal/domain/graph.go:188
↓ 1 callers
Method
FindByName
(ctx context.Context, agentID uuid.UUID, name string)
internal/service/hybrid_recall_test.go:124
↓ 1 callers
Method
FindCanonByContent
(ctx context.Context, tenantID uuid.UUID, content string)
internal/store/memory.go:404
↓ 1 callers
Method
Forget
Forget deletes a memory by ID.
mcp/client.go:160
↓ 1 callers
Function
GeminiAPIKey
()
internal/config/config.go:72
↓ 1 callers
Method
GetActivations
(ctx context.Context, sessionID uuid.UUID)
internal/domain/stores.go:358
↓ 1 callers
Method
GetAgentsNeedingConsolidation
GetAgentsNeedingConsolidation returns agent IDs that have unprocessed episodes.
internal/service/consolidation.go:1031
↓ 1 callers
Method
GetAggregatesByAgentID
(ctx context.Context, agentID uuid.UUID)
internal/domain/stores.go:248
↓ 1 callers
Method
GetByConsolidationStatus
(ctx context.Context, agentID uuid.UUID, tenantID uuid.UUID, status ConsolidationStatus, limit int)
internal/domain/stores.go:274
↓ 1 callers
Method
GetByConversationID
Retrieval
internal/domain/stores.go:267
↓ 1 callers
Method
GetByIDOnly
(ctx context.Context, id uuid.UUID)
internal/domain/stores.go:133
↓ 1 callers
Method
GetByImportance
(ctx context.Context, agentID uuid.UUID, tenantID uuid.UUID, minImportance float32, limit int)
internal/domain/stores.go:269
↓ 1 callers
Method
GetByMemoryID
(ctx context.Context, memoryID uuid.UUID)
internal/domain/stores.go:247
↓ 1 callers
Method
GetByProvider
(ctx context.Context, provider, providerUserID string)
internal/domain/auth.go:64
↓ 1 callers
Method
GetBySource
(ctx context.Context, tenantID uuid.UUID, sourceType ActivatedMemoryType, sourceID uuid.UUID)
internal/domain/stores.go:374
↓ 1 callers
Method
GetByTier
Tier methods
internal/domain/stores.go:136
↓ 1 callers
Method
GetLearningStats
GetLearningStats returns aggregated learning statistics for an agent. Returns (nil, nil) when no stats exist yet.
internal/service/learning.go:279
↓ 1 callers
Method
GetMemoriesForEntity
(ctx context.Context, entityID uuid.UUID, limit int)
internal/domain/graph.go:197
↓ 1 callers
Method
GetMemoryHealth
GetMemoryHealth returns statistics about the memory system health for an agent.
internal/service/consolidation.go:938
↓ 1 callers
Method
GetNeedsReview
(ctx context.Context, agentID uuid.UUID, tenantID uuid.UUID, limit int)
internal/domain/stores.go:140
↓ 1 callers
Method
GetRecentByType
(ctx context.Context, agentID uuid.UUID, tenantID uuid.UUID, memType MemoryType, limit int)
internal/domain/stores.go:109
↓ 1 callers
Method
GetSchemaActivations
(ctx context.Context, sessionID uuid.UUID)
internal/domain/stores.go:364
↓ 1 callers
Method
GetStats
(ctx context.Context, memoryID uuid.UUID, tenantID uuid.UUID)
internal/service/confidence.go:181
↓ 1 callers
Method
GetStats
GetStats handles GET /v1/agents/:id/learning/stats
internal/api/handlers/learning.go:174
↓ 1 callers
Method
GetTypeWeights
(ctx context.Context, agentID uuid.UUID)
internal/service/memory.go:829
↓ 1 callers
Method
GetWeakMemories
(ctx context.Context, agentID uuid.UUID, threshold float32)
internal/domain/stores.go:280
↓ 1 callers
Function
Guard
Guard wraps an MCP network transport with the protections a privileged local server needs. The transport holds the operator's ENGRAM_API_KEY, so reach
mcp/transports/guard.go:17
↓ 1 callers
Function
Handler
Handler returns an http.Handler that serves the console SPA at the site root. Static assets are served from the embedded filesystem; any unmatched pat
console/embed.go:22
↓ 1 callers
Method
Handler
Handler returns an http.Handler that mounts the SSE transport.
mcp/transports/sse.go:37
↓ 1 callers
Method
HasPlan
HasPlan reports whether a self-serve Razorpay plan is configured for the tier.
internal/billing/razorpay.go:75
← previous
next →
401–500 of 2,051, ranked by callers